From 1f6602aa8d529f7ffcc8484dfa9ee2b6a8d6d3bc Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Thu, 26 Dec 2024 16:06:00 +0530 Subject: [PATCH 1/2] Packit: remove EPEL jobs, separate out ELN jobs Removing EPEL (RHEL) jobs from here, as we have removed them from our other projects as well. RHEL copr envrionments are often out of date, leading to failed builds and tests. Testing on CentOS Stream should suffice to guarantee that whatever enters RHEL has passed upstreawm tests. This commit also separates out ELN jobs so that fedora copr targets can be conveniently reused in TMT tests that will be added in future commits. Signed-off-by: Lokesh Mandvekar --- .packit.yaml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index d7edb655..5d72ef9c 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -12,7 +12,7 @@ packages: conmon-centos: pkg_tool: centpkg specfile_path: rpm/conmon.spec - conmon-rhel: + conmon-eln: specfile_path: rpm/conmon.spec jobs: @@ -26,6 +26,13 @@ jobs: targets: - fedora-all-aarch64 - fedora-all-x86_64 + + - job: copr_build + trigger: pull_request + packages: [conmon-eln] + notifications: *copr_build_failure_notification + enable_net: true + targets: - fedora-eln-aarch64 - fedora-eln-x86_64 @@ -40,15 +47,6 @@ jobs: - centos-stream-9-aarch64 - centos-stream-9-x86_64 - - job: copr_build - trigger: pull_request - packages: [conmon-rhel] - notifications: *copr_build_failure_notification - enable_net: true - targets: - - epel-9-aarch64 - - epel-9-x86_64 - # Run on commit to main branch - job: copr_build trigger: commit @@ -75,6 +73,7 @@ jobs: update_release: false dist_git_branches: - c10s + - c9s - job: koji_build trigger: commit From 821c21fc1e6283e012641f59bc28b75c743aa555 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Mon, 30 Jun 2025 08:58:52 -0400 Subject: [PATCH 2/2] 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 --- .fmf/version | 1 + .packit.yaml | 34 ++++++++++++++++++++++++++++++++-- hack/tmt/bats-setup.sh | 16 ++++++++++++++++ hack/tmt/dnf-repo-setup.sh | 10 ++++++++++ plans/podman.fmf | 36 ++++++++++++++++++++++++++++++++++++ rpm/gating.yaml | 16 ++++++++++++++++ 6 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 .fmf/version create mode 100644 hack/tmt/bats-setup.sh create mode 100644 hack/tmt/dnf-repo-setup.sh create mode 100644 plans/podman.fmf create mode 100644 rpm/gating.yaml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.packit.yaml b/.packit.yaml index 5d72ef9c..544c9aa1 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -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 @@ -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 @@ -41,7 +58,7 @@ jobs: packages: [conmon-centos] notifications: *copr_build_failure_notification enable_net: true - targets: + targets: ¢os_copr_targets - centos-stream-10-aarch64 - centos-stream-10-x86_64 - centos-stream-9-aarch64 @@ -58,6 +75,19 @@ jobs: project: podman-next enable_net: true + - job: tests + trigger: pull_request + packages: [conmon-fedora] + targets: + - fedora-all-aarch64 + - fedora-all-x86_64 + 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 + # Downstream sync for Fedora - job: propose_downstream trigger: release diff --git a/hack/tmt/bats-setup.sh b/hack/tmt/bats-setup.sh new file mode 100644 index 00000000..15bbec54 --- /dev/null +++ b/hack/tmt/bats-setup.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -exo pipefail + +# Install bats +# https://bats-core.readthedocs.io/en/stable/installation.html + +BATS_TMPDIR=$(mktemp -d) +pushd "$BATS_TMPDIR" + +BATS_VERSION=1.12.0 +curl -ssfL https://github.com/bats-core/bats-core/archive/refs/tags/v"$BATS_VERSION".tar.gz | tar -xz +pushd bats-core-"$BATS_VERSION" +./install.sh /usr +popd +popd diff --git a/hack/tmt/dnf-repo-setup.sh b/hack/tmt/dnf-repo-setup.sh new file mode 100644 index 00000000..46488bdd --- /dev/null +++ b/hack/tmt/dnf-repo-setup.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -exo pipefail + +COPR_REPO_FILE="/etc/yum.repos.d/*podman-next*.repo" +if compgen -G "$COPR_REPO_FILE" > /dev/null; then + # shellcheck disable=SC2016 + sed -i -n '/^priority=/!p;$apriority=1' "$COPR_REPO_FILE" +fi +dnf -y upgrade --allowerasing diff --git a/plans/podman.fmf b/plans/podman.fmf new file mode 100644 index 00000000..5040c82c --- /dev/null +++ b/plans/podman.fmf @@ -0,0 +1,36 @@ +prepare: + - when: distro == centos-stream or distro == rhel + how: shell + script: bash hack/tmt/bats-setup.sh + order: 10 + - when: initiator == packit + how: shell + script: bash hack/tmt/dnf-repo-setup.sh + +provision: + how: artemis + hardware: + memory: ">= 16 GB" + cpu: + cores: ">= 4" + threads: ">=8" + disk: + - size: ">= 512 GB" + +discover: + how: fmf + url: https://github.com/containers/podman + ref: "main" + +execute: + how: tmt + +/system/root-local: + summary: Run podman system rootful tests + discover+: + test: /test/tmt/system/local-root + +/system/rootless-oocal: + summary: Run podman system rootless tests + discover+: + filter: /test/tmt/system/local-rootless diff --git a/rpm/gating.yaml b/rpm/gating.yaml new file mode 100644 index 00000000..1fb3172f --- /dev/null +++ b/rpm/gating.yaml @@ -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}