Skip to content

Commit 39d9f91

Browse files
committed
TMT: Initial enablement
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 <lsm5@fedoraproject.org>
1 parent 225bb0b commit 39d9f91

File tree

4 files changed

+102
-2
lines changed

4 files changed

+102
-2
lines changed

.fmf/version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1

.packit.yaml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@
55
downstream_package_name: conmon
66
upstream_tag_template: v{version}
77

8+
# These files get synced from upstream to downstream (Fedora / CentOS Stream) on every
9+
# propose-downstream job. This is done so tests maintained upstream can be run
10+
# downstream in Zuul CI and Bodhi.
11+
# Ref: https://packit.dev/docs/configuration#files_to_sync
12+
files_to_sync:
13+
- src: rpm/gating.yaml
14+
dest: gating.yaml
15+
delete: true
16+
- src: plans/
17+
dest: plans/
18+
delete: true
19+
mkpath: true
20+
- src: .fmf/
21+
dest: .fmf/
22+
delete: true
23+
- .packit.yaml
24+
825
packages:
926
conmon-fedora:
1027
pkg_tool: fedpkg
@@ -23,7 +40,7 @@ jobs:
2340
failure_comment:
2441
message: "Ephemeral COPR build failed. @containers/packit-build please check."
2542
enable_net: true
26-
targets:
43+
targets: &fedora_copr_targets
2744
- fedora-all-aarch64
2845
- fedora-all-x86_64
2946

@@ -41,7 +58,7 @@ jobs:
4158
packages: [conmon-centos]
4259
notifications: *copr_build_failure_notification
4360
enable_net: true
44-
targets:
61+
targets: &centos_copr_targets
4562
- centos-stream-10-aarch64
4663
- centos-stream-10-x86_64
4764
- centos-stream-9-aarch64
@@ -58,6 +75,28 @@ jobs:
5875
project: podman-next
5976
enable_net: true
6077

78+
- job: tests
79+
trigger: pull_request
80+
packages: [conmon-fedora]
81+
targets: *fedora_copr_targets
82+
enable_net: true
83+
tf_extra_params:
84+
environments:
85+
- artifacts:
86+
- type: repository-file
87+
id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/fedora-$releasever/rhcontainerbot-podman-next-fedora-$releasever.repo
88+
89+
- job: tests
90+
trigger: pull_request
91+
packages: [conmon-centos]
92+
targets: *centos_copr_targets
93+
enable_net: true
94+
tf_extra_params:
95+
environments:
96+
- artifacts:
97+
- type: repository-file
98+
id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/centos-stream-$releasever/rhcontainerbot-podman-next-centos-stream-$releasever.repo
99+
61100
# Downstream sync for Fedora
62101
- job: propose_downstream
63102
trigger: release

plans/podman.fmf

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
prepare:
2+
- when: distro == centos-stream or distro == rhel
3+
how: shell
4+
script: |
5+
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm --eval '%{?rhel}').noarch.rpm
6+
dnf -y config-manager --set-enabled epel
7+
order: 10
8+
- when: initiator == packit
9+
how: shell
10+
script: |
11+
COPR_REPO_FILE="/etc/yum.repos.d/*podman-next*.repo"
12+
if compgen -G $COPR_REPO_FILE > /dev/null; then
13+
sed -i -n '/^priority=/!p;$apriority=1' $COPR_REPO_FILE
14+
fi
15+
dnf -y upgrade --allowerasing
16+
order: 20
17+
18+
provision:
19+
how: artemis
20+
hardware:
21+
memory: ">= 16 GB"
22+
cpu:
23+
cores: ">= 4"
24+
threads: ">=8"
25+
disk:
26+
- size: ">= 512 GB"
27+
28+
discover:
29+
how: fmf
30+
url: https://github.com/lsm5/podman
31+
ref: "tmt-fedora-centos"
32+
33+
execute:
34+
how: tmt
35+
36+
/system/local-root:
37+
summary: Run podman system rootful tests
38+
discover+:
39+
test: /test/tmt/system/local-root
40+
41+
/system/local-rootless:
42+
summary: Run podman system rootless tests
43+
discover+:
44+
test: /test/tmt/system/local-rootless

rpm/gating.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- !Policy
2+
product_versions:
3+
- fedora-*
4+
decision_contexts:
5+
- bodhi_update_push_stable
6+
- bodhi_update_push_testing
7+
subject_type: koji_build
8+
rules:
9+
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
10+
11+
--- !Policy
12+
product_versions:
13+
- rhel-*
14+
decision_context: osci_compose_gate
15+
rules:
16+
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

0 commit comments

Comments
 (0)