Skip to content

Instantly share code, notes, and snippets.

@daipresents
Last active July 21, 2017 10:00
Show Gist options
  • Save daipresents/e6e48615ca45c20b776fc42a5d559ed4 to your computer and use it in GitHub Desktop.
Save daipresents/e6e48615ca45c20b776fc42a5d559ed4 to your computer and use it in GitHub Desktop.
stage('build something'){
def build_info
try {
build_info = build job: build_something
currentBuild.result = "SUCCESS"
} catch {
println 'Job was failed.'
currentBuild.result = "FAILURE"
} finally {
println "Build number: ${build_info.getNumber()}"
}
}
stage('build something'){
def build_info = build job: build_something, propagate: false
println "Build number: ${job_info.getNumber()}"
currentBuild.result = job_info.getResult()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment