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
|
def anySuccess = false
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent none
|
||||||
|
|
||||||
parameters {
|
parameters {
|
||||||
string(name: 'BUILD_TYPE',
|
string(name: 'BUILD_TYPE',
|
||||||
@@ -94,14 +94,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* This stage has two tasks:
|
post {
|
||||||
- Trigger downstream jobs if we're on the main job
|
always {
|
||||||
- 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 {
|
|
||||||
script {
|
script {
|
||||||
if (env.JOB_BASE_NAME == '86Box-TestBuildPleaseIgnore') {
|
if (env.JOB_BASE_NAME == '86Box-TestBuildPleaseIgnore') {
|
||||||
["${env.JOB_BASE_NAME}2"].each {
|
["${env.JOB_BASE_NAME}2"].each {
|
||||||
@@ -133,4 +129,3 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user