Jenkins: don't abort older jobs in master/devel (#1746)
* Jenkins: don't abort older jobs in master/devel * same for Jenkinsfile.benchmarks
This commit is contained in:
parent
6cf7e837ce
commit
3936caae4b
|
@ -1,9 +1,12 @@
|
|||
// https://stackoverflow.com/questions/40760716/jenkins-abort-running-build-if-new-one-is-started
|
||||
def buildNumber = env.BUILD_NUMBER as int
|
||||
if (buildNumber > 1) {
|
||||
// We should only abort older jobs in PR branches, so we have a nice CI history in "master" and "devel".
|
||||
if (env.BRANCH_NAME != "master" && env.BRANCH_NAME != "devel") {
|
||||
def buildNumber = env.BUILD_NUMBER as int
|
||||
if (buildNumber > 1) {
|
||||
milestone(buildNumber - 1)
|
||||
}
|
||||
milestone(buildNumber)
|
||||
}
|
||||
milestone(buildNumber)
|
||||
|
||||
def runStages() {
|
||||
try {
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
// https://stackoverflow.com/questions/40760716/jenkins-abort-running-build-if-new-one-is-started
|
||||
def buildNumber = env.BUILD_NUMBER as int
|
||||
if (buildNumber > 1) {
|
||||
// We should only abort older jobs in PR branches, so we have a nice CI history in "master" and "devel".
|
||||
if (env.BRANCH_NAME != "master" && env.BRANCH_NAME != "devel") {
|
||||
def buildNumber = env.BUILD_NUMBER as int
|
||||
if (buildNumber > 1) {
|
||||
milestone(buildNumber - 1)
|
||||
}
|
||||
milestone(buildNumber)
|
||||
}
|
||||
milestone(buildNumber)
|
||||
|
||||
node("metal") {
|
||||
withEnv(["NPROC=${sh(returnStdout: true, script: 'nproc').trim()}"]) {
|
||||
|
|
Loading…
Reference in New Issue