Allow to force non-incremental Jenkins builds
In all the builds using precompiled headers, an update to libraries will crash the CI, as those headers will become outdated. It is then necessary to force a full rebuild of the game by cleaning up the workspaces. This commit allows this CI behavior to be triggered by specifying [CLEANBUILD] in the first line of the commit message. This will constitute an opportunity to inform users that they need to clean their workspaces when pulling the update.
This commit is contained in:
parent
2a67c9a503
commit
ee3318309b
@ -35,6 +35,16 @@ pipeline {
|
||||
LLVM_OBJDUMP = '/usr/bin/llvm-objdump'
|
||||
}
|
||||
stages {
|
||||
stage("Cleanup") {
|
||||
when {
|
||||
changelog '.*\\[CLEANBUILD\\].*'
|
||||
}
|
||||
steps {
|
||||
script { env.CLEANBUILD = 'true' }
|
||||
sh "git clean -fdx build/ source/"
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Pre-build") {
|
||||
steps {
|
||||
discoverGitReferenceBuild()
|
||||
@ -70,6 +80,11 @@ pipeline {
|
||||
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
if (env.CLEANBUILD == 'true') {
|
||||
sh "git clean -fdx build/ source/"
|
||||
}
|
||||
}
|
||||
recordIssues enabledForFailure: true, qualityGates: [[threshold: 1, type: 'NEW']], tool: clang()
|
||||
}
|
||||
}
|
||||
|
@ -60,12 +60,26 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Cleanup") {
|
||||
when {
|
||||
allOf {
|
||||
environment name: 'JENKINS_PCH', value: 'pch'
|
||||
changelog '.*\\[CLEANBUILD\\].*'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
script { env.CLEANBUILD = 'true' }
|
||||
sh "git clean -fdx build/ source/"
|
||||
}
|
||||
}
|
||||
|
||||
stage("Pre-build") {
|
||||
steps {
|
||||
sh "git lfs pull -I binaries/data/tests"
|
||||
sh "git lfs pull -I \"binaries/data/mods/_test.*\""
|
||||
|
||||
sh "libraries/build-source-libs.sh -j1 2> ${JENKINS_COMPILER}-prebuild-errors.log"
|
||||
|
||||
script {
|
||||
if (env.JENKINS_PCH == "no-pch") {
|
||||
sh "build/workspaces/update-workspaces.sh -j1 --jenkins-tests --without-pch 2>> ${JENKINS_COMPILER}-prebuild-errors.log"
|
||||
@ -109,6 +123,16 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
if (env.CLEANBUILD == 'true' && env.JENKINS_PCH == 'pch') {
|
||||
sh "git clean -fdx build/ source/"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
|
@ -29,6 +29,16 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Cleanup") {
|
||||
when {
|
||||
changelog '.*\\[CLEANBUILD\\].*'
|
||||
}
|
||||
steps {
|
||||
script { env.CLEANBUILD = 'true' }
|
||||
sh "git clean -fdx build/ source/"
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Pre-build") {
|
||||
steps {
|
||||
discoverGitReferenceBuild()
|
||||
@ -77,6 +87,11 @@ pipeline {
|
||||
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
if (env.CLEANBUILD == 'true') {
|
||||
sh "git clean -fdx build/ source/"
|
||||
}
|
||||
}
|
||||
recordIssues enabledForFailure: true, qualityGates: [[threshold: 1, type: 'NEW']], tool: clang()
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,16 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Cleanup") {
|
||||
when {
|
||||
changelog '.*\\[CLEANBUILD\\].*'
|
||||
}
|
||||
steps {
|
||||
script { env.CLEANBUILD = 'true' }
|
||||
bat "git clean -fdx build/ source/"
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Pre-build") {
|
||||
steps {
|
||||
discoverGitReferenceBuild()
|
||||
@ -77,6 +87,11 @@ pipeline {
|
||||
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
if (env.CLEANBUILD == 'true') {
|
||||
bat "git clean -fdx build/ source/"
|
||||
}
|
||||
}
|
||||
recordIssues enabledForFailure: true, qualityGates: [[threshold: 1, type: 'NEW']], tool: msBuild()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user