ci: use newly added disableConcurrentBuilds

https://github.com/jenkinsci/workflow-job-plugin/pull/200
Removes the need to use our own convoluted implementation:
https://github.com/status-im/status-jenkins-lib/blob/17c1d0ea/vars/jenkins.groovy#L6-L27

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-06-28 20:46:54 +02:00
parent d299c65720
commit 578e542a66
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
2 changed files with 14 additions and 2 deletions

View File

@ -1,5 +1,8 @@
library 'status-jenkins-lib@v1.4.3'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
pipeline {
agent { label 'linux && x86_64 && nix-2.8' }
@ -15,6 +18,10 @@ pipeline {
))
/* Allows combined build to copy */
copyArtifactPermission('/status-react/*')
/* Abort old PR builds. */
disableConcurrentBuilds(
abortPrevious: isPRBuild
)
}
parameters {
@ -44,7 +51,6 @@ pipeline {
script {
btype = utils.getBuildType()
print "Running ${btype} build!"
jenkins.abortPreviousRunningBuilds()
/* Cleanup and Prep */
commonPrep(btype)
}

View File

@ -1,5 +1,8 @@
library 'status-jenkins-lib@v1.4.3'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
pipeline {
agent { label 'macos && x86_64 && nix-2.8 && xcode-13.3' }
@ -23,6 +26,10 @@ pipeline {
))
/* Allows combined build to copy */
copyArtifactPermission('/status-react/*')
/* Abort old PR builds. */
disableConcurrentBuilds(
abortPrevious: isPRBuild
)
}
environment {
@ -43,7 +50,6 @@ pipeline {
script {
btype = utils.getBuildType()
print "Running ${btype} build!"
jenkins.abortPreviousRunningBuilds()
/* Cleanup and Prep */
commonPrep(btype)
}