Skip to main content
Last updated: 14 Aug 2024

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

  1. 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
  2. Go to the image-tags folder in the govuk-helm-charts repo and find the file for your application in the appropriate environment(s).

  3. Update the image tag with the tag version you made a note of in step 1.

  4. 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.

  1. Go to your app’s repo and select Releases.

  2. Find the release number for the version of the app you want to roll back to.

  3. Go to Actions and select Workflows > Deploy.

  4. Select Run workflow and enter the release number that you want to roll back to.

  5. 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

  1. Go to your app’s repo.

  2. Go to Actions and select Workflows > Set automatic_deploys_enabled (optionally image_tag too).

  3. Select Run workflow and complete the fields as required.