Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan cara melakukan rollback target Cloud Deploy ke rilis
sebelumnya.
Saat Anda melakukan roll back target, Cloud Deploy akan membuat resource rollout baru berdasarkan rilis sebelumnya.
Me-roll back target ke rilis sebelumnya
gcloud CLI
Secara default, rollback menggunakan rilis terakhir dengan peluncuran yang berhasil ke
target yang ditunjukkan, tetapi Anda dapat memilih rilis lain, menggunakan --release.
Untuk melakukan rollback, jalankan perintah berikut dari direktori yang berisi pipeline pengiriman Anda:
Dalam perintah ini, --release dan --rollout-id bersifat opsional.
Gunakan --release untuk mengidentifikasi rilis tertentu yang akan di-roll back. Jika Anda menghapus
opsi ini, Cloud Deploy akan menggunakan rilis baik yang terakhir diketahui
ke target yang ditentukan.
Gunakan --rollout-id untuk menetapkan ID ke rollout yang dihasilkan. Jika Anda menghapusnya, Cloud Deploy akan membuat ID untuk rollout yang dihasilkan.
Rilis ini adalah rilis yang Anda roll back. Nama peluncuran
diisi berdasarkan rilis yang dipilih.
Jika mau, Anda dapat mengubah nama peluncuran dan deskripsi peluncuran
dari default.
Klik Roll back.
Peluncuran baru dibuat dari rilis yang dipilih, dan di-deploy ke
target yang sama.
Melakukan roll back lebih jauh
Anda dapat melakukan rollback secara manual ke rilis yang lebih lama daripada rilis terakhir yang berhasil di-deploy.
Cukup jalankan gcloud deploy releases promote dengan rilis sebelumnya dan
sertakan opsi --to-target yang ditetapkan ke target tempat Anda ingin melakukan rollback
rilis.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-17 UTC."],[[["\u003cp\u003eThis page provides instructions on how to roll back a Cloud Deploy target to a previous release, creating a new rollout based on that earlier release.\u003c/p\u003e\n"],["\u003cp\u003eYou can roll back using the gcloud CLI, specifying the target, delivery pipeline, and optionally the release and rollout ID, with the CLI defaulting to the last successful release if one isn't specified.\u003c/p\u003e\n"],["\u003cp\u003eThe console offers a UI method for rollback, allowing you to select a specific release to roll back to, with the option to customize the rollout name and description.\u003c/p\u003e\n"],["\u003cp\u003eYou can manually rollback to any earlier release by running \u003ccode\u003egcloud deploy releases promote\u003c/code\u003e with the desired release, and the \u003ccode\u003e--to-target\u003c/code\u003e option set to the desired target.\u003c/p\u003e\n"]]],[],null,["# Roll back a target\n\nThis page describes how to roll back a Cloud Deploy target to an earlier\nrelease.\n\nWhen you roll back a target, Cloud Deploy creates a new `rollout`\nresource based on a previous release.\n\nRoll back a target to an earlier release\n----------------------------------------\n\n### gcloud CLI\n\nBy default, the rollback uses the last release with a successful rollout to\nthe indicated target, but you can choose a different one, using `--release`.\n\nTo roll back, run the following command from the directory containing your\ndelivery pipeline: \n\n gcloud deploy targets rollback \u003cvar label=\"target name\" translate=\"no\"\u003eTARGET_NAME\u003c/var\u003e \\\n --delivery-pipeline=\u003cvar label=\"pipeline name\" translate=\"no\"\u003ePIPELINE_NAME\u003c/var\u003e \\\n --release=\u003cvar label=\"release name\" translate=\"no\"\u003eRELEASE_NAME\u003c/var\u003e \\\n --rollout-id=\u003cvar label=\"rollout id\" translate=\"no\"\u003eROLLOUT_ID\u003c/var\u003e\n\nIn this command, `--release` and `--rollout-id` are optional.\nUse `--release` to identify a specific release to roll back to. If you omit\nthis option, then Cloud Deploy uses the last known good release\nto the specified target.\n\nUse `--rollout-id` to assign an identifier to the generated `rollout`. If\nyou omit this, Cloud Deploy generates an ID for the generated\n`rollout`.\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 the progress of your delivery pipeline.\n3. Click the more menu\n and select **Roll back release**.\n\n The rollback form is displayed:\n\n4. Select the release from the **Release** field.\n\n This release is the one which you're rolling back to. The **Rollout name**\n is populated based on the selected release.\n5. If you want, you can change the rollout name and rollout description\n from the default.\n\n6. Click **Roll back**.\n\n A new rollout is created from the chosen release, and deployed into the\n same target.\n\n### Roll back even further\n\nYou can roll back *manually* to an earlier release than the last successfully\ndeployed one.\n\nSimply run `gcloud deploy releases promote` with the earlier release and\ninclude the`--to-target` option set to the target in which you want to roll back\nyour release."]]