Doing rollbacks with Jenkins pipeline

446 views
Skip to first unread message

Christian Posta

unread,
Nov 17, 2016, 3:45:43 PM11/17/16
to Jenkins Users
Looking for thoughts on how to add rollback steps to a Jenkinsfile / pipeline when something fails.. for example, i may want to do a rollback of DB changes if a pipeline fails in a particular stage, etc. Any pointers would be appreciated!

Baptiste Mathus

unread,
Nov 18, 2016, 12:53:37 AM11/18/16
to jenkins...@googlegroups.com

IIUC you just want to use try/catch syntax. Do the rollback you want in the catch block.

HTH


Le 17 nov. 2016 9:45 PM, "Christian Posta" <christi...@gmail.com> a écrit :
Looking for thoughts on how to add rollback steps to a Jenkinsfile / pipeline when something fails.. for example, i may want to do a rollback of DB changes if a pipeline fails in a particular stage, etc. Any pointers would be appreciated!

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6b47d4a2-5648-4be4-8882-5bd2a904dc5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages