[CI] Cancel builds on subsequent pushes (#6011)

* [CI] Cancel builds on subsequent pushes

* Use a more secure method

* test commit
This commit is contained in:
Philip Hyunsu Cho
2020-08-13 11:17:39 -07:00
committed by GitHub
parent 674c409e9d
commit e3ec7b01df
2 changed files with 7 additions and 8 deletions

9
Jenkinsfile vendored
View File

@@ -38,12 +38,15 @@ pipeline {
agent { label 'job_initializer' }
steps {
script {
def buildNumber = env.BUILD_NUMBER as int
if (buildNumber > 1) milestone(buildNumber - 1)
milestone(buildNumber)
checkoutSrcs()
commit_id = "${GIT_COMMIT}"
}
sh 'python3 tests/jenkins_get_approval.py'
stash name: 'srcs'
milestone ordinal: 1
}
}
stage('Jenkins Linux: Formatting Check') {
@@ -57,7 +60,6 @@ pipeline {
'doxygen': { Doxygen() }
])
}
milestone ordinal: 2
}
}
stage('Jenkins Linux: Build') {
@@ -80,7 +82,6 @@ pipeline {
'build-jvm-doc': { BuildJVMDoc() }
])
}
milestone ordinal: 3
}
}
stage('Jenkins Linux: Test') {
@@ -103,7 +104,6 @@ pipeline {
'test-r-3.5.3': { TestR(use_r35: true) }
])
}
milestone ordinal: 4
}
}
stage('Jenkins Linux: Deploy') {
@@ -114,7 +114,6 @@ pipeline {
'deploy-jvm-packages': { DeployJVMPackages(spark_version: '3.0.0') }
])
}
milestone ordinal: 5
}
}
}