Skip to content

Commit 07e4b25

Browse files
committed
Packit: Bump podman-next repo priority for cockpit tests
TMT_TREE envvar is ok to use in this case as it will only be used on upstream packit tests. Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
1 parent c134825 commit 07e4b25

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
set -exo pipefail
4+
5+
COPR_REPO_FILE="/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:rhcontainerbot:podman-next.repo"
6+
if compgen -G "$COPR_REPO_FILE" > /dev/null; then
7+
# We want the priority bump appended to the file, we're not looking
8+
# to use a variable.
9+
# shellcheck disable=SC2016
10+
sed -i -n '/^priority=/!p;$apriority=1' "$COPR_REPO_FILE"
11+
fi
12+
# We want all dependencies from podman-next except podman as podman will be fetched
13+
# from the packit copr.
14+
dnf -y upgrade --allowerasing --exclude=podman*

plans/cockpit-podman.fmf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ discover:
1515
execute:
1616
how: tmt
1717

18+
prepare:
19+
when: initiator == packit
20+
how: shell
21+
script: bash $TMT_TREE/contrib/packit-tmt/podman-next-setup.sh
22+
order: 20
23+
1824
# not relevant for testing podman
1925
environment:
2026
TEST_AUDIT_NO_SELINUX: 1

plans/system.fmf

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ prepare:
1616
order: 10
1717
- when: initiator == packit
1818
how: shell
19-
script: |
20-
COPR_REPO_FILE="/etc/yum.repos.d/*podman-next*.repo"
21-
if compgen -G $COPR_REPO_FILE > /dev/null; then
22-
sed -i -n '/^priority=/!p;$apriority=1' $COPR_REPO_FILE
23-
fi
24-
dnf -y upgrade --allowerasing --exclude=podman*
19+
script: bash $TMT_TREE/contrib/packit-tmt/podman-next-setup.sh
2520
order: 20
2621

2722
adjust+:

0 commit comments

Comments
 (0)