Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Dokumen ini menjelaskan resource Cloud Deploy yang digunakan untuk menjalankan
otomatisasi.
Anda dapat mengonfigurasi Cloud Deploy untuk otomatis melakukan tugas pipeline
pengiriman tertentu, seperti mempromosikan rilis atau mempercepat peluncuran ke fase tertentu.
Otomatisasi ini mengandalkan dua resource Cloud Deploy:
Automation itu sendiri
AutomationRun
Resource ini dijelaskan dalam dokumen ini.
Resource Automation
Automation adalah resource Cloud Deploy yang menentukan cara mengotomatiskan satu atau beberapa tugas pipeline pengiriman. Automation mengaitkan satu atau beberapa
resource target dengan satu atau beberapa rules otomatisasi.
Resource Automation mencakup hal berikut:
Referensi ke target (atau target) yang akan digunakan untuk melakukan otomatisasi
(selector).
Aturan otomatisasi yang menentukan cara melakukan otomatisasi.
Metadata, seperti description, annotations, dan labels.
Properti suspended.
Akun layanan yang akan digunakan untuk melakukan otomatisasi. Akun layanan
diperlukan, dan harus memiliki
izin yang diperlukan
untuk melakukan otomatisasi. Otomatisasi tidak mengasumsikan akun layanan default.
Resource Automation adalah resource turunan dari
pipeline pengiriman; jika Anda
menghapus pipeline pengiriman, semua otomatisasi yang
merupakan turunan dari pipeline tersebut juga akan dihapus.
Akun layanan yang Anda gunakan untuk memanggil otomatisasi dapat berupa akun layanan default atau akun layanan lain. Namun, meskipun menggunakan akun layanan default, Anda harus menentukannya, menggunakan properti serviceAccount dalam konfigurasi Automation.
Akun layanan otomatisasi harus memiliki izin iam.serviceAccount.actAs
di
akun layanan eksekusi yang berlaku.
Selain itu, jika akun layanan otomatisasi tidak berada dalam project yang sama dengan
pipeline pengiriman, agen layanan Cloud Deploy harus
memiliki iam.serviceAccount.actAs di akun layanan otomatisasi.
Izin yang diperlukan di akun layanan otomatisasi
Baik Anda menentukan akun layanan default maupun non-default untuk otomatisasi, akun layanan harus memiliki izin berikut:
[[["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\u003eCloud Deploy automations execute delivery pipeline tasks, such as promoting a release or advancing a rollout.\u003c/p\u003e\n"],["\u003cp\u003eAutomations rely on two primary resources: the \u003ccode\u003eAutomation\u003c/code\u003e, which defines the automation process, and the \u003ccode\u003eAutomationRun\u003c/code\u003e, which represents an execution of an automation rule.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAutomation\u003c/code\u003e resource includes a target selector, an automation rule, metadata, a suspended property, and a specified service account to perform the automation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAutomation\u003c/code\u003e resource is a child of the delivery pipeline, meaning deleting a delivery pipeline also deletes its automations.\u003c/p\u003e\n"],["\u003cp\u003eThe automation service account, which must be explicitly defined in the \u003ccode\u003eAutomation\u003c/code\u003e configuration, requires specific permissions, including the ability to \u003ccode\u003eactAs\u003c/code\u003e the execution service account and permissions to perform the automated operations.\u003c/p\u003e\n"]]],[],null,["# About the automation resource\n\nThis document describes the Cloud Deploy resources used to execute\n[automations](/deploy/docs/automation).\n\nYou can configure Cloud Deploy to automatically perform certain delivery\npipeline tasks, such as promote a release or advance a rollout to a given phase.\nThese automations rely on two Cloud Deploy resources:\n\n- The `Automation` itself\n\n- The `AutomationRun`\n\nThese resources are described in this document.\n\nThe `Automation` resource\n-------------------------\n\nAn `Automation` is a Cloud Deploy resource that defines how to automate\none or more delivery pipeline tasks. The `Automation` associates one or more\ntarget resources with one or more automation `rules`.\n\nThe `Automation` resource includes the following:\n\n- A reference to the target (or targets) against which to perform the automation\n (the `selector`).\n\n- An automation rule that determines how to do the automation.\n\n- Metadata, such as `description`, `annotations`, and `labels`.\n\n- A `suspended` property.\n\n- The service account to use to perform the automation. The service account is\n required, and it must have the\n [necessary permissions](/deploy/docs/automation#roles_and_permissions_required)\n to perform the automation. Automation doesn't assume a default service\n account.\n\nThe `Automation` resource is a child resource of the\n[delivery pipeline](/deploy/docs/architecture#resources); if you\n[delete a delivery pipeline](/deploy/docs/delete-pipeline), all automations that\nare children of that pipeline are also deleted.\n\nThe [configuration file schema](/deploy/docs/config-files#automation_definitions)\ndescribes how to configure the `Automation`.\n\nThe `AutomationRun` resource\n----------------------------\n\nAn `AutomationRun` represents an execution of an\n[automation rule](/deploy/docs/automation-rules).\n\nThe automation service account\n------------------------------\n\nThe service account you use to invoke an automation can be the\n[default service account](/deploy/docs/cloud-deploy-service-account#execution_service_account)\nor another service account. However, even if you're using the default service\naccount, you must specify it, using the `serviceAccount` property in the\n`Automation` configuration.\n\nThe automation service account must have `iam.serviceAccount.actAs` permission\non the\n[applicable execution service account](/deploy/docs/cloud-deploy-service-account#execution_service_account).\nAlso, if the automation service account isn't in the same project as the\ndelivery pipeline, the Cloud Deploy\n[service agent](/deploy/docs/cloud-deploy-service-account#service_agent) must\nhave `iam.serviceAccount.actAs` on the automation service account.\n\n### Required permissions on the automation service account\n\nWhether you specify the default or a non-default service account for an\nautomation, the service account must have the following permissions:\n\n- Permission to `actAs` the\n [execution service account](/deploy/docs/cloud-deploy-service-account#execution_service_account).\n\n- [Permissions](/deploy/docs/iam-roles-permissions#permissions) to perform the operations that are being automated. See the\n [automation rules](/deploy/docs/automation-rules) for specific permission\n requirements.\n\nWhat's next\n-----------\n\n- Try the [quickstart: Automate release creation and rollout advancement](/deploy/docs/deploy-app-automation).\n\n- Read about [automation rules](/deploy/docs/automation-rules)."]]