Skip to content

Instantly share code, notes, and snippets.

@rtyler
Created December 2, 2016 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtyler/14ba266906fc628a21b61fbe916fbd37 to your computer and use it in GitHub Desktop.
Save rtyler/14ba266906fc628a21b61fbe916fbd37 to your computer and use it in GitHub Desktop.
#!/usr/bin/env groovy
node {
stage('Build') {
sh 'make'
}
stage('Test') {
sh 'make check' /* if this returns non-zero, the Pipeline stops */
junit 'reports/**/*.xml'
/* otherwise...we could: */
if (currentBuild.result == 'UNSTABLE') {
return
}
}
stage('Deploy') {
/* .. snip .. */
}
}
@ggtools
Copy link

ggtools commented Dec 2, 2016

Actually I found that lines 11 to 13 should be moved outside the stage to work propertly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment