Created
May 22, 2017 23:07
-
-
Save refactorsaurusrex/37b764f10cbeb23bac40281a5a96d2e9 to your computer and use it in GitHub Desktop.
Jenkins Pipeline: How to get the status of the previous build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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