-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
-
iapetus, 1.0, Blue Ocean 1.0-rc3, Blue Ocean 1.0-rc4, Blue Ocean - 1.1-beta-1, Blue Ocean - 1.1-beta2, Blue Ocean 1.1-beta4
Post steps
- Runs after a stage has finished executing
- Runs after a pipeline has finished executing
Can run when:
- Always - even if the steps before the post steps fail, the post steps will always run
- Failed - runs only when the proceeding steps have failed
- Success - runs only when the proceeding steps have passed
- unstable - runs only when the proceeding steps have been marked as unstable
- changed - runs only when the state has changed relative to the previous run
- e.g. stage "foo" was success in run 1, then fails in run 2 would these steps ever be run
https://jenkins.io/doc/pipeline/tour/post/
Example
pipeline { agent any stages { stage('No-op') { steps { sh 'ls' } } } post { always { echo 'One way or another, I have finished' deleteDir() /* clean up our workspace */ } success { echo 'I succeeeded!' } unstable { echo 'I am unstable :/' } failure { echo 'I failed :(' } changed { echo 'Things were different before...' } } }
Pipeline Settings
https://invis.io/Q2A110KM9#/233893917_Editor-Home_W_Parallels
[https://zpl.io/1h9jFU
]
Stage
[https://invis.io/Q2A110KM9#/233884743_Editor-Reorder_Parallels
https://zpl.io/Z1FptFb
Animation & timing
http://codepen.io/brody/pen/gWZvrr