don't cancel Jenkins builds in stable, testing, and unstable (#2226)

This commit is contained in:
tersec 2021-01-11 19:51:38 +01:00 committed by GitHub
parent b99a6f3dfd
commit 6653ce3fc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

5
Jenkinsfile vendored
View File

@ -1,6 +1,7 @@
// https://stackoverflow.com/questions/40760716/jenkins-abort-running-build-if-new-one-is-started
// 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") {
// We should only abort older jobs in PR branches, so we have a nice CI history in "stable",
// "testing", and "unstable".
if (env.BRANCH_NAME != "stable" && env.BRANCH_NAME != "testing" && env.BRANCH_NAME != "unstable") {
def buildNumber = env.BUILD_NUMBER as int
if (buildNumber > 1) {
milestone(buildNumber - 1)