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. Depending projects like podman should only run
against what landed in crun/main, i.e. the podman-next COPR.

Note that this does not preclude testing a podman PR against 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

Signed-off-by: Martin Pitt <[email protected]>
  • Loading branch information
martinpitt committed Aug 8, 2023
1 parent 81896b2 commit 7be2ceb
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +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/crun.spec

srpm_build_deps:
- git-archive-all
- make
actions:
create-archive:
- "git-archive-all -v --force-submodules rpm/crun-HEAD.tar.xz"
- bash -c "ls -1 rpm/crun-HEAD.tar.xz"

jobs:
- &copr
job: copr_build
- job: copr_build
trigger: pull_request
owner: rhcontainerbot
project: packit-builds
enable_net: true
srpm_build_deps:
- git-archive-all
- make
actions:
create-archive:
- "git-archive-all -v --force-submodules rpm/crun-HEAD.tar.xz"
- bash -c "ls -1 rpm/crun-HEAD.tar.xz"
targets:
- fedora-all-x86_64
- fedora-all-aarch64
- centos-stream-8-x86_64
- centos-stream-8-aarch64
- centos-stream-9-x86_64
- centos-stream-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

- job: propose_downstream
Expand Down

0 comments on commit 7be2ceb

Please sign in to comment.