Skip to content

Commit 31641a0

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 with every upstream release. TODO: enable CentOS Stream test jobs. Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
1 parent 1f6602a commit 31641a0

File tree

6 files changed

+112
-2
lines changed

6 files changed

+112
-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: 32 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,19 @@ jobs:
5875
project: podman-next
5976
enable_net: true
6077

78+
- job: tests
79+
trigger: pull_request
80+
packages: [conmon-fedora]
81+
targets:
82+
- fedora-all-aarch64
83+
- fedora-all-x86_64
84+
enable_net: true
85+
tf_extra_params:
86+
environments:
87+
- artifacts:
88+
- type: repository-file
89+
id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/fedora-$releasever/rhcontainerbot-podman-next-fedora-$releasever.repo
90+
6191
# Downstream sync for Fedora
6292
- job: propose_downstream
6393
trigger: release

hack/tmt/bats-setup.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
set -exo pipefail
4+
5+
# Install bats
6+
# https://bats-core.readthedocs.io/en/stable/installation.html
7+
8+
BATS_TMPDIR=$(mktemp -d)
9+
pushd "$BATS_TMPDIR"
10+
11+
BATS_VERSION=1.12.0
12+
curl -ssfL https://github.com/bats-core/bats-core/archive/refs/tags/v"$BATS_VERSION".tar.gz | tar -xz
13+
pushd bats-core-"$BATS_VERSION"
14+
./install.sh /usr
15+
popd
16+
popd

hack/tmt/dnf-repo-setup.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -exo pipefail
4+
5+
COPR_REPO_FILE="/etc/yum.repos.d/*podman-next*.repo"
6+
if compgen -G "$COPR_REPO_FILE" > /dev/null; then
7+
# shellcheck disable=SC2016
8+
sed -i -n '/^priority=/!p;$apriority=1' "$COPR_REPO_FILE"
9+
fi
10+
dnf -y upgrade --allowerasing

plans/podman.fmf

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
prepare:
2+
- when: distro == centos-stream or distro == rhel
3+
how: shell
4+
script: bash hack/tmt/bats-setup.sh
5+
order: 10
6+
- when: initiator == packit
7+
how: shell
8+
script: bash hack/tmt/dnf-repo-setup.sh
9+
order: 20
10+
11+
provision:
12+
how: artemis
13+
hardware:
14+
memory: ">= 16 GB"
15+
cpu:
16+
cores: ">= 4"
17+
threads: ">=8"
18+
disk:
19+
- size: ">= 512 GB"
20+
21+
discover:
22+
how: fmf
23+
url: https://github.com/containers/podman
24+
ref: "main"
25+
26+
execute:
27+
how: tmt
28+
29+
/system/root-local:
30+
summary: Run podman system rootful tests
31+
discover+:
32+
test: /test/tmt/system/local-root
33+
34+
/system/rootless-oocal:
35+
summary: Run podman system rootless tests
36+
discover+:
37+
filter: /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)