Move Jenkins post-build tasks to a post{} block

This commit is contained in:
RichardG867
2021-11-13 15:59:22 -03:00
parent 94d9ec1414
commit 913b695073

13
.ci/Jenkinsfile vendored
View File

@@ -51,7 +51,7 @@ def saveArtifacts() {
def anySuccess = false
pipeline {
agent any
agent none
parameters {
string(name: 'BUILD_TYPE',
@@ -94,14 +94,10 @@ pipeline {
}
}
}
}
/* This stage has two tasks:
- Trigger downstream jobs if we're on the main job
- Fail this build if all build stages failed
This could be done with two stages and when{} blocks, but then they
would show up separately in the UI (unless JENKINS-44094 happens). */
stage('Finish build') {
steps {
post {
always {
script {
if (env.JOB_BASE_NAME == '86Box-TestBuildPleaseIgnore') {
["${env.JOB_BASE_NAME}2"].each {
@@ -132,5 +128,4 @@ pipeline {
}
}
}
}
}