Move Jenkins post-build tasks to a post{} block
This commit is contained in:
13
.ci/Jenkinsfile
vendored
13
.ci/Jenkinsfile
vendored
@@ -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 {
|
||||
@@ -133,4 +129,3 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user