無料でビルドを開始
CircleCI.comアカデミーブログコミュニティサポート

Manage releases

1 month ago3 min read
Cloud
このページの内容

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 a release environment and Configure your Kubernetes components pages for more information.

Restore version

The restore version command restores a previously released version of a component.

Screenshot showing the restore version button

Steps

  1. Select Releases in the CircleCI web app sidebar

  2. You are now in the timeline view. Select your component from the dropdown menu

  3. Scroll to locate the version your want to restore, and click on the "Restore release" icon in the Actions column

  4. Read through the recommendations in the popup, and if you want to proceed type RESTORE, then click 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.

Screenshot showing the scale component button

Steps

  1. Select Releases in the CircleCI web app sidebar

  2. Select the Components tab

  3. Scroll to find your component a click to enter the component view

  4. Find the active version that you would like to scale and click the ellipsis menu icon ()

  5. Click Scale Component

  6. Read through the notes associated with this command in the popup and to proceed type SCALE and click Scale

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.

Screenshot showing the restart component button

Steps

  1. Select Releases in the CircleCI web app sidebar

  2. Select the Components tab

  3. Scroll to find your component a click to enter the component view

  4. Find the active version that you would like to restart, and click the ellipsis menu icon ()

  5. Click Restart Component

  6. Read the note associated with this command in the popup and to proceed type RESTART and click 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.

Screenshot showing the retry release button

Steps

  1. Select Releases in the CircleCI web app sidebar

  2. You are now in the timeline view. Select your component from the dropdown menu.

  3. Scroll to locate the failed or cancelled release you want to retry. Click on the version number to enter the release details page.

  4. Click to open the ellipsis menu at the top right of the page () and click 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.

Screenshot showing the promote release options

For more information on the Rollouts Promote commands see the Argo Rollouts docs for Rollouts Promote.

Steps

  1. Select Releases in the CircleCI web app sidebar

  2. You are now in the timeline view. Select your component from the dropdown menu.

  3. Scroll to locate the running release you want to promote. Click on the version number to enter the release details page.

  4. You will now see the Promote and Promote All options. Click 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.

Screenshot showing the cancel release button

Steps

  1. Select Releases in the CircleCI web app sidebar

  2. You are now in the timeline view. Select your component from the dropdown menu.

  3. Scroll to locate the running release you want to cancel. Click on the version number to enter the release details page.

  4. Click to open the ellipsis menu at the top right of the page () and click Cancel Release

Notes

Executing the cancel release command is the equivalent to running:

kubectl argo rollouts abort <rollout-name> -n=<namespace>

Suggest an edit to this page

Make a contribution
Learn how to contribute