Skip to content

Commit

Permalink
TMT: Initial enablement
Browse files Browse the repository at this point in the history
Run podman local rootful and rootless tests on every PR.

Packit will handle syncing of the TMT tests and gating config
from upstream to downstream (Fedora, CentOS Stream) with
every upstream release.

Signed-off-by: Lokesh Mandvekar <[email protected]>
  • Loading branch information
lsm5 committed Dec 26, 2024
1 parent 74e3a65 commit 513123a
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 2 deletions.
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
43 changes: 41 additions & 2 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@
downstream_package_name: conmon
upstream_tag_template: v{version}

# These files get synced from upstream to downstream (Fedora / CentOS Stream) on every
# propose-downstream job. This is done so tests maintained upstream can be run
# downstream in Zuul CI and Bodhi.
# Ref: https://packit.dev/docs/configuration#files_to_sync
files_to_sync:
- src: rpm/gating.yaml
dest: gating.yaml
delete: true
- src: plans/
dest: plans/
delete: true
mkpath: true
- src: .fmf/
dest: .fmf/
delete: true
- .packit.yaml

packages:
conmon-fedora:
pkg_tool: fedpkg
Expand All @@ -23,7 +40,7 @@ jobs:
failure_comment:
message: "Ephemeral COPR build failed. @containers/packit-build please check."
enable_net: true
targets:
targets: &fedora_copr_targets
- fedora-all-aarch64
- fedora-all-x86_64

Expand All @@ -41,7 +58,7 @@ jobs:
packages: [conmon-centos]
notifications: *copr_build_failure_notification
enable_net: true
targets:
targets: &centos_copr_targets
- centos-stream-10-aarch64
- centos-stream-10-x86_64
- centos-stream-9-aarch64
Expand All @@ -58,6 +75,28 @@ jobs:
project: podman-next
enable_net: true

- job: tests
trigger: pull_request
packages: [containers-common-fedora]
targets: *fedora_copr_targets
enable_net: true
tf_extra_params:
environments:
- artifacts:
- type: repository-file
id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/fedora-$releasever/rhcontainerbot-podman-next-fedora-$releasever.repo

- job: tests
trigger: pull_request
packages: [containers-common-centos]
targets: *centos_copr_targets
enable_net: true
tf_extra_params:
environments:
- artifacts:
- type: repository-file
id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/centos-stream-$releasever/rhcontainerbot-podman-next-centos-stream-$releasever.repo

# Downstream sync for Fedora
- job: propose_downstream
trigger: release
Expand Down
43 changes: 43 additions & 0 deletions plans/podman.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
prepare:
- name: packages
how: install
package: [bats, podman-tests]

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

discover:
how: fmf
url: https://github.com/lsm5/podman
ref: "tmt-fedora-centos"

execute:
how: tmt

/system/local/root:
summary: Run podman system rootful tests
discover+:
test: /test/tmt/system/local/root

/system/local/rootless:
summary: Run podman system rootless tests
discover+:
test: /test/tmt/system/local/rootless
16 changes: 16 additions & 0 deletions rpm/gating.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--- !Policy
product_versions:
- fedora-*
decision_contexts:
- bodhi_update_push_stable
- bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

0 comments on commit 513123a

Please sign in to comment.