From 8002983d45cad31258b8dbc75435fd5d74d6ca07 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 21 Nov 2023 15:31:38 -0500 Subject: [PATCH] ci: cancel previous build on PR update 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. --- .cci.jenkinsfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.cci.jenkinsfile b/.cci.jenkinsfile index 82e2d1ac84..1f41be1a19 100644 --- a/.cci.jenkinsfile +++ b/.cci.jenkinsfile @@ -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}") {