Skip to content

Commit

Permalink
Packit configuration maintenance
Browse files Browse the repository at this point in the history
- Use yaml anchors
- Remove explicit `enable_net: false` (not needed since June 2022)

Signed-off-by: Cristian Le <[email protected]>
  • Loading branch information
LecrisUT committed Jul 31, 2024
1 parent 615b4a1 commit 16bcbf0
Showing 1 changed file with 90 additions and 146 deletions.
236 changes: 90 additions & 146 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,198 +13,142 @@ 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

# Build pull requests
- job: copr_build
jobs:
- &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/'"
- &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 pull requests (full)
# Do not run extended unit tests, that plan gets its own job because
# of podman vs systemd-resolved flakiness.
- job: tests
test:
tmt:
name: /plans/features/(core|basic)
- # Test pull requests (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:
- 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).*$'
- <<: *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 pull requests (provision)
- job: tests
identifier: provision
trigger: pull_request
test:
tmt:
name: '/plans/features/extended-unit-tests$'
- # Test pull requests (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 internal plugins
- job: tests
trigger: pull_request
identifier: "internal-plugins"
targets:
- fedora-latest-stable
test:
tmt:
name: /plans/provision/virtual
environments:
- tmt:
context:
how: provision
- # Test internal plugins
<<: *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

# Test internal wow
- job: tests
trigger: pull_request
identifier: "internal-wow"
targets:
- fedora-latest-stable
environments:
- &tmt-cloud-resources
settings:
provisioning:
tags:
BusinessUnit: tmt
- # Test internal wow
<<: *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

# 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
Expand Down

0 comments on commit 16bcbf0

Please sign in to comment.