Skip to content

Instantly share code, notes, and snippets.

@norrs
Created August 12, 2016 12:46
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 norrs/ba7ea06ad4e50c0791f8d85da80c0f35 to your computer and use it in GitHub Desktop.
Save norrs/ba7ea06ad4e50c0791f8d85da80c0f35 to your computer and use it in GitHub Desktop.
pipeline:
try {
stage 'build':
node {
..
..
}
stage 'deploy stage':
....
stage 'deploy prod':
timeout(5 days...) {
input 'wait for approval'
LOTS of advanced deploy rollout mechanics which can throw exception which should FAIL the build if something goes WRONG.
}
...
} catch (e) {
currentBuild.result = "FAILURE"
} finally {
notifyBuild(currentBuild.result)
}
So how can we set currentBuild.result = "ABORTED" when input simply times out?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment