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.

Revisions

  1. refactorsaurusrex created this gist May 22, 2017.
    7 changes: 7 additions & 0 deletions jenkinsfile.groovy
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    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