It depends on the tooling you are using and what environment/stack you are deploying to, alongside artifact storage relevant to your deployments.
Not all deployments can be rolled back without extra effort in tooling or application design (e.g how will you roll back a DROP TABLE for a database? Do you have rollback scripts that need to be invoked? Do you use DB snapshots pre-deploy?) GoCD isn't opinionated about this. If you are using a declarative deployment tool or approach you can sometimes trigger a re-run of the previous successful deployment's pipeline instance/stage. Sometimes teams will roll forward (from a GoCD perspective) by initialising a new pipeline run and populating some environment variable to override the artifact versions to deploy. Or use a manual 'rollback' stage in the same pipeline as the normal deploy. As with most other pipeline automation approaches, all of these things depend on your target platform, tooling and application design. https://www.gocd.org/2017/06/20/hotfixes-rollback-rollforward.html may be useful alongside the wider series at https://www.gocd.org/tags/modeling-deployment-pipelines.html -Chad On Fri, 4 Aug 2023, 13:58 Vijayakumaran A., <vijayakumara...@praniontech.com> wrote: > Hi Team, > > How to rollback to the previous deployment. Please any one share any > ideas/Docs to refer. > > -- > You received this message because you are subscribed to the Google Groups > "go-cd" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to go-cd+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/go-cd/933926d9-2ac7-4a34-b994-98a0f9a12c7an%40googlegroups.com > <https://groups.google.com/d/msgid/go-cd/933926d9-2ac7-4a34-b994-98a0f9a12c7an%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/CAA1RwH-gG18mKgqeUMkSz3NYwoHTe%2BWsb0ckSsB4uiPSt003AQ%40mail.gmail.com.