Issue
We have a jenkins CI/CD pipeline(using Jenkinsfile) which deploys into K8S from various git branches(dev,master etc).
I am now looking to Roll Back to Previous Version of deployment in Jenkins CI/CD.
I went through few stack overflow questions but nothing worked. Could you help please.
Solution
It depends on what you want to achieve.
When using CI/CD, you typically do your changes in a Git repository, and then the changes are validated and rolled out.
A rollback in such workflow, is a revert in the Git repository. The validation and roll out is working the same way.
You may also do things like Canary Deployment with programmed rollbacks, but how you do that depends on how you implement it.
Answered By - Jonas
Answer Checked By - Clifford M. (JavaFixing Volunteer)