From 81b27f4192c72c04e651bd86eb016f075ad68f2f Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Thu, 13 Nov 2025 16:02:03 -0500 Subject: [PATCH 1/4] copier: fix linter warnings Fix a "that doesn't take %w" warning. Fix two "you forgot to pass that error to the formatter" warnings. Signed-off-by: Nalin Dahyabhai (cherry picked from commit 2e2bf30aadb51554e2ac0e8aeaf3af7958bbc98c) Signed-off-by: Lokesh Mandvekar --- copier/copier.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/copier/copier.go b/copier/copier.go index 74825960890..9dee16bf383 100644 --- a/copier/copier.go +++ b/copier/copier.go @@ -1168,7 +1168,7 @@ func copierHandlerStat(req request, pm *fileutils.PatternMatcher, idMappings *id hostPair := idtools.IDPair{UID: uid, GID: gid} uid, gid, err = idMappings.ToContainer(hostPair) if err != nil { - return errorResponse("copier: stat: mapping host filesystem owners %#v to container filesystem owners: %w", hostPair, err) + return errorResponse("copier: stat: mapping host filesystem owners %#v to container filesystem owners: %v", hostPair, err) } } result.UID, result.GID = int64(uid), int64(gid) @@ -2227,7 +2227,7 @@ func copierHandlerMkdir(req request, idMappings *idtools.IDMappings) (*response, return errorResponse("copier: mkdir: error setting owner of %q to %d:%d: %v", path, dirUID, dirGID, err) } if err = chmod(path, dirMode); err != nil { - return errorResponse("copier: mkdir: error setting permissions on %q to 0%o: %v", path, dirMode) + return errorResponse("copier: mkdir: error setting permissions on %q to 0%o: %v", path, dirMode, err) } created = append(created, path) } else { @@ -2409,7 +2409,7 @@ func copierHandlerEnsure(req request, idMappings *idtools.IDMappings) *response return errorResponse("copier: ensure: error setting owner of %q to %d:%d: %v", leaf, uid, gid, err) } if err = chmod(filepath.Join(req.Root, leaf), mode); err != nil { - return errorResponse("copier: ensure: error setting permissions on %q to 0%o: %v", leaf, mode) + return errorResponse("copier: ensure: error setting permissions on %q to 0%o: %v", leaf, mode, err) } if item.ModTime != nil { if err := os.Chtimes(filepath.Join(req.Root, leaf), *item.ModTime, *item.ModTime); err != nil { From f2246699e728c898fb1d032bce2ce4a7b6aa7a12 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Thu, 14 May 2026 13:29:58 -0400 Subject: [PATCH 2/4] Cirrus: remove config Signed-off-by: Lokesh Mandvekar --- .cirrus.yml | 405 ---------------------------------------------------- 1 file changed, 405 deletions(-) delete mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 4db5397ca44..00000000000 --- a/.cirrus.yml +++ /dev/null @@ -1,405 +0,0 @@ ---- - -# Main collection of env. vars to set for all tasks and scripts. -env: - #### - #### Global variables used for all tasks - #### - # Name of the ultimate destination branch for this CI run, PR or post-merge. - DEST_BRANCH: "release-1.41" - GOPATH: "/var/tmp/go" - GOSRC: "${GOPATH}/src/github.com/containers/buildah" - GOCACHE: "/tmp/go-build" - # Overrides default location (/tmp/cirrus) for repo clone - CIRRUS_WORKING_DIR: "${GOSRC}" - # Shell used to execute all script commands - CIRRUS_SHELL: "/bin/bash" - # Automation script path relative to $CIRRUS_WORKING_DIR) - SCRIPT_BASE: "./contrib/cirrus" - # No need to go crazy, but grab enough to cover most PRs - CIRRUS_CLONE_DEPTH: 50 - # Unless set by in_podman.sh, default to operating outside of a podman container - IN_PODMAN: 'false' - # root or rootless - PRIV_NAME: root - # default "mention the $BUILDAH_RUNTIME in the task alias, with initial whitespace" value - RUNTIME_N: "" - - #### - #### Cache-image names to test with - #### - # GCE project where images live - IMAGE_PROJECT: "libpod-218412" - FEDORA_NAME: "fedora-42" - PRIOR_FEDORA_NAME: "fedora-41" - DEBIAN_NAME: "debian-13" - - # Image identifiers - IMAGE_SUFFIX: "c20250910t092246z-f42f41d13" - FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}" - PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}" - DEBIAN_CACHE_IMAGE_NAME: "debian-${IMAGE_SUFFIX}" - - IN_PODMAN_IMAGE: "quay.io/libpod/fedora_podman:${IMAGE_SUFFIX}" - - #### - #### Command variables to help avoid duplication - #### - # Command to prefix every output line with a timestamp - # (can't do inline awk script, Cirrus-CI or YAML mangles quoting) - _TIMESTAMP: 'awk -f ${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/timestamp.awk' - -gcp_credentials: ENCRYPTED[ae0bf7370f0b6e446bc61d0865a2c55d3e166b3fab9466eb0393e38e1c66a31ca4c71ddc7e0139d47d075c36dd6d3fd7] - -# Default timeout for each task -timeout_in: 30m - -# Default VM to use unless set or modified by task -gce_instance: &standardvm - image_project: "${IMAGE_PROJECT}" - zone: "us-central1-c" # Required by Cirrus for the time being - cpu: 2 - memory: "4G" - disk: 200 # Gigabytes, do not set less than 200 per obscure GCE docs re: I/O performance - image_name: "${FEDORA_CACHE_IMAGE_NAME}" - - -# Update metadata on VM images referenced by this repository state -meta_task: - name: "VM img. keepalive" - alias: meta - - container: - image: "quay.io/libpod/imgts:latest" - cpu: 1 - memory: "1G" - - env: - # Space-separated list of images used by this repository state - IMGNAMES: |- - ${FEDORA_CACHE_IMAGE_NAME} - ${PRIOR_FEDORA_CACHE_IMAGE_NAME} - ${DEBIAN_CACHE_IMAGE_NAME} - build-push-${IMAGE_SUFFIX} - BUILDID: "${CIRRUS_BUILD_ID}" - REPOREF: "${CIRRUS_CHANGE_IN_REPO}" - GCPJSON: ENCRYPTED[d3614d6f5cc0e66be89d4252b3365fd84f14eee0259d4eb47e25fc0bc2842c7937f5ee8c882b7e547b4c5ec4b6733b14] - GCPNAME: ENCRYPTED[8509e6a681b859479ce6aa275bd3c4ac82de5beec6df6057925afc4cd85b7ef2e879066ae8baaa2d453b82958e434578] - GCPPROJECT: ENCRYPTED[cc09b62d0ec6746a3df685e663ad25d9d5af95ef5fd843c96f3d0ec9d7f065dc63216b9c685c9f43a776a1d403991494] - - clone_script: 'true' - script: '/usr/local/bin/entrypoint.sh' - - -smoke_task: - alias: 'smoke' - name: "Smoke Test" - - gce_instance: - memory: "12G" - cpu: 8 - - # Don't bother running on branches (including cron), or for tags. - skip: $CIRRUS_PR == '' - - timeout_in: 10m - - setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}' - build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}' - validate_test_script: '${SCRIPT_BASE}/test.sh validate |& ${_TIMESTAMP}' - - binary_artifacts: - path: ./bin/* - -# Check that all included go modules from other sources match -# # what is expected in `vendor/modules.txt` vs `go.mod`. -vendor_task: - name: "Test Vendoring" - alias: vendor - - env: - CIRRUS_WORKING_DIR: "/var/tmp/go/src/github.com/containers/buildah" - GOPATH: "/var/tmp/go" - GOSRC: "/var/tmp/go/src/github.com/containers/buildah" - - # Runs within Cirrus's "community cluster" - container: - image: docker.io/library/golang:1.24.2 - cpu: 1 - memory: 1 - - timeout_in: 5m - - vendor_script: - - './hack/check_vendor_toolchain.sh Try updating the image used by the vendor_task in .cirrus.yml.' - - 'make vendor' - - './hack/tree_status.sh' - - -# Confirm cross-compile ALL architectures on a Mac OS-X VM. -cross_build_task: - name: "Cross Compile" - gce_instance: - cpu: 8 - memory: "24G" - alias: cross_build - skip: >- - $CIRRUS_CHANGE_TITLE =~ '.*CI:DOCS.*' - env: - HOME: /root - script: - - go version - - make -j cross CGO_ENABLED=0 - binary_artifacts: - path: ./bin/* - - -unit_task: - name: 'Unit tests w/ $STORAGE_DRIVER' - gce_instance: - cpu: 4 - alias: unit - skip: ¬_build_docs >- - $CIRRUS_CHANGE_TITLE =~ '.*CI:DOCS.*' || - $CIRRUS_CHANGE_TITLE =~ '.*CI:BUILD.*' - depends_on: &smoke_vendor - - smoke - - vendor - - matrix: - - env: - STORAGE_DRIVER: 'vfs' - - env: - STORAGE_DRIVER: 'overlay' - - setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}' - unit_test_script: '${SCRIPT_BASE}/test.sh unit |& ${_TIMESTAMP}' - - -conformance_task: - name: 'Debian Conformance w/ $STORAGE_DRIVER' - alias: conformance - skip: *not_build_docs - depends_on: *smoke_vendor - - gce_instance: - cpu: 4 - image_name: "${DEBIAN_CACHE_IMAGE_NAME}" - - matrix: - - env: - STORAGE_DRIVER: 'vfs' - TMPDIR: '/var/tmp' - - env: - STORAGE_DRIVER: 'overlay' - - setup_script: '${SCRIPT_BASE}/setup.sh conformance |& ${_TIMESTAMP}' - conformance_test_script: '${SCRIPT_BASE}/test.sh conformance |& ${_TIMESTAMP}' - - -integration_task: - name: "Integration $DISTRO_NV$RUNTIME_N w/ $STORAGE_DRIVER" - alias: integration - skip: *not_build_docs - depends_on: *smoke_vendor - - matrix: - # VFS - - env: - DISTRO_NV: "${FEDORA_NAME}" - IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'vfs' - BUILDAH_RUNTIME: crun - RUNTIME_N: " using crun" - - env: - DISTRO_NV: "${FEDORA_NAME}" - IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'vfs' - BUILDAH_RUNTIME: runc - RUNTIME_N: " using runc" - - env: - DISTRO_NV: "${PRIOR_FEDORA_NAME}" - IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'vfs' - BUILDAH_RUNTIME: crun - RUNTIME_N: " using crun" - - env: - DISTRO_NV: "${PRIOR_FEDORA_NAME}" - IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'vfs' - BUILDAH_RUNTIME: runc - RUNTIME_N: " using runc" - - env: - DISTRO_NV: "${DEBIAN_NAME}" - IMAGE_NAME: "${DEBIAN_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'vfs' - # OVERLAY - - env: - DISTRO_NV: "${FEDORA_NAME}" - IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'overlay' - BUILDAH_RUNTIME: crun - RUNTIME_N: " using crun" - - env: - DISTRO_NV: "${FEDORA_NAME}" - IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'overlay' - BUILDAH_RUNTIME: runc - RUNTIME_N: " using runc" - - env: - DISTRO_NV: "${PRIOR_FEDORA_NAME}" - IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'overlay' - BUILDAH_RUNTIME: crun - RUNTIME_N: " using crun" - - env: - DISTRO_NV: "${PRIOR_FEDORA_NAME}" - IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'overlay' - BUILDAH_RUNTIME: runc - RUNTIME_N: " using runc" - - env: - DISTRO_NV: "${DEBIAN_NAME}" - IMAGE_NAME: "${DEBIAN_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'overlay' - - gce_instance: - image_name: "$IMAGE_NAME" - cpu: 8 - memory: "8G" - - # Separate scripts for separate outputs, makes debugging easier. - setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}' - build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}' - integration_test_script: '${SCRIPT_BASE}/test.sh integration |& ${_TIMESTAMP}' - - binary_artifacts: - path: ./bin/* - - always: &standardlogs - audit_log_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh audit' - df_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh df' - journal_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh journal' - podman_system_info_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh podman' - buildah_version_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh buildah_version' - buildah_info_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh buildah_info' - package_versions_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh packages' - golang_version_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh golang' - -integration_rootless_task: - name: "Integration rootless $DISTRO_NV$RUNTIME_N w/ $STORAGE_DRIVER" - alias: integration_rootless - skip: *not_build_docs - depends_on: *smoke_vendor - - matrix: - # Running rootless tests on overlay - # OVERLAY - - env: - DISTRO_NV: "${FEDORA_NAME}" - IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'overlay' - PRIV_NAME: rootless - BUILDAH_RUNTIME: runc - RUNTIME_N: " using runc" - - env: - DISTRO_NV: "${FEDORA_NAME}" - IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'overlay' - PRIV_NAME: rootless - BUILDAH_RUNTIME: crun - RUNTIME_N: " using crun" - - env: - DISTRO_NV: "${PRIOR_FEDORA_NAME}" - IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'overlay' - PRIV_NAME: rootless - BUILDAH_RUNTIME: runc - RUNTIME_N: " using runc" - - env: - DISTRO_NV: "${PRIOR_FEDORA_NAME}" - IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'overlay' - PRIV_NAME: rootless - BUILDAH_RUNTIME: crun - RUNTIME_N: " using crun" - - env: - DISTRO_NV: "${DEBIAN_NAME}" - IMAGE_NAME: "${DEBIAN_CACHE_IMAGE_NAME}" - STORAGE_DRIVER: 'overlay' - PRIV_NAME: rootless - - gce_instance: - image_name: "$IMAGE_NAME" - cpu: 8 - memory: "8G" - - # Separate scripts for separate outputs, makes debugging easier. - setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}' - build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}' - integration_test_script: '${SCRIPT_BASE}/test.sh integration |& ${_TIMESTAMP}' - - binary_artifacts: - path: ./bin/* - - always: - <<: *standardlogs - -in_podman_task: - name: "Containerized Integration" - alias: in_podman - skip: *not_build_docs - depends_on: *smoke_vendor - - gce_instance: - cpu: 8 - memory: "8G" - - env: - # This is key, cause the scripts to re-execute themselves inside a container. - IN_PODMAN: 'true' - BUILDAH_ISOLATION: 'chroot' - STORAGE_DRIVER: 'vfs' - - # Separate scripts for separate outputs, makes debugging easier. - setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}' - build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}' - integration_test_script: '${SCRIPT_BASE}/test.sh integration |& ${_TIMESTAMP}' - - binary_artifacts: - path: ./bin/* - - always: - <<: *standardlogs - - -# Status aggregator for all tests. This task simply ensures a defined -# set of tasks all passed, and allows confirming that based on the status -# of this task. -success_task: - # N/B: The prow merge-bot (tide) is sensitized to this exact name, DO NOT CHANGE IT. - # Ref: https://github.com/openshift/release/pull/48909 - name: "Total Success" - alias: success - - depends_on: - - meta - - smoke - - unit - - conformance - - vendor - - cross_build - - integration - - integration_rootless - - in_podman - - container: - image: "quay.io/libpod/alpine:latest" - cpu: 1 - memory: 1 - - env: - CIRRUS_SHELL: direct # execute command directly - - clone_script: mkdir -p $CIRRUS_WORKING_DIR - script: /bin/true From abc74adb582ddf6e3664ba7ec81aa57e16a41200 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Thu, 14 May 2026 11:48:49 -0400 Subject: [PATCH 3/4] tmt/packit: Configure RHEL 9/10 testing infrastructure - Simplify TMT plan configuration - Require bats for system tests - Limit Packit jobs to RHEL 9 and RHEL 10 (this branch targets those releases) - Add separate unit tests job - Add smoke, vendor, cross, rootless, and in-podman test definitions - Configure all jobs to use internal Testing Farm with RHEL 9/10 Nightly Signed-off-by: Lokesh Mandvekar --- .packit.yaml | 202 +++++++++++++++++----------------------- plans/main.fmf | 49 +++++++--- tests/tmt/cross.fmf | 12 +++ tests/tmt/in-podman.fmf | 27 ++++++ tests/tmt/rootless.fmf | 33 +++++++ tests/tmt/smoke.fmf | 16 ++++ tests/tmt/system.fmf | 3 +- tests/tmt/unit.fmf | 17 ++++ tests/tmt/vendor.fmf | 31 ++++++ 9 files changed, 258 insertions(+), 132 deletions(-) create mode 100644 tests/tmt/cross.fmf create mode 100644 tests/tmt/in-podman.fmf create mode 100644 tests/tmt/rootless.fmf create mode 100644 tests/tmt/smoke.fmf create mode 100644 tests/tmt/unit.fmf create mode 100644 tests/tmt/vendor.fmf diff --git a/.packit.yaml b/.packit.yaml index 032e9e13f16..df4bd361d88 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -5,36 +5,10 @@ downstream_package_name: buildah 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: tests/tmt/ - dest: tests/tmt/ - delete: true - mkpath: true - - src: .fmf/ - dest: .fmf/ - delete: true - - .packit.yaml +specfile_path: rpm/buildah.spec -packages: - buildah-fedora: - pkg_tool: fedpkg - specfile_path: rpm/buildah.spec - buildah-centos: - pkg_tool: centpkg - specfile_path: rpm/buildah.spec - buildah-eln: - specfile_path: rpm/buildah.spec +# Disable automatic merging for Copr builds (and subsequent Testing Farm) +merge_pr_in_ci: false srpm_build_deps: - make @@ -42,108 +16,102 @@ srpm_build_deps: jobs: - job: copr_build trigger: pull_request - packages: [buildah-fedora] - notifications: &copr_build_failure_notification + notifications: failure_comment: - message: "Ephemeral COPR build failed. @containers/packit-build please check." - # Fedora aliases documentation: https://packit.dev/docs/configuration#aliases - # python3-fedora-distro-aliases provides `resolve-fedora-aliases` command - targets: &fedora_copr_targets - - fedora-all-x86_64 - - fedora-all-aarch64 - enable_net: true - # Disable osh diff scan until Go support is available - # Ref: https://github.com/openscanhub/known-false-positives/pull/30#issuecomment-2858698495 - osh_diff_scan_after_copr_build: false - - # Ignore until golang is updated in distro buildroot to 1.23.3+ - - job: copr_build - trigger: ignore - packages: [buildah-eln] - notifications: *copr_build_failure_notification + message: "Packit jobs failed. @containers/packit-build please check." targets: - fedora-eln-x86_64: - additional_repos: - - "https://kojipkgs.fedoraproject.org/repos/eln-build/latest/x86_64/" - fedora-eln-aarch64: - additional_repos: - - "https://kojipkgs.fedoraproject.org/repos/eln-build/latest/aarch64/" + - epel-9-x86_64 + - epel-9-aarch64 + - epel-10-x86_64 + - epel-10-aarch64 enable_net: true - # Ignore until golang is updated in distro buildroot to 1.23.3+ - - job: copr_build - trigger: ignore - packages: [buildah-centos] - notifications: *copr_build_failure_notification - targets: ¢os_copr_targets - - centos-stream-9-x86_64 - - centos-stream-9-aarch64 - - centos-stream-10-x86_64 - - centos-stream-10-aarch64 - enable_net: true + # System tests on RHEL 9 and RHEL 10 using internal Testing Farm ranch + - job: tests + trigger: pull_request + identifier: integration-tests + use_internal_tf: true + targets: &rhel_targets + epel-9-x86_64: + distros: [RHEL-9-Nightly] + epel-10-x86_64: &rhel10_target + distros: [RHEL-10-Nightly] + tf_extra_params: + test: + tmt: + name: ^/plans/integration$ - # Run on commit to main branch - - job: copr_build - trigger: commit - packages: [buildah-fedora] - notifications: - failure_comment: - message: "podman-next COPR build failed. @containers/packit-build please check." - branch: main - owner: rhcontainerbot - project: podman-next - enable_net: true + # Unit tests on RHEL 9 and RHEL 10 using internal Testing Farm ranch + - job: tests + trigger: pull_request + identifier: unit-tests + use_internal_tf: true + skip_build: true + targets: *rhel_targets + tf_extra_params: + test: + tmt: + name: ^/plans/unit$ - # Tests on Fedora for main branch PRs + # Smoke tests (build and validation) on RHEL 10 only - job: tests trigger: pull_request - packages: [buildah-fedora] + identifier: smoke-tests + use_internal_tf: true + skip_build: true targets: - - fedora-all-x86_64 + epel-10-x86_64: *rhel10_target 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 + test: + tmt: + name: ^/plans/smoke$ - # Ignore until golang is updated in distro buildroot to 1.23.3+ - # Tests on CentOS Stream for main branch PRs + # Vendor tests on RHEL 10 only - job: tests - trigger: ignore - packages: [buildah-centos] + trigger: pull_request + identifier: vendor-tests + use_internal_tf: true + skip_build: true targets: - - centos-stream-9-x86_64 - - centos-stream-10-x86_64 + epel-10-x86_64: *rhel10_target tf_extra_params: - environments: - - artifacts: - - type: repository-file - id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/centos-stream-$releasever/rhcontainerbot-podman-next-centos-stream-$releasever.repo + test: + tmt: + name: ^/plans/vendor$ - # Sync to Fedora - - job: propose_downstream - trigger: release - packages: [buildah-fedora] - update_release: false - dist_git_branches: &fedora_targets - - fedora-all + # Cross-compile tests on RHEL 10 only + - job: tests + trigger: pull_request + identifier: cross-compile + use_internal_tf: true + skip_build: true + targets: + epel-10-x86_64: *rhel10_target + tf_extra_params: + test: + tmt: + name: ^/plans/cross$ - # Sync to CentOS Stream - - job: propose_downstream - trigger: release - packages: [buildah-centos] - update_release: false - dist_git_branches: - - c10s + # Rootless integration tests on RHEL 9 and RHEL 10 + - job: tests + trigger: pull_request + identifier: rootless-tests + use_internal_tf: true + targets: *rhel_targets + tf_extra_params: + test: + tmt: + name: ^/plans/rootless$ - # Fedora Koji build - - job: koji_build - trigger: commit - packages: [buildah-fedora] - sidetag_group: podman-releases - # Dependents are not rpm dependencies, but the package whose bodhi update - # should include this package. - # Ref: https://packit.dev/docs/fedora-releases-guide/releasing-multiple-packages - dependents: - - podman - dist_git_branches: *fedora_targets + # Containerized integration tests on RHEL 10 only + - job: tests + trigger: pull_request + identifier: in-podman-tests + use_internal_tf: true + skip_build: true + targets: + epel-10-x86_64: *rhel10_target + tf_extra_params: + test: + tmt: + name: ^/plans/in-podman$ diff --git a/plans/main.fmf b/plans/main.fmf index b982e76db2a..cd9ec97ff21 100644 --- a/plans/main.fmf +++ b/plans/main.fmf @@ -5,21 +5,9 @@ execute: how: tmt prepare: - - when: distro == centos-stream or distro == rhel - how: shell - script: | - dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm --eval '%{?rhel}').noarch.rpm - dnf -y config-manager --set-enabled epel + - how: feature + epel: enabled order: 10 - - when: initiator == packit - how: shell - script: | - COPR_REPO_FILE="/etc/yum.repos.d/*podman-next*.repo" - if compgen -G $COPR_REPO_FILE > /dev/null; then - sed -i -n '/^priority=/!p;$apriority=1' $COPR_REPO_FILE - fi - dnf -y upgrade --allowerasing - order: 20 provision: how: artemis @@ -31,4 +19,37 @@ provision: disk: - size: ">= 512 GB" +/integration: + summary: System integration tests + discover+: + test: /tests/tmt/system +/unit: + summary: Unit tests + discover+: + test: /tests/tmt/unit + +/smoke: + summary: Smoke tests (build and validation) + discover+: + test: /tests/tmt/smoke + +/vendor: + summary: Vendor dependency tests + discover+: + test: /tests/tmt/vendor + +/cross: + summary: Cross-compile tests + discover+: + test: /tests/tmt/cross + +/rootless: + summary: Rootless integration tests + discover+: + test: /tests/tmt/rootless + +/in-podman: + summary: Containerized integration tests + discover+: + test: /tests/tmt/in-podman diff --git a/tests/tmt/cross.fmf b/tests/tmt/cross.fmf new file mode 100644 index 00000000000..8a013b2890e --- /dev/null +++ b/tests/tmt/cross.fmf @@ -0,0 +1,12 @@ +require: + - git + - golang + - make + +summary: Cross-compile for non-x86_64/aarch64 architectures +test: | + cd $(git rev-parse --show-toplevel) + # Cross-compile for architectures other than x86_64 and aarch64 + # This tests ppc64le, s390x, riscv64, arm, mips*, etc. + make -j cross CGO_ENABLED=0 +duration: 30m diff --git a/tests/tmt/in-podman.fmf b/tests/tmt/in-podman.fmf new file mode 100644 index 00000000000..83d95f4b5a0 --- /dev/null +++ b/tests/tmt/in-podman.fmf @@ -0,0 +1,27 @@ +require: + - git + - golang + - make + - podman + +summary: Containerized integration tests inside podman +test: | + cd $(git rev-parse --show-toplevel) + + # Run integration tests inside a podman container + # using buildah's chroot isolation and vfs storage + # The container will build buildah from source + podman run --rm \ + --privileged \ + -v $(pwd):$(pwd):Z \ + -w $(pwd) \ + -e BUILDAH_ISOLATION=chroot \ + -e STORAGE_DRIVER=vfs \ + registry.fedoraproject.org/fedora:latest \ + bash -c " + dnf install -y make golang bats buildah-tests containers-common git netavark skopeo + make + make install.tools + make test-integration + " +duration: 90m diff --git a/tests/tmt/rootless.fmf b/tests/tmt/rootless.fmf new file mode 100644 index 00000000000..be8a2191cda --- /dev/null +++ b/tests/tmt/rootless.fmf @@ -0,0 +1,33 @@ +require: + - bats + - buildah-tests + - containers-common + - crun + - git + - netavark + - skopeo + +summary: Rootless integration tests +test: | + cd $(git rev-parse --show-toplevel) + + # Create rootless test user if it doesn't exist + if ! id testuser >/dev/null 2>&1; then + useradd -m testuser + # Allow rootless user to run podman/buildah + echo "testuser:100000:65536" >> /etc/subuid + echo "testuser:100000:65536" >> /etc/subgid + fi + + # Set up rootless environment + export STORAGE_DRIVER=overlay + export BUILDAH_RUNTIME=crun + + # Run integration tests as rootless user + su - testuser -c " + cd $(git rev-parse --show-toplevel) + export STORAGE_DRIVER=overlay + export BUILDAH_RUNTIME=crun + make test-integration + " +duration: 90m diff --git a/tests/tmt/smoke.fmf b/tests/tmt/smoke.fmf new file mode 100644 index 00000000000..b9d5bfbd59e --- /dev/null +++ b/tests/tmt/smoke.fmf @@ -0,0 +1,16 @@ +require: + - git + - golang + - make + +summary: Smoke tests (build and validation) +test: | + cd $(git rev-parse --show-toplevel) + make + make install.tools + # Validation requires git remote setup + git remote add upstream https://github.com/containers/buildah || true + git remote update + make lint LINTFLAGS="--timeout=20m --color=always -j1" + make validate +duration: 15m diff --git a/tests/tmt/system.fmf b/tests/tmt/system.fmf index eb6b766f04e..5bf9263feb9 100644 --- a/tests/tmt/system.fmf +++ b/tests/tmt/system.fmf @@ -1,4 +1,5 @@ require: + - bats - buildah-tests - git-daemon - slirp4netns @@ -18,7 +19,7 @@ adjust: environment+: RELEASE_TESTING: true -/local/root: +/root: summary: System test test: bash ./system.sh duration: 60m diff --git a/tests/tmt/unit.fmf b/tests/tmt/unit.fmf new file mode 100644 index 00000000000..8eecdb005e7 --- /dev/null +++ b/tests/tmt/unit.fmf @@ -0,0 +1,17 @@ +require: + - git + - glibc-static + - golang + - make + - btrfs-progs-devel + - containers-common + - device-mapper-devel + - gpgme-devel + - libassuan-devel + - libseccomp-devel + - netavark + - systemd-devel + +summary: Unit tests +test: cd $(git rev-parse --show-toplevel) && make test-unit +duration: 90m diff --git a/tests/tmt/vendor.fmf b/tests/tmt/vendor.fmf new file mode 100644 index 00000000000..4fdaeca263d --- /dev/null +++ b/tests/tmt/vendor.fmf @@ -0,0 +1,31 @@ +require: + - git + - golang + - make + - curl + - tar + +summary: Test vendoring +test: | + cd $(git rev-parse --show-toplevel) + + # Install Go 1.24.0 if system Go doesn't match go.mod requirement + # go.mod requires Go 1.24.0, but RHEL 10 ships Go 1.26.2 + REQUIRED_GO_VERSION=$(sed -n 's/^go \(.*\)/\1/p' go.mod) + CURRENT_GO_VERSION=$(go version | awk '{print $3}' | sed 's/go//') + + if [ "${REQUIRED_GO_VERSION%.*}" != "${CURRENT_GO_VERSION%.*}" ]; then + echo "Installing Go ${REQUIRED_GO_VERSION} to match go.mod requirement..." + cd /tmp + curl -LO https://go.dev/dl/go${REQUIRED_GO_VERSION}.linux-amd64.tar.gz + tar -xzf go${REQUIRED_GO_VERSION}.linux-amd64.tar.gz + export PATH=/tmp/go/bin:$PATH + export GOROOT=/tmp/go + go version + cd - + fi + + ./hack/check_vendor_toolchain.sh + make vendor + ./hack/tree_status.sh +duration: 15m From ca3218d289495c4218148ed179eaed99a8b39d26 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Thu, 14 May 2026 11:49:31 -0400 Subject: [PATCH 4/4] tmt: Consolidate all tests into single main.fmf Consolidate all test definitions into tests/tmt/main.fmf for easier maintenance. Use TMT's built-in $TMT_TREE variable, add smoke test build dependencies, skip vendor Go version check, increase in-podman timeout to 3h, sync git repository to guests, and archive audit/journal logs after test execution. Signed-off-by: Lokesh Mandvekar --- .packit.yaml | 6 +- hack/tree_status.sh | 3 +- plans/main.fmf | 37 ++++-- tests/tmt/cross.fmf | 12 -- tests/tmt/in-podman.fmf | 27 ---- tests/tmt/main.fmf | 166 +++++++++++++++++++++++++ tests/tmt/rootless.fmf | 33 ----- tests/tmt/smoke.fmf | 16 --- tests/tmt/system.fmf | 25 ---- tests/tmt/system.sh | 18 --- tests/tmt/unit.fmf | 17 --- tests/tmt/vendor.fmf | 31 ----- tests/validate/pr-should-include-tests | 7 +- 13 files changed, 204 insertions(+), 194 deletions(-) delete mode 100644 tests/tmt/cross.fmf delete mode 100644 tests/tmt/in-podman.fmf create mode 100644 tests/tmt/main.fmf delete mode 100644 tests/tmt/rootless.fmf delete mode 100644 tests/tmt/smoke.fmf delete mode 100644 tests/tmt/system.fmf delete mode 100644 tests/tmt/system.sh delete mode 100644 tests/tmt/unit.fmf delete mode 100644 tests/tmt/vendor.fmf diff --git a/.packit.yaml b/.packit.yaml index df4bd361d88..b5bf5352f09 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -26,7 +26,7 @@ jobs: - epel-10-aarch64 enable_net: true - # System tests on RHEL 9 and RHEL 10 using internal Testing Farm ranch + # Rootful integration tests on RHEL 9 and RHEL 10 using internal Testing Farm ranch - job: tests trigger: pull_request identifier: integration-tests @@ -39,7 +39,7 @@ jobs: tf_extra_params: test: tmt: - name: ^/plans/integration$ + name: ^/plans/root-integration$ # Unit tests on RHEL 9 and RHEL 10 using internal Testing Farm ranch - job: tests @@ -101,7 +101,7 @@ jobs: tf_extra_params: test: tmt: - name: ^/plans/rootless$ + name: ^/plans/rootless-integration$ # Containerized integration tests on RHEL 10 only - job: tests diff --git a/hack/tree_status.sh b/hack/tree_status.sh index 11c9d6c786e..6c2168e59db 100755 --- a/hack/tree_status.sh +++ b/hack/tree_status.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash set -e -STATUS=$(git status --porcelain) +# Check only tracked files (ignore untracked files like build artifacts) +STATUS=$(git status --porcelain | grep -v '^??' || true) if [[ -z $STATUS ]] then echo "tree is clean" diff --git a/plans/main.fmf b/plans/main.fmf index cd9ec97ff21..14b0291a7c1 100644 --- a/plans/main.fmf +++ b/plans/main.fmf @@ -1,5 +1,6 @@ discover: how: fmf + sync-repo: true execute: how: tmt @@ -19,10 +20,35 @@ provision: disk: - size: ">= 512 GB" -/integration: - summary: System integration tests +finish: + how: shell + script: | + # Archive logs to TMT_PLAN_DATA for post-test analysis + mkdir -p "$TMT_PLAN_DATA/logs" + + # Copy audit logs (SELinux denials, audit events) + if [ -f /var/log/audit/audit.log ]; then + cp /var/log/audit/audit.log "$TMT_PLAN_DATA/logs/" + echo "Audit logs copied to $TMT_PLAN_DATA/logs/audit.log" + else + echo "No audit log found at /var/log/audit/audit.log" + fi + + # Capture full journal (current boot only) + journalctl -b --no-pager --all --output=short-precise &> "$TMT_PLAN_DATA/logs/journal.log" + echo "Journal output saved to $TMT_PLAN_DATA/logs/journal.log" + + echo "All logs archived to $TMT_PLAN_DATA/logs/" + +/root-integration: + summary: Rootful system integration tests discover+: - test: /tests/tmt/system + test: /tests/tmt/integration/root + +/rootless-integration: + summary: Rootless system integration tests + discover+: + test: /tests/tmt/integration/rootless /unit: summary: Unit tests @@ -44,11 +70,6 @@ provision: discover+: test: /tests/tmt/cross -/rootless: - summary: Rootless integration tests - discover+: - test: /tests/tmt/rootless - /in-podman: summary: Containerized integration tests discover+: diff --git a/tests/tmt/cross.fmf b/tests/tmt/cross.fmf deleted file mode 100644 index 8a013b2890e..00000000000 --- a/tests/tmt/cross.fmf +++ /dev/null @@ -1,12 +0,0 @@ -require: - - git - - golang - - make - -summary: Cross-compile for non-x86_64/aarch64 architectures -test: | - cd $(git rev-parse --show-toplevel) - # Cross-compile for architectures other than x86_64 and aarch64 - # This tests ppc64le, s390x, riscv64, arm, mips*, etc. - make -j cross CGO_ENABLED=0 -duration: 30m diff --git a/tests/tmt/in-podman.fmf b/tests/tmt/in-podman.fmf deleted file mode 100644 index 83d95f4b5a0..00000000000 --- a/tests/tmt/in-podman.fmf +++ /dev/null @@ -1,27 +0,0 @@ -require: - - git - - golang - - make - - podman - -summary: Containerized integration tests inside podman -test: | - cd $(git rev-parse --show-toplevel) - - # Run integration tests inside a podman container - # using buildah's chroot isolation and vfs storage - # The container will build buildah from source - podman run --rm \ - --privileged \ - -v $(pwd):$(pwd):Z \ - -w $(pwd) \ - -e BUILDAH_ISOLATION=chroot \ - -e STORAGE_DRIVER=vfs \ - registry.fedoraproject.org/fedora:latest \ - bash -c " - dnf install -y make golang bats buildah-tests containers-common git netavark skopeo - make - make install.tools - make test-integration - " -duration: 90m diff --git a/tests/tmt/main.fmf b/tests/tmt/main.fmf new file mode 100644 index 00000000000..1281908da0e --- /dev/null +++ b/tests/tmt/main.fmf @@ -0,0 +1,166 @@ +# Integration tests (rootful and rootless) +/integration: + require: + - bats + - buildah-tests + - git-daemon + - slirp4netns + + environment+: + BUILDAH_BINARY: /usr/bin/buildah + IMGTYPE_BINARY: /usr/bin/buildah-imgtype + INET_BINARY: /usr/bin/buildah-inet + COPY_BINARY: /usr/bin/buildah-copy + TUTORIAL_BINARY: /usr/bin/buildah-tutorial + DUMPSPEC_BINARY: /usr/bin/buildah-dumpspec + PASSWD_BINARY: /usr/bin/buildah-passwd + TMPDIR: /var/tmp + ROOTLESS_USER: cloud-user + + adjust: + - when: initiator != "packit" + environment+: + RELEASE_TESTING: true + + /root: + summary: Rootful integration test + test: | + set -exo pipefail + + # Show kernel version + uname -r + + # Show package versions + rpm -q \ + aardvark-dns \ + buildah \ + buildah-tests \ + conmon \ + container-selinux \ + containers-common \ + crun \ + netavark \ + systemd + + # Run bats system tests + bats /usr/share/buildah/test/system + duration: 60m + + /rootless: + summary: Rootless integration test + test: | + # Run bats tests as rootless user + su - "$ROOTLESS_USER" -c " + export BUILDAH_BINARY=/usr/bin/buildah + export STORAGE_DRIVER=overlay + export BUILDAH_RUNTIME=crun + export TMPDIR=/var/tmp + bats /usr/share/buildah/test/system + " + duration: 90m + +# Unit tests +/unit: + require: + - git + - glibc-static + - golang + - make + - btrfs-progs-devel + - containers-common + - device-mapper-devel + - gpgme-devel + - libassuan-devel + - libseccomp-devel + - netavark + - systemd-devel + + summary: Unit tests + test: cd "$TMT_TREE" && make test-unit + duration: 90m + +# Smoke tests (build and validation) +/smoke: + require: + - git + - golang + - make + - btrfs-progs-devel + - device-mapper-devel + - gpgme-devel + - libassuan-devel + - libseccomp-devel + - systemd-devel + + summary: Smoke tests (build and validation) + test: | + cd "$TMT_TREE" + make + make install.tools + # Validation requires git remote setup + git remote add upstream https://github.com/containers/buildah || true + git remote update + make lint LINTFLAGS="--timeout=20m --color=always -j1" + make validate + duration: 15m + +# Vendor dependency tests +/vendor: + require: + - git + - golang + - make + + summary: Test vendoring + test: | + cd "$TMT_TREE" + # Skip Go version check - RHEL may have newer Go than go.mod specifies + # ./hack/check_vendor_toolchain.sh + make vendor + ./hack/tree_status.sh + duration: 10m + +# Cross-compile tests +/cross: + require: + - git + - golang + - make + + summary: Cross-compile for non-x86_64/aarch64 architectures + test: | + cd "$TMT_TREE" + # Cross-compile for architectures other than x86_64 and aarch64 + # This tests ppc64le, s390x, riscv64, arm, mips*, etc. + make -j cross CGO_ENABLED=0 + duration: 30m + +# Containerized integration tests +/in-podman: + require: + - git + - golang + - make + - podman + + summary: Containerized integration tests inside podman + test: | + cd "$TMT_TREE" + + # Run integration tests inside a podman container + # using buildah's chroot isolation and vfs storage + # The container will build buildah from source + podman run --rm \ + --privileged \ + -v $(pwd):$(pwd):Z \ + -w $(pwd) \ + -e BUILDAH_ISOLATION=chroot \ + -e STORAGE_DRIVER=vfs \ + registry.fedoraproject.org/fedora:latest \ + bash -c " + dnf install -y make golang bats buildah-tests containers-common git netavark skopeo + make + make install.tools + make test-integration + " + duration: 3h diff --git a/tests/tmt/rootless.fmf b/tests/tmt/rootless.fmf deleted file mode 100644 index be8a2191cda..00000000000 --- a/tests/tmt/rootless.fmf +++ /dev/null @@ -1,33 +0,0 @@ -require: - - bats - - buildah-tests - - containers-common - - crun - - git - - netavark - - skopeo - -summary: Rootless integration tests -test: | - cd $(git rev-parse --show-toplevel) - - # Create rootless test user if it doesn't exist - if ! id testuser >/dev/null 2>&1; then - useradd -m testuser - # Allow rootless user to run podman/buildah - echo "testuser:100000:65536" >> /etc/subuid - echo "testuser:100000:65536" >> /etc/subgid - fi - - # Set up rootless environment - export STORAGE_DRIVER=overlay - export BUILDAH_RUNTIME=crun - - # Run integration tests as rootless user - su - testuser -c " - cd $(git rev-parse --show-toplevel) - export STORAGE_DRIVER=overlay - export BUILDAH_RUNTIME=crun - make test-integration - " -duration: 90m diff --git a/tests/tmt/smoke.fmf b/tests/tmt/smoke.fmf deleted file mode 100644 index b9d5bfbd59e..00000000000 --- a/tests/tmt/smoke.fmf +++ /dev/null @@ -1,16 +0,0 @@ -require: - - git - - golang - - make - -summary: Smoke tests (build and validation) -test: | - cd $(git rev-parse --show-toplevel) - make - make install.tools - # Validation requires git remote setup - git remote add upstream https://github.com/containers/buildah || true - git remote update - make lint LINTFLAGS="--timeout=20m --color=always -j1" - make validate -duration: 15m diff --git a/tests/tmt/system.fmf b/tests/tmt/system.fmf deleted file mode 100644 index 5bf9263feb9..00000000000 --- a/tests/tmt/system.fmf +++ /dev/null @@ -1,25 +0,0 @@ -require: - - bats - - buildah-tests - - git-daemon - - slirp4netns - -environment: - BUILDAH_BINARY: /usr/bin/buildah - IMGTYPE_BINARY: /usr/bin/buildah-imgtype - INET_BINARY: /usr/bin/buildah-inet - COPY_BINARY: /usr/bin/buildah-copy - TUTORIAL_BINARY: /usr/bin/buildah-tutorial - DUMPSPEC_BINARY: /usr/bin/buildah-dumpspec - PASSWD_BINARY: /usr/bin/buildah-passwd - TMPDIR: /var/tmp - -adjust: - - when: initiator != "packit" - environment+: - RELEASE_TESTING: true - -/root: - summary: System test - test: bash ./system.sh - duration: 60m diff --git a/tests/tmt/system.sh b/tests/tmt/system.sh deleted file mode 100644 index 73553aafd86..00000000000 --- a/tests/tmt/system.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -set -exo pipefail - -uname -r - -rpm -q \ - aardvark-dns \ - buildah \ - buildah-tests \ - conmon \ - container-selinux \ - containers-common \ - crun \ - netavark \ - systemd - -bats /usr/share/buildah/test/system diff --git a/tests/tmt/unit.fmf b/tests/tmt/unit.fmf deleted file mode 100644 index 8eecdb005e7..00000000000 --- a/tests/tmt/unit.fmf +++ /dev/null @@ -1,17 +0,0 @@ -require: - - git - - glibc-static - - golang - - make - - btrfs-progs-devel - - containers-common - - device-mapper-devel - - gpgme-devel - - libassuan-devel - - libseccomp-devel - - netavark - - systemd-devel - -summary: Unit tests -test: cd $(git rev-parse --show-toplevel) && make test-unit -duration: 90m diff --git a/tests/tmt/vendor.fmf b/tests/tmt/vendor.fmf deleted file mode 100644 index 4fdaeca263d..00000000000 --- a/tests/tmt/vendor.fmf +++ /dev/null @@ -1,31 +0,0 @@ -require: - - git - - golang - - make - - curl - - tar - -summary: Test vendoring -test: | - cd $(git rev-parse --show-toplevel) - - # Install Go 1.24.0 if system Go doesn't match go.mod requirement - # go.mod requires Go 1.24.0, but RHEL 10 ships Go 1.26.2 - REQUIRED_GO_VERSION=$(sed -n 's/^go \(.*\)/\1/p' go.mod) - CURRENT_GO_VERSION=$(go version | awk '{print $3}' | sed 's/go//') - - if [ "${REQUIRED_GO_VERSION%.*}" != "${CURRENT_GO_VERSION%.*}" ]; then - echo "Installing Go ${REQUIRED_GO_VERSION} to match go.mod requirement..." - cd /tmp - curl -LO https://go.dev/dl/go${REQUIRED_GO_VERSION}.linux-amd64.tar.gz - tar -xzf go${REQUIRED_GO_VERSION}.linux-amd64.tar.gz - export PATH=/tmp/go/bin:$PATH - export GOROOT=/tmp/go - go version - cd - - fi - - ./hack/check_vendor_toolchain.sh - make vendor - ./hack/tree_status.sh -duration: 15m diff --git a/tests/validate/pr-should-include-tests b/tests/validate/pr-should-include-tests index 80177a11ef3..11cb743eec2 100755 --- a/tests/validate/pr-should-include-tests +++ b/tests/validate/pr-should-include-tests @@ -61,13 +61,14 @@ if [[ -z "$filtered_changes" ]]; then fi # Nope. Only allow if the github 'no-tests-needed' label is set +# Skip this check if we're not in Cirrus CI (e.g., Testing Farm, Packit) if [[ -z "$CIRRUS_PR" ]]; then - echo "$ME: cannot query github: \$CIRRUS_PR is undefined" >&2 - exit 1 + echo "$ME: not running in Cirrus CI, skipping GitHub label check" >&2 + exit 0 fi if [[ -z "$CIRRUS_REPO_CLONE_TOKEN" ]]; then echo "$ME: cannot query github: \$CIRRUS_REPO_CLONE_TOKEN is undefined" >&2 - exit 1 + exit 0 fi query="{