From 9558c9c01312b4b575ebe0b0fa559ee6cfe360b4 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Wed, 27 Aug 2025 13:48:31 -0400 Subject: [PATCH] Packit: replace files_to_sync with prepare-files With TMT being able to fetch and run tests using git url and ref, there's no need to sync files on every propose_downstream Packit action. Removing files_to_sync should be safe as we only need to sync `.packit.yaml` which is part of Packit's default behavior already. Other files like gating.yaml only need to exist downstream and shouldn't need any frequent manual changes, so we can remove those from upstream and packit file-sync too. New setup: We use a `prepare-files` action that will operate only on `plans/main.fmf` in downstream dist-git and update the ref with the tag from the latest release. Signed-off-by: Lokesh Mandvekar --- .packit.yaml | 25 ++++--------------------- rpm/gating.yaml | 16 ---------------- 2 files changed, 4 insertions(+), 37 deletions(-) delete mode 100644 rpm/gating.yaml diff --git a/.packit.yaml b/.packit.yaml index e7c125f2..adfed61e 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -9,27 +9,6 @@ downstream_package_name: skopeo 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: systemtest/tmt/ - dest: test/tmt/ - delete: true - mkpath: true - - src: .fmf/ - dest: .fmf/ - delete: true - - .packit.yaml - packages: skopeo-fedora: pkg_tool: fedpkg @@ -40,6 +19,10 @@ packages: skopeo-eln: specfile_path: rpm/skopeo.spec +actions: + prepare-files: >- + bash -c "sed -i 's/^\(\s*\)ref: .*/\1ref: \"${PACKIT_PROJECT_TAG}\"/' ${PACKIT_DOWNSTREAM_REPO}/plans/main.fmf" + srpm_build_deps: - make diff --git a/rpm/gating.yaml b/rpm/gating.yaml deleted file mode 100644 index 1fb3172f..00000000 --- a/rpm/gating.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- !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}