On fail: GIT revert


#1

Hi there,

I’ve been exploring for a long time but I must admit I’m quite lost with this issue :slight_smile: I have a pipeline with a list of actions (so far so good) that is triggered on a GIT push. It works well.

However, I would like to set up a GIT rollback action on the commit that triggered the pipeline if one action (or the whole process, whatever) failed.

Even if I create an “on-fail” action on the pipeline and manage somehow to execute GIT commands, there is still the issue of getting the ID of the commit that triggered the pipeline.

Have anyone met this kind of requirement and successfully addressed it please ?

Thanks ahead for your replies.

Chris.


#2

Hey Chris, thanks for joining!
You mentioned ‘the ID of the commit that triggered the pipeline’ – for that you should use BUDDY_EXECUTION_REVISION variable. If you are using it and you’re still having problems, please send the URL to your pipeline to support@buddy.works and we’ll get you from there.