Skip to content

Commit 248fbd1

Browse files
committed
Move RHEL branch from Cirrus to TMT
Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent 03da010 commit 248fbd1

16 files changed

+328
-597
lines changed

.packit-copr-rpm.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
3+
# This script handles any custom processing of the spec file using the `fix-spec-file`
4+
# action in .packit.yaml. These steps only work on copr builds, not on official
5+
# Fedora builds.
6+
7+
set -exo pipefail
8+
9+
#. .packit-rpm-git-commit.sh
10+
11+
# Get Version from HEAD
12+
VERSION=$(grep '^const RawVersion' version/rawversion/version.go | cut -d\" -f2)
13+
14+
# RPM Version can't take "-"
15+
RPM_VERSION="${VERSION//-/~}"
16+
17+
# Generate source tarball from HEAD
18+
#git-archive-all -C $(git rev-parse --show-toplevel) --prefix=$PACKAGE-$VERSION/ rpm/$PACKAGE-$VERSION.tar.gz
19+
20+
# RPM Spec modifications
21+
22+
# Use the Version from HEAD in rpm spec
23+
sed -i "s/^Version:.*/Version: $RPM_VERSION/" "$SPEC_FILE"
24+
25+
# Use Packit's supplied variable in the Release field in rpm spec.
26+
sed -i "s/^Release:.*/Release: $PACKIT_RPMSPEC_RELEASE%{?dist}/" "$SPEC_FILE"
27+
28+
# Ensure last part of the release string is the git shortcommit without a
29+
# prepended "g"
30+
#sed -i "/^Release: $PACKIT_RPMSPEC_RELEASE%{?dist}/ s/\(.*\)g/\1/" $SPEC_FILE
31+
32+
# Use above generated tarball as Source in rpm spec
33+
#sed -i "s/^Source0:.*.tar.gz/Source0: $PACKAGE-$VERSION.tar.gz/" $SPEC_FILE
34+
35+
# Update setup macro to use the correct build dir
36+
sed -i "s/^%autosetup.*/%autosetup -Sgit -n %{name}-$VERSION/" "$SPEC_FILE"

.packit.sh

Lines changed: 0 additions & 48 deletions
This file was deleted.

.packit.yaml

Lines changed: 34 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -5,122 +5,57 @@
55
downstream_package_name: podman
66
upstream_tag_template: v{version}
77

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

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

2213
actions:
23-
fix-spec-file:
24-
- "bash .packit.sh"
14+
fix-spec-file: "bash .packit-copr-rpm.sh"
2515

2616
jobs:
2717
- job: copr_build
2818
trigger: pull_request
29-
packages: [podman-fedora]
30-
notifications: &packit_build_failure_notification
19+
notifications: &packit_failure_notification
3120
failure_comment:
32-
message: "Ephemeral COPR build failed. @containers/packit-build please check."
21+
message: "Packit jobs failed. @containers/packit-build please check."
3322
enable_net: true
3423
targets:
35-
- fedora-all-x86_64
36-
- fedora-all-aarch64
24+
- epel-10-x86_64
25+
- epel-10-aarch64
26+
actions:
27+
post-upstream-clone: "curl --fail -O https://gitlab.com/redhat/centos-stream/rpms/podman/-/raw/c10s/podman.spec"
3728

3829
- job: copr_build
3930
trigger: pull_request
40-
packages: [podman-eln]
41-
notifications: *packit_build_failure_notification
31+
notifications: *packit_failure_notification
4232
enable_net: true
4333
targets:
44-
fedora-eln-x86_64:
45-
additional_repos:
46-
- "https://kojipkgs.fedoraproject.org/repos/eln-build/latest/x86_64/"
47-
fedora-eln-aarch64:
48-
additional_repos:
49-
- "https://kojipkgs.fedoraproject.org/repos/eln-build/latest/aarch64/"
34+
- epel-9-x86_64
35+
- epel-9-aarch64
36+
actions:
37+
post-upstream-clone: "curl --fail -O https://gitlab.com/redhat/centos-stream/rpms/podman/-/raw/c9s/podman.spec"
5038

51-
- job: copr_build
39+
- job: tests
5240
trigger: pull_request
53-
packages: [podman-centos]
54-
notifications: *packit_build_failure_notification
55-
enable_net: true
56-
targets:
57-
- centos-stream-9-x86_64
58-
- centos-stream-9-aarch64
59-
- centos-stream-10-x86_64
60-
- centos-stream-10-aarch64
61-
62-
# Run on commit to main branch
63-
- job: copr_build
64-
trigger: commit
65-
packages: [podman-fedora]
66-
notifications:
67-
failure_comment:
68-
message: "podman-next COPR build failed. @containers/packit-build please check."
69-
branch: main
70-
owner: rhcontainerbot
71-
project: podman-next
72-
enable_net: true
41+
use_internal_tf: true
42+
notifications: *packit_failure_notification
43+
targets: &packit_test_targets
44+
epel-10-x86_64:
45+
distros: [RHEL-10-Nightly,RHEL-10.0-Nightly]
46+
epel-10-aarch64:
47+
distros: [RHEL-10-Nightly,RHEL-10.0-Nightly]
48+
epel-9-x86_64:
49+
distros: [RHEL-9-Nightly,RHEL-9.6.0-Nightly]
50+
epel-9-aarch64:
51+
distros: [RHEL-9-Nightly,RHEL-9.6.0-Nightly]
52+
tmt_plan: "/plans/system"
53+
identifier: "system"
7354

7455
- job: tests
75-
identifier: cockpit-revdeps
7656
trigger: pull_request
77-
packages: [podman-fedora]
78-
notifications:
79-
failure_comment:
80-
message: "Cockpit tests failed for commit {commit_sha}. @martinpitt, @jelly, @mvollmer please check."
81-
targets:
82-
- fedora-latest-stable
83-
- fedora-development
84-
tf_extra_params:
85-
environments:
86-
- artifacts:
87-
- type: repository-file
88-
id: https://copr.fedorainfracloud.org/coprs/g/cockpit/main-builds/repo/fedora-$releasever/group_cockpit-main-builds-fedora-$releasever.repo
89-
- type: repository-file
90-
id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/fedora-$releasever/rhcontainerbot-podman-next-fedora-$releasever.repo
91-
tmt:
92-
context:
93-
revdeps: "yes"
94-
95-
- job: propose_downstream
96-
trigger: release
97-
update_release: false
98-
packages: [podman-fedora]
99-
dist_git_branches: &fedora_targets
100-
- fedora-all
101-
102-
- job: propose_downstream
103-
trigger: release
104-
update_release: false
105-
packages: [podman-centos]
106-
dist_git_branches:
107-
- c10s
108-
109-
- job: koji_build
110-
trigger: commit
111-
packages: [podman-fedora]
112-
sidetag_group: podman-releases
113-
dist_git_branches: *fedora_targets
114-
115-
- job: bodhi_update
116-
trigger: koji_build
117-
packages: [podman-fedora]
118-
sidetag_group: podman-releases
119-
# Dependencies are not rpm dependencies, but packages that should go in the
120-
# same bodhi update
121-
# Ref: https://packit.dev/docs/fedora-releases-guide/releasing-multiple-packages
122-
dependencies:
123-
- buildah
124-
- containers-common
125-
- skopeo
126-
dist_git_branches: *fedora_targets
57+
use_internal_tf: true
58+
notifications: *packit_failure_notification
59+
targets: *packit_test_targets
60+
tmt_plan: "/plans/e2e"
61+
identifier: "e2e"

plans/cockpit-podman.fmf

Lines changed: 0 additions & 37 deletions
This file was deleted.

plans/e2e.fmf

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
discover:
2+
how: fmf
3+
4+
execute:
5+
how: tmt
6+
7+
prepare:
8+
- how: shell
9+
script: modprobe null_blk nr_devices=1
10+
order: 5
11+
12+
provision:
13+
how: artemis
14+
hardware:
15+
memory: ">= 16 GB"
16+
cpu:
17+
cores: ">= 4"
18+
threads: ">=8"
19+
disk:
20+
- size: ">= 512 GB"
21+
22+
/local-root:
23+
summary: Local rootful tests
24+
discover+:
25+
filter: 'tag:local & tag:root & tag:e2e'
26+
27+
/local-rootless:
28+
summary: Local rootless tests
29+
discover+:
30+
filter: 'tag:local & tag:rootless & tag:e2e'
31+
32+
/remote-root:
33+
summary: Remote rootful tests
34+
discover+:
35+
filter: 'tag:remote & tag:root & tag:e2e'
36+
37+
/remote-rootless:
38+
summary: Remote rootless tests
39+
discover+:
40+
filter: 'tag:remote & tag:rootless & tag:e2e'

plans/system.fmf

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
discover:
2+
how: fmf
3+
4+
execute:
5+
how: tmt
6+
7+
prepare:
8+
- how: shell
9+
script: modprobe null_blk nr_devices=1
10+
order: 5
11+
- how: shell
12+
script: |
13+
BATS_VERSION=1.12.0
14+
curl -L https://github.com/bats-core/bats-core/archive/refs/tags/v"$BATS_VERSION".tar.gz | tar -xz
15+
cd bats-core-"$BATS_VERSION"
16+
./install.sh /usr
17+
order: 10
18+
19+
provision:
20+
how: artemis
21+
hardware:
22+
memory: ">= 16 GB"
23+
cpu:
24+
cores: ">= 4"
25+
threads: ">=8"
26+
disk:
27+
- size: ">= 512 GB"
28+
29+
/local-root:
30+
summary: Local rootful tests
31+
discover+:
32+
filter: 'tag:local & tag:root & tag:system'
33+
34+
/local-rootless:
35+
summary: Local rootless tests
36+
discover+:
37+
filter: 'tag:local & tag:rootless & tag:system'
38+
39+
/remote-root:
40+
summary: Remote rootful tests
41+
discover+:
42+
filter: 'tag:remote & tag:root & tag:system'
43+
44+
/remote-rootless:
45+
summary: Remote rootless tests
46+
discover+:
47+
filter: 'tag:remote & tag:rootless & tag:system'

rpm/Makefile

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)