diff --git a/.packit.yaml b/.packit.yaml index 5908b020a5..b1c1210f6f 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -18,8 +18,6 @@ actions: &base-actions - hatch run docs:man - hatch build -t sdist - bash -c "ls dist/tmt-*.tar.gz" - get-current-version: - - hatch version targets: &all-targets - fedora-all @@ -28,10 +26,63 @@ targets: &all-targets # Uncomment below line if OpenScanHub scans are failing # osh_diff_scan_after_copr_build: false +_: + - &copr_on_packit + job: copr_build + - &copr_on_tmt + <<: *copr_on_packit + list_on_homepage: True + preserve_project: True + owner: "@teemtee" + project: tmt + - &test_base + job: tests + trigger: pull_request + - &latest-targets + - fedora-latest-stable + - epel-9 + - &internal + use_internal_tf: True + targets: + - fedora-latest-stable + tf_extra_params: + environments: + - &tmt-cloud-resources + settings: + provisioning: + tags: + BusinessUnit: tmt + - &require-full-tests + label: + present: + - ci | full test + absent: + - status | discuss + + jobs: + # Release to copr + - <<: *copr_on_tmt + trigger: release + actions: + <<: *base-actions + get-current-version: + - hatch version + + # Build commits to main + - <<: *copr_on_tmt + trigger: commit + branch: main + release_suffix: "{PACKIT_PROJECT_BRANCH}" + actions: + <<: *base-actions + get-current-version: + # Get rid of the the final version digit to make copr + # builds older than the final release + - bash -c "hatch version | sed -E 's/\\.[0-9]+\\.dev/.dev/'" + # Build pull requests - - &copr_build - job: copr_build + - <<: *copr_on_packit trigger: pull_request actions: <<: *base-actions @@ -44,12 +95,8 @@ jobs: - bash -c "hatch version | sed -E 's/\\.[0-9]+\\.dev.*/.dev888/'" # Test core - - &tests - job: tests - trigger: pull_request - targets: &latest-targets - - fedora-latest-stable - - epel-9 + - <<: *test_base + targets: *latest-targets identifier: core tf_extra_params: test: @@ -59,14 +106,8 @@ jobs: # Test full # Do not run extended unit tests, that plan gets its own job because # of podman vs systemd-resolved flakiness. - - <<: *tests - targets: *all-targets - require: &require-full-tests - label: - present: - - ci | full test - absent: - - status | discuss + - <<: *test_base + require: *require-full-tests identifier: full tf_extra_params: test: @@ -74,7 +115,7 @@ jobs: name: '^(?!/plans/features/extended-unit-tests).*$' # Extended unit tests - - <<: *tests + - <<: *test_base targets: [ fedora-latest-stable ] require: *require-full-tests identifier: extended-unit-tests @@ -84,10 +125,8 @@ jobs: name: '/plans/features/extended-unit-tests$' # Test virtual provision - - <<: *tests - use_internal_tf: True - targets: &internal-targets - - fedora-latest-stable + - <<: *test_base + <<: *internal require: *require-full-tests identifier: provision tf_extra_params: @@ -98,60 +137,22 @@ jobs: - tmt: context: how: provision - - &tmt-cloud-resources - settings: - provisioning: - tags: - BusinessUnit: tmt + - *tmt-cloud-resources # Test internal plugins - - <<: *tests - use_internal_tf: True - targets: *internal-targets + - <<: *test_base + <<: *internal require: *require-full-tests identifier: internal-plugins fmf_url: "https://gitlab.cee.redhat.com/baseos-qe/tmt.git" - # Tag cloud resources for tmt - tf_extra_params: - environments: - - *tmt-cloud-resources # Test internal wow - - <<: *tests - use_internal_tf: True - targets: *internal-targets + - <<: *test_base + <<: *internal require: *require-full-tests identifier: internal-wow fmf_url: "https://gitlab.cee.redhat.com/baseos-qe/integration_scripts.git" tmt_plan: "/tmt/integration/plan" - tf_extra_params: - environments: - - *tmt-cloud-resources - - # Build commits to main - - <<: *copr_build - trigger: commit - branch: main - list_on_homepage: True - preserve_project: True - owner: "@teemtee" - project: tmt - release_suffix: "{PACKIT_PROJECT_BRANCH}" - actions: - <<: *base-actions - get-current-version: - # Get rid of the the final version digit to make copr - # builds older than the final release - - bash -c "hatch version | sed -E 's/\\.[0-9]+\\.dev/.dev/'" - - # Release to copr - - <<: *copr_build - trigger: release - list_on_homepage: True - preserve_project: True - owner: "@teemtee" - project: tmt - actions: *base-actions # Fedora releases - job: propose_downstream