Skip to content

Commit

Permalink
packit: Build PRs into default packit COPRs
Browse files Browse the repository at this point in the history
Building all PRs of all container projects into the same COPR does not
properly isolate PRs from each other: E.g. a podman PR currently runs
against whichever crun PR was opened/updated last; in other words,
sending a broken crun PR will instantly break tests for all subsequent
podman runs.

To avoid that, change the copr_build configuration to use the packit
default COPRs, which are specific to the particular PR, and disappear
after a few weeks. Projects should only run against what landed in
our dependencies' main branches, i.e. the podman-next COPR.

Note that this does not preclude testing a podman PR against a e.g. a
crun PR: This can be explicitly requested [1]. But most PRs don't change
the API and thus should default to isolation.

[1] https://packit.dev/posts/testing-farm-triggering

[NO NEW TESTS NEEDED]

Signed-off-by: Martin Pitt <[email protected]>
  • Loading branch information
martinpitt authored and openshift-cherrypick-robot committed Aug 16, 2023
1 parent 8183ba8 commit fa0731f
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,34 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/

# Build targets can be found at:
# https://copr.fedorainfracloud.org/coprs/rhcontainerbot/packit-builds/

specfile_path: rpm/podman.spec
upstream_tag_template: v{version}

srpm_build_deps:
- make

jobs:
- &copr
job: copr_build
- job: copr_build
trigger: pull_request
owner: rhcontainerbot
project: packit-builds
enable_net: true
srpm_build_deps:
- make
# keep in sync with https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next
targets:
- fedora-all-x86_64
- fedora-all-aarch64
- centos-stream+epel-next-8-x86_64
- centos-stream+epel-next-8-aarch64
- centos-stream+epel-next-9-x86_64
- centos-stream+epel-next-9-aarch64
additional_repos:
- "copr://rhcontainerbot/podman-next"

- <<: *copr
# Run on commit to main branch
# Run on commit to main branch
- job: copr_build
trigger: commit
branch: main
owner: rhcontainerbot
project: podman-next
enable_net: true

- job: propose_downstream
trigger: release
Expand Down

0 comments on commit fa0731f

Please sign in to comment.