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

Packit configuration maintenance #3024

Merged
merged 3 commits into from
Aug 7, 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
229 changes: 92 additions & 137 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
psss marked this conversation as resolved.
Show resolved Hide resolved
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
LecrisUT marked this conversation as resolved.
Show resolved Hide resolved
list_on_homepage: True
preserve_project: True
owner: "@teemtee"
project: tmt
psss marked this conversation as resolved.
Show resolved Hide resolved
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" ]
psss marked this conversation as resolved.
Show resolved Hide resolved
allowed_committers: [ "packit", "psss", "lzachar" ]
dist_git_branches: *all-targets

- job: bodhi_update
trigger: commit
Expand Down
Loading