2

I know this Forum is not to provide strategy's.

Using Jenkins I have set up CI and CD to my Dev,QA and Staging environments. I am stuck up with Rollback strategy for all my environments.

1- What happens if my build fails in Dev

2- What happens if my build fails in QA and passed in Dev.

3- What happens if my build fails in Staging and passed in Dev and QA.

How should I roll back and get things done considering DB in not in place. I have created sample workflow but not sure its an right process.

enter image description here

enter image description here

asur
  • 1,759
  • 7
  • 38
  • 81

1 Answers1

1

Generally you can achieve this in 2 ways:

  1. Setting up some sort of release management tool that tracks every execution of your pipeline and snapshots the variables, artifacts, etc... that was used on that exact execution, then you can just run an earlier release of it (check tools like octopus deploy)

  2. If you are using a branch strategy with tags you can parameterize your jobs, passing the tag you wanna build, and build the "earlier tag" if something fails. Check the rebuild option for older job executions.

Juan Sebastian
  • 968
  • 1
  • 7
  • 20