Skip to content

Commit f49f977

Browse files
committed
Move RHEL branch to TMT
Advantages: - Test RHEL branches on on actual RHEL - Reduce our GCE/AWS usage - Easier to switch git host (RE: CNCF) The spec file is fetched from CentOS Stream as it's publicly available and the RHEL branches are most often close enough, if not identical. Fixes: RUN-3105 Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent b5337f9 commit f49f977

File tree

5 files changed

+89
-75
lines changed

5 files changed

+89
-75
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: 26 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -5,91 +5,42 @@
55
downstream_package_name: buildah
66
upstream_tag_template: v{version}
77

8-
packages:
9-
buildah-fedora:
10-
pkg_tool: fedpkg
11-
specfile_path: rpm/buildah.spec
12-
buildah-centos:
13-
pkg_tool: centpkg
14-
specfile_path: rpm/buildah.spec
15-
buildah-eln:
16-
specfile_path: rpm/buildah.spec
8+
specfile_path: buildah.spec
179

18-
srpm_build_deps:
19-
- make
10+
# Disable automatic merging for Copr builds (and subsequent Testing Farm)
11+
merge_pr_in_ci: false
2012

2113
jobs:
2214
- job: copr_build
2315
trigger: pull_request
24-
packages: [buildah-fedora]
25-
notifications: &copr_build_failure_notification
16+
notifications: &packit_failure_notification
2617
failure_comment:
27-
message: "Ephemeral COPR build failed. @containers/packit-build please check."
28-
targets:
29-
- fedora-all-x86_64
30-
- fedora-all-aarch64
18+
message: "Packit jobs failed. @containers/packit-build please check."
3119
enable_net: true
32-
33-
- job: copr_build
34-
trigger: pull_request
35-
packages: [buildah-eln]
36-
notifications: *copr_build_failure_notification
3720
targets:
38-
fedora-eln-x86_64:
39-
additional_repos:
40-
- "https://kojipkgs.fedoraproject.org/repos/eln-build/latest/x86_64/"
41-
fedora-eln-aarch64:
42-
additional_repos:
43-
- "https://kojipkgs.fedoraproject.org/repos/eln-build/latest/aarch64/"
44-
enable_net: true
21+
- epel-10-x86_64
22+
- epel-10-aarch64
23+
actions:
24+
post-upstream-clone: "curl --fail -O https://gitlab.com/redhat/centos-stream/rpms/buildah/-/raw/c10s/buildah.spec"
4525

4626
- job: copr_build
4727
trigger: pull_request
48-
packages: [buildah-centos]
49-
notifications: *copr_build_failure_notification
50-
targets:
51-
- centos-stream-9-x86_64
52-
- centos-stream-9-aarch64
53-
- centos-stream-10-x86_64
54-
- centos-stream-10-aarch64
55-
enable_net: true
56-
57-
# Run on commit to main branch
58-
- job: copr_build
59-
trigger: commit
60-
packages: [buildah-fedora]
61-
notifications:
62-
failure_comment:
63-
message: "podman-next COPR build failed. @containers/packit-build please check."
64-
branch: main
65-
owner: rhcontainerbot
66-
project: podman-next
28+
notifications: *packit_failure_notification
6729
enable_net: true
30+
targets:
31+
- epel-9-x86_64
32+
- epel-9-aarch64
33+
actions:
34+
post-upstream-clone: "curl --fail -O https://gitlab.com/redhat/centos-stream/rpms/buildah/-/raw/c9s/buildah.spec"
6835

69-
# Sync to Fedora
70-
- job: propose_downstream
71-
trigger: release
72-
packages: [buildah-fedora]
73-
update_release: false
74-
dist_git_branches: &fedora_targets
75-
- fedora-all
76-
77-
# Sync to CentOS Stream
78-
- job: propose_downstream
79-
trigger: release
80-
packages: [buildah-centos]
81-
update_release: false
82-
dist_git_branches:
83-
- c10s
84-
85-
# Fedora Koji build
86-
- job: koji_build
87-
trigger: commit
88-
packages: [buildah-fedora]
89-
sidetag_group: podman-releases
90-
# Dependents are not rpm dependencies, but the package whose bodhi update
91-
# should include this package.
92-
# Ref: https://packit.dev/docs/fedora-releases-guide/releasing-multiple-packages
93-
dependents:
94-
- podman
95-
dist_git_branches: *fedora_targets
36+
# Tests for RHEL
37+
- job: tests
38+
trigger: pull_request
39+
use_internal_tf: true
40+
notifications: *packit_failure_notification
41+
targets: &packit_test_targets
42+
epel-10-x86_64:
43+
distros: [RHEL-10-Nightly,RHEL-10.0-Nightly]
44+
epel-9-x86_64:
45+
distros: [RHEL-9-Nightly,RHEL-9.6.0-Nightly]
46+
tmt_plan: "/plans/system"

plans/system.fmf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
discover:
2+
how: fmf
3+
filter: 'tag:system'
4+
5+
execute:
6+
how: tmt
7+
8+
prepare:
9+
- how: shell
10+
script: |
11+
BATS_VERSION=1.12.0
12+
curl -L https://github.com/bats-core/bats-core/archive/refs/tags/v"$BATS_VERSION".tar.gz | tar -xz
13+
cd bats-core-"$BATS_VERSION"
14+
./install.sh /usr
15+
order: 10
16+
17+
provision:
18+
how: artemis
19+
hardware:
20+
memory: ">= 16 GB"
21+
cpu:
22+
cores: ">= 4"
23+
threads: ">=8"
24+
disk:
25+
- size: ">= 512 GB"

tests/tmt/system.fmf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require:
2+
- buildah-tests
3+
- git-daemon
4+
- slirp4netns
5+
6+
environment:
7+
BUILDAH_BINARY: /usr/bin/buildah
8+
IMGTYPE_BINARY: /usr/bin/buildah-imgtype
9+
INET_BINARY: /usr/bin/buildah-inet
10+
COPY_BINARY: /usr/bin/buildah-copy
11+
TUTORIAL_BINARY: /usr/bin/buildah-tutorial
12+
DUMPSPEC_BINARY: /usr/bin/buildah-dumpspec
13+
TMPDIR: /var/tmp
14+
15+
/local/root:
16+
summary: System test
17+
test: bash ./system.sh
18+
duration: 60m
19+
tag: [ system ]

tests/tmt/system.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
set -exo pipefail
4+
5+
uname -r
6+
7+
rpm -q \
8+
aardvark-dns \
9+
buildah \
10+
buildah-tests \
11+
conmon \
12+
container-selinux \
13+
containers-common \
14+
crun \
15+
netavark \
16+
systemd
17+
18+
bats /usr/share/buildah/test/system

0 commit comments

Comments
 (0)