My actual deployment will be from stage1 to stage2. Now I want to be able to rollback stage1 if there is an error or rollback on stage2 if stage1 passes and stage2 does not. I added stage3 as a way to rollback if stage1 fails but i didn’t see how to run only stage3 if stage1 fails.
Better still is there something I can do to add a rollback step as task in stage1 if an error happens then it should run the rollback steps?
What I want to do
First I added a rollback task right in stage1 at the bottom so if any actual task fails it should run the rollback tasks but there was a problem since i have a function that does substitution and so it does not find a value for substitution since the repo is not redownloaded in the same stage. But if there was a way for me to redownload the repo in the same stage my problem would be solve since the substitution is done in the yaml files from the repo.
Marccelus Enoh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.