Skip to content

Commit

Permalink
ci: cancel previous build on PR update
Browse files Browse the repository at this point in the history
This is an easy way to save CI resources; when a PR is updated, abort
any previous build for that PR to focus on testing the latest push.
  • Loading branch information
jlebon committed Nov 21, 2023
1 parent de22914 commit 8002983
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .cci.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// Documentation: https://github.com/coreos/coreos-ci/blob/main/README-upstream-ci.md

properties([
// abort previous runs when a PR is updated to save resources
disableConcurrentBuilds(abortPrevious: true)
])

stage("Build") {
def n = 5
buildPod(memory: "2Gi", cpu: "${n}") {
Expand Down

0 comments on commit 8002983

Please sign in to comment.