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:
parent
d299c65720
commit
578e542a66
|
@ -1,5 +1,8 @@
|
||||||
library 'status-jenkins-lib@v1.4.3'
|
library 'status-jenkins-lib@v1.4.3'
|
||||||
|
|
||||||
|
/* Options section can't access functions in objects. */
|
||||||
|
def isPRBuild = utils.isPRBuild()
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux && x86_64 && nix-2.8' }
|
agent { label 'linux && x86_64 && nix-2.8' }
|
||||||
|
|
||||||
|
@ -15,6 +18,10 @@ pipeline {
|
||||||
))
|
))
|
||||||
/* Allows combined build to copy */
|
/* Allows combined build to copy */
|
||||||
copyArtifactPermission('/status-react/*')
|
copyArtifactPermission('/status-react/*')
|
||||||
|
/* Abort old PR builds. */
|
||||||
|
disableConcurrentBuilds(
|
||||||
|
abortPrevious: isPRBuild
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
parameters {
|
parameters {
|
||||||
|
@ -44,7 +51,6 @@ pipeline {
|
||||||
script {
|
script {
|
||||||
btype = utils.getBuildType()
|
btype = utils.getBuildType()
|
||||||
print "Running ${btype} build!"
|
print "Running ${btype} build!"
|
||||||
jenkins.abortPreviousRunningBuilds()
|
|
||||||
/* Cleanup and Prep */
|
/* Cleanup and Prep */
|
||||||
commonPrep(btype)
|
commonPrep(btype)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
library 'status-jenkins-lib@v1.4.3'
|
library 'status-jenkins-lib@v1.4.3'
|
||||||
|
|
||||||
|
/* Options section can't access functions in objects. */
|
||||||
|
def isPRBuild = utils.isPRBuild()
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'macos && x86_64 && nix-2.8 && xcode-13.3' }
|
agent { label 'macos && x86_64 && nix-2.8 && xcode-13.3' }
|
||||||
|
|
||||||
|
@ -23,6 +26,10 @@ pipeline {
|
||||||
))
|
))
|
||||||
/* Allows combined build to copy */
|
/* Allows combined build to copy */
|
||||||
copyArtifactPermission('/status-react/*')
|
copyArtifactPermission('/status-react/*')
|
||||||
|
/* Abort old PR builds. */
|
||||||
|
disableConcurrentBuilds(
|
||||||
|
abortPrevious: isPRBuild
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
|
@ -43,7 +50,6 @@ pipeline {
|
||||||
script {
|
script {
|
||||||
btype = utils.getBuildType()
|
btype = utils.getBuildType()
|
||||||
print "Running ${btype} build!"
|
print "Running ${btype} build!"
|
||||||
jenkins.abortPreviousRunningBuilds()
|
|
||||||
/* Cleanup and Prep */
|
/* Cleanup and Prep */
|
||||||
commonPrep(btype)
|
commonPrep(btype)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue