Skip to content

Instantly share code, notes, and snippets.

@refactorsaurusrex
Created May 22, 2017 23:07
Show Gist options
  • Save refactorsaurusrex/37b764f10cbeb23bac40281a5a96d2e9 to your computer and use it in GitHub Desktop.
Save refactorsaurusrex/37b764f10cbeb23bac40281a5a96d2e9 to your computer and use it in GitHub Desktop.
Jenkins Pipeline: How to get the status of the previous build
node('whatever') {
stage('blah') {
echo currentBuild.getPreviousBuild().result
}
}
// ref: https://support.cloudbees.com/hc/en-us/articles/217591038-How-to-Iterate-Through-the-Last-Successful-Builds-in-Pipeline-Job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment