Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the packit configuration #3374

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 77 additions & 86 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,10 +26,64 @@ 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
require:
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
Expand All @@ -44,114 +96,53 @@ 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:
tmt:
name: /plans/features/(core|basic)
tmt_plan: '/plans/features/(core|basic)'

# 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-full-tests
identifier: full
tf_extra_params:
test:
tmt:
name: '^(?!/plans/features/extended-unit-tests).*$'
tmt_plan: '^(?!/plans/features/extended-unit-tests).*$'

# Extended unit tests
- <<: *tests
- <<: *test_base
<<: *require-full-tests
targets: [ fedora-latest-stable ]
require: *require-full-tests
identifier: extended-unit-tests
tf_extra_params:
test:
tmt:
name: '/plans/features/extended-unit-tests$'
tmt_plan: '/plans/features/extended-unit-tests$'

# Test virtual provision
- <<: *tests
use_internal_tf: True
targets: &internal-targets
- fedora-latest-stable
require: *require-full-tests
- <<: *test_base
<<: *internal
<<: *require-full-tests
identifier: provision
tmt_plan: '/plans/provision/(bootc|virtual)'
tf_extra_params:
test:
tmt:
name: /plans/provision/(bootc|virtual)
environments:
- 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
require: *require-full-tests
- <<: *test_base
<<: *internal
<<: *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
require: *require-full-tests
- <<: *test_base
<<: *internal
<<: *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
tmt_plan: '/tmt/integration/plan'

# Fedora releases
- job: propose_downstream
Expand Down
Loading