ci: abort old PR builds to make queue shorter

In most cases developers only care about the most recent version.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-09-21 12:06:45 +02:00
parent 58b56d831b
commit 8c457a2495
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
7 changed files with 49 additions and 0 deletions

View File

@ -1,5 +1,8 @@
library 'status-jenkins-lib@v1.5.6'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
pipeline {
agent {
docker {
@ -33,6 +36,10 @@ pipeline {
daysToKeepStr: '30',
artifactNumToKeepStr: '3',
))
/* Abort old PR builds. */
disableConcurrentBuilds(
abortPrevious: isPRBuild
)
}
environment {

View File

@ -1,5 +1,8 @@
library 'status-jenkins-lib@v1.5.6'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
pipeline {
agent {
dockerfile {
@ -29,6 +32,10 @@ pipeline {
daysToKeepStr: '30',
artifactNumToKeepStr: '3',
))
/* Abort old PR builds. */
disableConcurrentBuilds(
abortPrevious: isPRBuild
)
}
environment {

View File

@ -1,5 +1,8 @@
library 'status-jenkins-lib@v1.5.6'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
pipeline {
agent {
label 'macos && x86_64'
@ -28,6 +31,10 @@ pipeline {
daysToKeepStr: '30',
artifactNumToKeepStr: '3',
))
/* Abort old PR builds. */
disableConcurrentBuilds(
abortPrevious: isPRBuild
)
}
environment {

View File

@ -1,5 +1,8 @@
library 'status-jenkins-lib@v1.5.6'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
pipeline {
agent {
docker {
@ -26,6 +29,10 @@ pipeline {
daysToKeepStr: '30',
artifactNumToKeepStr: '3',
))
/* Abort old PR builds. */
disableConcurrentBuilds(
abortPrevious: isPRBuild
)
}
environment {

View File

@ -1,5 +1,8 @@
library 'status-jenkins-lib@v1.5.1'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
pipeline {
agent { label 'linux' }
@ -34,6 +37,10 @@ pipeline {
maxConcurrentPerNode: 1,
maxConcurrentTotal: 1
)
/* Abort old PR builds. */
disableConcurrentBuilds(
abortPrevious: isPRBuild
)
}
environment {

View File

@ -1,5 +1,8 @@
library 'status-jenkins-lib@v1.5.6'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
pipeline {
agent { label 'windows' }
@ -26,6 +29,10 @@ pipeline {
daysToKeepStr: '30',
artifactNumToKeepStr: '3',
))
/* Abort old PR builds. */
disableConcurrentBuilds(
abortPrevious: isPRBuild
)
}
environment {

View File

@ -1,5 +1,8 @@
library 'status-jenkins-lib@v1.5.6'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
pipeline {
agent {
docker {
@ -26,6 +29,10 @@ pipeline {
daysToKeepStr: '30',
artifactNumToKeepStr: '3',
))
/* Abort old PR builds. */
disableConcurrentBuilds(
abortPrevious: isPRBuild
)
}
environment {