Skip to content

Commit

Permalink
Packit+TMT: Fix copr repo enablement on upstream CentOS Stream tests
Browse files Browse the repository at this point in the history
The previous `adjust` conditionals ended up skipping copr repo and
package upgrade steps for CentOS Stream environments.

This should be resolved by directly using `prepare` and `when` keywords
for setting conditions.

Signed-off-by: Lokesh Mandvekar <[email protected]>
  • Loading branch information
lsm5 committed Jan 1, 2025
1 parent bd4f773 commit 34b6e2c
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions plans/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,23 @@ discover:
how: fmf
execute:
how: tmt
adjust:
- when: initiator == packit
because: "We need to test with updated packages from rhcontainerbot/podman-next copr"
prepare+:
how: shell
script: |
sed -i -n '/^priority=/!p;$apriority=1' /etc/yum.repos.d/*podman-next*.repo
dnf -y upgrade --allowerasing
# FIXME: Use epel10 once bats is available there
- when: distro == centos-stream-10 or distro == rhel-10
because: "bats isn't yet available on epel10"
prepare+:
how: install
copr: rhcontainerbot/bats-el10
package: bats
- when: distro == centos-stream-9 or distro == rhel-9
because: "bats is present on EPEL on rhel9 / c9s"
prepare+:
how: feature
epel: enabled
prepare:
- name: "Upgrade with podman-next enabled"
how: shell
script: |
sed -i -n '/^priority=/!p;$apriority=1' /etc/yum.repos.d/*podman-next*.repo
dnf -y upgrade --allowerasing
when: initiator == packit
- name: "Enable EPEL on RHEL for bats and other packages"
how: shell
script: |
dnf -y install 'dnf-command(config-manager)'
dnf config-manager --set-enabled epel
when: distro != fedora
- name: "Enable bats on rhel10"
how: shell
script: dnf -y copr enable rhcontainerbot/bats-el10
when: distro != fedora && distro != centos-stream-9 && distro != rhel-9

/upstream:
summary: Run crun specific Podman system tests on upstream PRs
Expand Down

0 comments on commit 34b6e2c

Please sign in to comment.