This page describes how to promote an existing Google Cloud Deploy release to the next target in a delivery pipeline progression.
Before you begin
This page assumes you have already created a release.
Promote the release
When your release is deployed into a target defined in your delivery pipeline, you can promote it to the next target:
gcloud deploy releases promote --release=RELEASE_NAME \ --delivery-pipeline=PIPELINE_NAME \ --region=REGION
RELEASE_NAME is the name of the release you're
PIPELINE_NAME is the name of the delivery pipeline
you're using to manage deployment of this release.
REGION is the name of the region in which the release
was created, for example
us-central1. This is required.
See the Google Cloud SDK
reference for more information about the
gcloud deploy releases promote command.
Click your pipeline shown in the list of delivery pipelines.
The Delivery pipeline details page shows a graphical representation of your delivery pipeline's progress.
On the first target in the delivery pipeline visualization, click Promote.
The Promote release dialog is shown. It shows the details of the target you're promoting to.
If the delivery pipeline or target has changed since the release was created,
Google Cloud Deploy returns a message indicating a possible
mismatch, and prompts
you to confirm the promotion. You can respond
n to the prompt and examine the
differences between the pipeline versions before you proceed. If you choose to
promote anyway, the release is deployed according to the delivery pipeline as it
was defined when the release was created. See
Pipeline instances per release for more
information about pipeline mismatches.
Google Cloud Deploy creates a
rollout for the release into the
destination target, and the release is queued for deployment. When it's
deployed, the delivery pipeline visualization shows that fact:
Manage approvals for a delivery pipeline
You can require approval for any target, and you can approve or reject releases into that target.
Approvals can be managed programmatically by integrating your workflow management system (such as ServiceNow), or other system, with Google Cloud Deploy using Pub/Sub and the Google Cloud Deploy API.
To require approval on any target, set
true in the target
apiVersion: deploy.cloud.google.com/v1 kind: Target metadata: name: description: requireApproval: true
See Delivery pipeline configuration for further details.
When a rollout is pending approval, users or systems that subscribe to the
cd-approvals Pub/Sub topic receive notification and can
then approve or reject the rollout.
When using parallel deployment, you can configure the
multi-target to require approval.
If promotion to the target is rejected, the controller rollout fails, with a
APPROVAL_REJECTED, and the child rollouts are not created.
Approve or reject a rollout
Each target can require approval
before any release is deployed to it. When you promote to a target that
requires approval, Google Cloud Deploy publishes a Pub/Sub message to the
Any user or service account with the role
approve a Google Cloud Deploy rollout to a target that requires approval.
Your integrated workflow management system, having received an approval-required notification using service notifications, can approve or reject the rollout using the Google Cloud Deploy API.
Approve or reject manually
In the Google Cloud console, navigate to the Google Cloud Deploy Delivery pipelines page to view of list of your available delivery pipelines.
Open the Delivery pipelines page
The list of delivery pipelines is shown in Google Cloud console. Delivery pipelines that have been configured but not registered with the Google Cloud Deployservice are not shown.
Click the name of the delivery pipeline.
The pipeline visualization is shown. If approval is pending, and if you have the
roles/clouddeploy.approverrole, or equivalent permissions, the visualization includes a Review link.
A list is shown of rollouts pending approval.
The Approve rollout screen is shown.
The Manifest diff tab shows any changes to the rendered manifest from the currently deployed version (if any) to the one you're now approving (or rejecting).
Click Approve or Reject.
If you approve, your application is deployed into the target. If you reject, the application is not deployed, and can't be approved later unless re-promoted.
A user with the
roles/clouddeploy.approver role can manually approve or
reject a rollout. To approve:
gcloud deploy rollouts approve rollout-name --delivery-pipeline=pipeline-name \ --region=region \ --release=release-name
gcloud deploy rollouts reject rollout-name --delivery-pipeline=pipeline-name \ --region=region \ --release=release-name