[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-03 (世界標準時間)。"],[[["\u003cp\u003eThis page details how to promote an existing Cloud Deploy release to the next target in your delivery pipeline progression.\u003c/p\u003e\n"],["\u003cp\u003eYou can promote a release using the \u003ccode\u003egcloud deploy releases promote\u003c/code\u003e command, specifying the release, pipeline, and region, and optionally a target.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Cloud console allows you to promote a release through a visual representation of your delivery pipeline, clicking the promote button in the relevant target.\u003c/p\u003e\n"],["\u003cp\u003eCloud Deploy enables you to require approval before a release is deployed to a target, using the \u003ccode\u003erequireApproval\u003c/code\u003e setting in the target configuration.\u003c/p\u003e\n"],["\u003cp\u003eApprovals can be managed manually through the Google Cloud console, or programmatically via Pub/Sub and the Cloud Deploy API, with users requiring \u003ccode\u003eroles/clouddeploy.approver\u003c/code\u003e to approve or reject.\u003c/p\u003e\n"]]],[],null,["# Promote your release and manage approvals\n\nThis page describes how to promote an existing Cloud Deploy release to the\nnext target in a delivery pipeline [progression](/deploy/docs/terminology#progression).\n\nBefore you begin\n----------------\n\nThis page assumes you have already [created a release](/deploy/docs/deploying-application#invoke_your_delivery_pipeline_to_create_a_release).\n\nPromote the release\n-------------------\n\nWhen your release is deployed into a target defined in your delivery pipeline,\nyou can promote it to the next target: \n\n### gcloud\n\n gcloud deploy releases promote --release=\u003cvar translate=\"no\"\u003eRELEASE_NAME\u003c/var\u003e \\\n --delivery-pipeline=\u003cvar translate=\"no\"\u003ePIPELINE_NAME\u003c/var\u003e \\\n --region=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e\n\nWhere:\n\n\u003cvar translate=\"no\"\u003eRELEASE_NAME\u003c/var\u003e is the name of the release you're\npromoting.\n\n\u003cvar translate=\"no\"\u003ePIPELINE_NAME\u003c/var\u003e is the name of the delivery pipeline\nyou're using to manage deployment of this release.\n\n\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e is the name of the region in which the release\nwas created, for example `us-central1`. This is required.\n\nSee the Google Cloud SDK\nreference for more information about the\n[`gcloud deploy releases promote` command](/sdk/gcloud/reference/deploy/releases/promote).\n| **Note:** you can also include `--to-target=`\u003cvar translate=\"no\"\u003eTARGET_NAME\u003c/var\u003e to specify a destination target. If you omit `--to-target`, the release is promoted to the next target in the promotion sequence.\n\n### Console\n\n1. [Open the Delivery\n pipelines page](https://console.cloud.google.com/deploy/delivery-pipelines).\n\n2. Click your pipeline shown in the list of delivery pipelines.\n\n The Delivery pipeline details page shows a graphical representation of\n your delivery pipeline's progress.\n\n3. On the first target in the delivery pipeline visualization, click **Promote**.\n\n The **Promote release** dialog is shown. It shows the details of the\n target you're promoting to.\n4. Click **Promote**.\n\nIf the delivery pipeline or target has changed since the release was created,\nCloud Deploy returns a message indicating a possible\n[mismatch](/deploy/docs/pipeline-instances#when_does_this_matter), and prompts\nyou to confirm the promotion. You can respond `n` to the prompt and examine the\ndifferences between the pipeline versions before you proceed. If you choose to\npromote anyway, the release is deployed according to the delivery pipeline as it\nwas defined when the release was created. See\n[Pipeline instances per release](/deploy/docs/pipeline-instances) for more\ninformation about pipeline mismatches.\n\nCloud Deploy creates a `rollout` for the release into the\ndestination target, and the release is queued for deployment. When it's\ndeployed, the delivery pipeline visualization shows that fact:\n\nManage approvals for a delivery pipeline\n----------------------------------------\n\nYou can [require approval](/deploy/docs/promote-release#require_approval) for\nany target, and you can approve or reject releases into that target.\n\nApprovals can be managed programmatically by integrating your workflow\nmanagement system (such as ServiceNow), or other system, with\nCloud Deploy using Pub/Sub and the Cloud Deploy\nAPI.\n\n### Require approval\n\nTo require approval on any target, set `requireApproval` to `true` in the target\nconfiguration: \n\n apiVersion: deploy.cloud.google.com/v1\n kind: Target\n metadata:\n name:\n description:\n requireApproval: true\n\nSee [Delivery pipeline configuration](/deploy/docs/config-files#requireapproval)\nfor further details.\n\nWhen a rollout is pending approval, users or systems that subscribe to the\n`clouddeploy-approvals` Pub/Sub topic receive notification, from the\n`clouddeploy-approvals` topic, and can then approve or reject the rollout.\n\nWhen using [parallel deployment](/deploy/docs/parallel), you can configure the\nmulti-target to [require approval](/deploy/docs/parallel#approvals_for_parallel_deployment).\nIf promotion to the target is rejected, the controller rollout fails, with a\nstate of `APPROVAL_REJECTED`, and the child rollouts are not created.\n\n### Approve or reject a rollout\n\nAny user or service account with the role `roles/clouddeploy.approver` can\napprove a Cloud Deploy rollout to a target that requires approval.\n\nYour integrated workflow management system, having received an approval-required\nnotification using [service notifications](/deploy/docs/subscribe-deploy-notifications),\ncan approve or reject the rollout using the Cloud Deploy API.\n\n#### Approve or reject manually\n\n### Console\n\n1. In the Google Cloud console, navigate to the Cloud Deploy\n **Delivery pipelines** page to view of list of your available delivery\n pipelines.\n\n [Open the Delivery pipelines page](https://console.cloud.google.com/deploy/delivery-pipelines)\n\n The list of delivery pipelines is shown in Google Cloud console.\n Delivery pipelines that have been configured but not [registered](/deploy/docs/deploying-application#defining_your_delivery_pipeline)\n with the Cloud Deployservice are not shown.\n2. Click the name of the delivery pipeline.\n\n The pipeline visualization is shown. If approval is pending, and if you\n have the `roles/clouddeploy.approver` role, or equivalent permissions,\n the visualization includes a **Review** link.\n\n3. Click **Review**.\n\n A list is shown of rollouts pending approval.\n\n4. Click **Review**.\n\n The Approve rollout screen is shown.\n\n The **Manifest diff** tab shows any changes to the rendered manifest from\n the currently deployed version (if any) to the one you're now approving\n (or rejecting).\n5. Click **Approve** or **Reject**.\n\n If you approve, your application is deployed into the target. If you\n reject, the application is not deployed, and can't be approved later\n unless re-promoted.\n\n### gcloud\n\nA user with the `roles/clouddeploy.approver` role can manually approve or\nreject a rollout. To approve: \n\n gcloud deploy rollouts approve \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003erollout\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e-\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003ename\u003c/span\u003e\u003c/var\u003e --delivery-pipeline=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003epipeline\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e-\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003ename\u003c/span\u003e\u003c/var\u003e \\\n --region=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eregion\u003c/span\u003e\u003c/var\u003e \\\n --release=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-k\"\u003erelease\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e-\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003ename\u003c/span\u003e\u003c/var\u003e\n\nTo reject: \n\n gcloud deploy rollouts reject \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003erollout\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e-\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003ename\u003c/span\u003e\u003c/var\u003e --delivery-pipeline=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003epipeline\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e-\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003ename\u003c/span\u003e\u003c/var\u003e \\\n --region=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eregion\u003c/span\u003e\u003c/var\u003e \\\n --release=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-k\"\u003erelease\u003c/span\u003e\u003cspan class=\"devsite-syntax-o\"\u003e-\u003c/span\u003e\u003cspan class=\"devsite-syntax-n\"\u003ename\u003c/span\u003e\u003c/var\u003e"]]