diff --git a/.packit.yaml b/.packit.yaml index 3478f48900..884518a41f 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -13,198 +13,153 @@ srpm_build_deps: - hatch - python3-hatch-vcs -jobs: +actions: &base-actions + create-archive: + - 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 + - epel-9 +jobs: # Build pull requests - - job: copr_build + - &copr_build + job: copr_build trigger: pull_request - targets: - - fedora-all - - epel-9 - enable_net: False actions: - create-archive: - - hatch run docs:man - - hatch build -t sdist - - bash -c "ls dist/tmt-*.tar.gz" - get-current-version: - # Use `dev888` instead of the last version digit to make - # builds older than the final release and newer than - # copr builds from main. Remove the remaining suffix - # generated by `hatch version` as well so that build - # with the latest timestamp always wins. - - bash -c "hatch version | sed -E 's/\\.[0-9]+\\.dev.*/.dev888/'" - - # Test pull requests (core) - - job: tests - identifier: core + <<: *base-actions + get-current-version: + # Use `dev888` instead of the last version digit to make + # builds older than the final release and newer than + # copr builds from main. Remove the remaining suffix + # generated by `hatch version` as well so that build + # with the latest timestamp always wins. + - bash -c "hatch version | sed -E 's/\\.[0-9]+\\.dev.*/.dev888/'" + + # Test core + - &tests + job: tests trigger: pull_request - targets: + targets: &latest-targets - fedora-latest-stable - epel-9 + identifier: core tf_extra_params: - test: - tmt: - name: /plans/features/(core|basic) + test: + tmt: + name: /plans/features/(core|basic) - # Test pull requests (full) + # Test full # Do not run extended unit tests, that plan gets its own job because # of podman vs systemd-resolved flakiness. - - job: tests + - <<: *tests + targets: *all-targets + require: &require-full-tests + label: + present: + - full test + absent: + - discuss identifier: full - trigger: pull_request - targets: - - fedora-all - - epel-9 - require: - label: - present: - - full test - absent: - - discuss tf_extra_params: - test: - tmt: - name: '^(?!/plans/features/extended-unit-tests).*$' - - - job: tests + test: + tmt: + name: '^(?!/plans/features/extended-unit-tests).*$' + + # Extended unit tests + - <<: *tests + targets: [ fedora-latest-stable ] + require: *require-full-tests identifier: extended-unit-tests - trigger: pull_request - targets: - - fedora-latest-stable - require: - label: - present: - - full test - absent: - - discuss tf_extra_params: - test: - tmt: - name: '/plans/features/extended-unit-tests$' + test: + tmt: + name: '/plans/features/extended-unit-tests$' - # Test pull requests (provision) - - job: tests - identifier: provision - trigger: pull_request + # Test virtual provision + - <<: *tests use_internal_tf: True - targets: + targets: &internal-targets - fedora-latest-stable + require: *require-full-tests + identifier: provision tf_extra_params: - test: - tmt: - name: /plans/provision/virtual - environments: - - tmt: - context: - how: provision - require: - label: - present: - - full test - absent: - - discuss + test: + tmt: + name: /plans/provision/virtual + environments: + - tmt: + context: + how: provision + - &tmt-cloud-resources + settings: + provisioning: + tags: + BusinessUnit: tmt # Test internal plugins - - job: tests - trigger: pull_request - identifier: "internal-plugins" - targets: - - fedora-latest-stable + - <<: *tests use_internal_tf: True + targets: *internal-targets + 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: - - settings: - provisioning: - tags: - BusinessUnit: tmt - require: - label: - present: - - full test - absent: - - discuss + environments: + - *tmt-cloud-resources # Test internal wow - - job: tests - trigger: pull_request - identifier: "internal-wow" - targets: - - fedora-latest-stable + - <<: *tests use_internal_tf: True + targets: *internal-targets + 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: - - settings: - provisioning: - tags: - BusinessUnit: tmt - require: - label: - present: - - full test - absent: - - discuss + environments: + - *tmt-cloud-resources # Build commits to main - - job: copr_build + - <<: *copr_build trigger: commit branch: main - targets: - - fedora-all - - epel-9 - enable_net: False list_on_homepage: True preserve_project: True owner: "@teemtee" project: tmt release_suffix: "{PACKIT_PROJECT_BRANCH}" actions: - create-archive: - - hatch run docs:man - - hatch build -t sdist - - bash -c "ls dist/tmt-*.tar.gz" - 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/'" + <<: *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 - - job: copr_build + - <<: *copr_build trigger: release - targets: - - fedora-all - - epel-9 - enable_net: False list_on_homepage: True preserve_project: True owner: "@teemtee" project: tmt - actions: - create-archive: - - hatch run docs:man - - hatch build -t sdist - - bash -c "ls dist/tmt-*.tar.gz" - get-current-version: - - hatch version + actions: *base-actions # Fedora releases - job: propose_downstream trigger: release - dist_git_branches: - - fedora-all - - epel-9 + dist_git_branches: *all-targets - job: koji_build trigger: commit - allowed_pr_authors: ["packit", "psss", "lzachar"] - allowed_committers: ["packit", "psss", "lzachar"] - dist_git_branches: - - fedora-all - - epel-9 + allowed_pr_authors: [ "packit", "psss", "lzachar" ] + allowed_committers: [ "packit", "psss", "lzachar" ] + dist_git_branches: *all-targets - job: bodhi_update trigger: commit