Manage releases
The steps outlined on this page guide you through the tasks required to manage your releases.
Prerequisites
Before following the steps below, ensure the release environment has been set up and configured successfully. Refer to the Set up CircleCI releases and Configure your Kubernetes components pages for more information.
Restore version
The restore version command restores a previously released version of a component.
Steps
The steps outlined here are to revert a release from the release dashboard in the CircleCI web app. Is it also possible to run this command from a release details page. Select a release number to view a release details page. |
-
Select Releases in the CircleCI web app sidebar
-
You are now in the timeline view. Select your component from the dropdown menu
-
Scroll to locate the version your want to restore, and select the "Restore release" icon in the Actions column
-
Read through the recommendations in the popup, and if you want to proceed type
RESTORE
, then select Restore. We recommend reverting the associated changes in your source repository as soon as possible after using this command
Notes
Executing the restore version command from the CircleCI web app is the equivalent of using the following:
-
If you are using Helm (Helm opt-in instructions are here):
helm rollback <release-name> <revision-number> -n <namespace>
-
If you are using Argo Rollouts and not Helm:
kubectl argo rollouts undo <rollout-name> --to-revision=<revision_number>
If
revision_number
is not supplied the component will be rolled back to the previous revision -
For a Kubernetes Deployment:
kubectl rollout undo deployment/<deployment-name> -n <namespace> --to-revision=<revision-number>
Scale component
The scale component command allows you to scale up or down a currently live version of a component.
Steps
-
Select Releases in the CircleCI web app sidebar
-
Select the Components tab
-
Scroll to find and select your component to enter the component view
-
Find the active version that you would like to scale and select the ellipsis menu icon ()
-
Select Scale Component
-
Read through the notes associated with this command in the popup and to proceed type
SCALE
and select Scale
Any Horizontal Pod Autoscalers (HPAs) defined for this component will be deleted as a result of this action |
Notes
Executing the scale component command is the equivalent of the following:
-
If you are using Argo Rollouts:
kubectl patch rollout <rollout_name> -n <namespace> --type='json' -p='[{"op": "replace", "path": "/spec/replicas", "value": <number_of_replicas>}]'
-
For a Kubernetes Deployment:
kubectl patch deployment <deployment_name> -n <namespace> --type='json' -p='[{"op": "replace", "path": "/spec/replicas", "value": <number_of_replicas>}]'
Restart component
The restart component command allows you to restart a currently live version of a component.
Steps
-
Select Releases in the CircleCI web app sidebar
-
Select the Components tab
-
Scroll to find and select your component to enter the component view
-
Find the active version that you would like to restart and select the ellipsis menu icon ()
-
Select Restart Component
-
Read the note associated with this command in the popup and to proceed type
RESTART
and select RESTART
Notes
Executing the restart component command is the equivalent of the following:
-
If you are using Argo Rollouts:
kubectl patch rollout my-rollout -n my-namespace --type='json' -p='[{"op": "replace", "path": "/spec/restartAt", "value": <timestamp>}]'
-
For a Kubernetes Deployment:
kubectl rollout restart deployment/<deployment-name> -n <namespace>
Retry release
Use the retry release command to retry a release that has failed or been cancelled. For more information about this command, see Argo Rollout retry.
Steps
-
Select Releases in the CircleCI web app sidebar
-
You are now in the timeline view. Select your component from the dropdown menu.
-
Scroll to locate the failed or cancelled release you want to retry. Select the version number to enter the release details page.
-
Open the ellipsis menu at the top right of the page () and select Retry Release
Notes
Executing the retry release command is the equivalent to running:
kubectl argo rollouts retry <rollout-name> -n=<namespace>
Promote
Use the promote commands to promote a release that is paused at a step. You have the option to either promote a single step, to skip that step, or Promote All to skip all steps and complete the release. The Promote and Promote All options are visible in the step view on the release details page.
For more information on the Rollouts Promote commands see the Argo Rollouts docs for Rollouts Promote.
Steps
-
Select Releases in the CircleCI web app sidebar
-
You are now in the timeline view. Select your component from the dropdown menu.
-
Scroll to locate the running release you want to promote. Select the version number to enter the release details page.
-
You will now see the Promote and Promote All options. Select Promote to promote the release as required. The command will be run immediately with no intermediary checks.
Notes
Executing the promote commands are equivalent to the following:
-
Promote a single step:
kubectl argo rollouts promote <rollout-name>
-
Promote all:
kubectl argo rollouts promote --full <rollout-name>
Cancel release
Use the cancel release command to stop a release from progressing, and revert all steps. For more information see the Argo Rollouts docs for Rollouts Abort.
Steps
-
Select Releases in the CircleCI web app sidebar
-
You are now in the timeline view. Select your component from the dropdown menu.
-
Scroll to locate the running release you want to cancel. Select the version number to enter the release details page.
-
Open the ellipsis menu at the top right of the page () and select Cancel Release.
Notes
Executing the cancel release command is the equivalent to running:
kubectl argo rollouts abort <rollout-name> -n=<namespace>