From 201a16502eef07be4bfc365718c3da34dd9a6850 Mon Sep 17 00:00:00 2001 From: Xiaofeng Wang Date: Sun, 12 Oct 2025 22:27:57 +0800 Subject: [PATCH] test: Update test to sync with Fedora CI gating According to https://src.fedoraproject.org/rpms/bootc/pull-request/59# Signed-off-by: Xiaofeng Wang --- hack/Containerfile.packit | 6 ------ hack/provision-packit.sh | 14 +------------- tmt/plans/integration.fmf | 4 ++++ 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/hack/Containerfile.packit b/hack/Containerfile.packit index efecf1357..a4c006efe 100644 --- a/hack/Containerfile.packit +++ b/hack/Containerfile.packit @@ -23,12 +23,6 @@ cp test-artifacts.repo /etc/yum.repos.d/ dnf -y update bootc ./provision-derived.sh -if [[ "$GATING" == true ]]; then - # Install Fedora CI/OSCI required packages for "Prepare dist-git sources" task - dnf install -y rpm-build @buildsys-build 'dnf-command(builddep)' - dnf builddep -y /var/share/test-artifacts/*.src.rpm -fi - # For test-22-logically-bound-install cp -a lbi/usr/. /usr for x in curl.container curl-base.image podman.image; do diff --git a/hack/provision-packit.sh b/hack/provision-packit.sh index 07f14742c..b459067eb 100755 --- a/hack/provision-packit.sh +++ b/hack/provision-packit.sh @@ -70,18 +70,6 @@ REPOEOF cp "${BOOTC_TEMPDIR}/rhel.repo" /etc/yum.repos.d fi -# Fedora CI: https://github.com/fedora-ci/dist-git-pipeline/blob/master/Jenkinsfile#L145 -# OSCI: https://gitlab.cee.redhat.com/osci-pipelines/dist-git-pipeline/-/blob/master/Jenkinsfile?ref_type=heads#L93 -if [[ -v KOJI_TASK_ID ]] || [[ -v CI_KOJI_TASK_ID ]]; then - # Just left those ls commands here to ring the bell for me when something changed - echo "$TMT_SOURCE_DIR" - ls -al "$TMT_SOURCE_DIR" - ls -al "$TMT_SOURCE_DIR/SRPMS" - GATING="true" -else - GATING="false" -fi - ls -al /etc/yum.repos.d cat /etc/yum.repos.d/test-artifacts.repo ls -al /var/share/test-artifacts @@ -93,7 +81,7 @@ cp /etc/yum.repos.d/test-artifacts.repo "$BOOTC_TEMPDIR" ls -al "$BOOTC_TEMPDIR" "${BOOTC_TEMPDIR}/bin" # Do not use just because it's only available on Fedora, not on CS and RHEL -podman build --jobs=4 --from "$BASE" --build-arg GATING="$GATING" -v "$BOOTC_TEMPDIR":/bootc-test:z -t localhost/bootc-integration -f "${BOOTC_TEMPDIR}/Containerfile.packit" "$BOOTC_TEMPDIR" +podman build --jobs=4 --from "$BASE" -v "$BOOTC_TEMPDIR":/bootc-test:z -t localhost/bootc-integration -f "${BOOTC_TEMPDIR}/Containerfile.packit" "$BOOTC_TEMPDIR" # Keep these in sync with what's used in hack/lbi podman pull -q --retry 5 --retry-delay 5s quay.io/curl/curl:latest quay.io/curl/curl-base:latest registry.access.redhat.com/ubi9/podman:latest diff --git a/tmt/plans/integration.fmf b/tmt/plans/integration.fmf index 42d41f671..173a31e58 100644 --- a/tmt/plans/integration.fmf +++ b/tmt/plans/integration.fmf @@ -5,7 +5,9 @@ prepare: # Install image mode system on package mode system # Do not run on image mode VM running on Github CI and Locally # Run on package mode VM running on Packit and Gating + # order 9x means run it at the last job of prepare - how: install + order: 97 package: - podman - skopeo @@ -17,6 +19,7 @@ prepare: - zstd when: running_env != image_mode - how: shell + order: 98 script: - mkdir -p bootc && cp /var/share/test-artifacts/*.src.rpm bootc - cd bootc && rpm2cpio *.src.rpm | cpio -idmv && rm -f *-vendor.tar.zstd && zstd -d *.tar.zstd && tar -xvf *.tar -C . --strip-components=1 && ls -al @@ -25,6 +28,7 @@ prepare: # tmt-reboot and reboot do not work in this case # reboot in ansible is the only way to reboot in tmt prepare - how: ansible + order: 99 playbook: - https://github.com/bootc-dev/bootc/raw/refs/heads/main/hack/packit-reboot.yml when: running_env != image_mode