Roll back your app
You can roll back your app by:
- updating the image tag to an older release in the
govuk-helm-charts
repo - triggering the deploy GitHub Action to deploy an older release - this only works in the integration environment
Updating the image tag to an older release
Get the full commit simple hashing algorithm (SHA) associated with the older release you want to roll back to.
There are multiple ways to do this. For example, if you are using the GitHub user interface:
- go to your app’s repo
- go to Releases > Tags and make a note of the tag of the version you intend to deploy, for example
v234
Go to the
image-tags
folder in thegovuk-helm-charts
repo and find the file for your application in the appropriate environment(s).Update the image tag with the tag version you made a note of in step 1.
Create a pull request and merge the change into the main branch.
Once you have merged your pull request, Argo CD automatically deploys the older version of the app to production.
Triggering the deploy GitHub Action to deploy an older release
When you manually trigger the deploy GitHub Action for an app, you will stop the automatic update of that app’s images. You can re-enable the automatic image update by following the documentation on re-enabling automatic image updates after manual deploys.
Go to your app’s repo and select Releases.
Find the release number for the version of the app you want to roll back to.
Go to Actions and select Workflows > Deploy.
Select Run workflow and enter the release number that you want to roll back to.
Select Run workflow to manually deploy the older version of the app.
Argo CD will then:
- automatically build the image for the older version of the app
- deploy that version of the app
Check the #govuk-deploy-alerts Slack channel for a notification when the older version of the app is successfully deployed.
Re-enabling automatic image updates after manual deploys
Go to your app’s repo.
Go to Actions and select Workflows > Set automatic_deploys_enabled (optionally image_tag too).
Select Run workflow and complete the fields as required.