- Resource: Automation
- Methods
Resource: Automation
An Automation
resource in the Cloud Deploy API.
An Automation
enables the automation of manually driven actions for a Delivery Pipeline, which includes Release promotion among Targets, Rollout repair and Rollout deployment strategy advancement. The intention of Automation is to reduce manual intervention in the continuous delivery process.
JSON representation |
---|
{ "name": string, "uid": string, "description": string, "createTime": string, "updateTime": string, "annotations": { string: string, ... }, "labels": { string: string, ... }, "etag": string, "suspended": boolean, "serviceAccount": string, "selector": { object ( |
Fields | |
---|---|
name |
Output only. Name of the |
uid |
Output only. Unique identifier of the |
description |
Optional. Description of the |
create |
Output only. Time at which the automation was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
update |
Output only. Time at which the automation was updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
annotations |
Optional. User annotations. These attributes can only be set and used by the user, and not by Cloud Deploy. Annotations must meet the following constraints:
See https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set for more details. An object containing a list of |
labels |
Optional. Labels are attributes that can be set and used by both the user and by Cloud Deploy. Labels must meet the following constraints:
Both keys and values are additionally constrained to be <= 63 characters. An object containing a list of |
etag |
Optional. The weak etag of the |
suspended |
Optional. When Suspended, automation is deactivated from execution. |
service |
Required. Email address of the user-managed IAM service account that creates Cloud Deploy release and rollout resources. |
selector |
Required. Selected resources to which the automation will be applied. |
rules[] |
Required. List of Automation rules associated with the Automation resource. Must have at least one rule and limited to 250 rules per Delivery Pipeline. Note: the order of the rules here is not the same as the order of execution. |
AutomationResourceSelector
AutomationResourceSelector contains the information to select the resources to which an Automation is going to be applied.
JSON representation |
---|
{
"targets": [
{
object ( |
Fields | |
---|---|
targets[] |
Contains attributes about a target. |
AutomationRule
AutomationRule
defines the automation activities.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field rule . The configuration of the Automation rule. rule can be only one of the following: |
|
promote |
Optional. |
advance |
Optional. The |
repair |
Optional. The |
PromoteReleaseRule
The PromoteRelease
rule will automatically promote a release from the current target to a specified target.
JSON representation |
---|
{
"id": string,
"wait": string,
"destinationTargetId": string,
"condition": {
object ( |
Fields | |
---|---|
id |
Required. ID of the rule. This id must be unique in the |
wait |
Optional. How long the release need to be paused until being promoted to the next target. A duration in seconds with up to nine fractional digits, ending with ' |
destination |
Optional. The ID of the stage in the pipeline to which this
|
condition |
Output only. Information around the state of the Automation rule. |
destination |
Optional. The starting phase of the rollout created by this operation. Default to the first phase. |
AutomationRuleCondition
AutomationRuleCondition
contains conditions relevant to an Automation
rule.
JSON representation |
---|
{
"targetsPresentCondition": {
object ( |
Fields | |
---|---|
targets |
Optional. Details around targets enumerated in the rule. |
AdvanceRolloutRule
The rollouts.advance
automation rule will automatically advance a successful Rollout to the next phase.
JSON representation |
---|
{
"id": string,
"sourcePhases": [
string
],
"wait": string,
"condition": {
object ( |
Fields | |
---|---|
id |
Required. ID of the rule. This id must be unique in the |
source |
Optional. Proceeds only after phase name matched any one in the list. This value must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: |
wait |
Optional. How long to wait after a rollout is finished. A duration in seconds with up to nine fractional digits, ending with ' |
condition |
Output only. Information around the state of the Automation rule. |
RepairRolloutRule
The RepairRolloutRule
automation rule will automatically repair a failed Rollout
.
JSON representation |
---|
{ "id": string, "phases": [ string ], "jobs": [ string ], "condition": { object ( |
Fields | |
---|---|
id |
Required. ID of the rule. This id must be unique in the |
phases[] |
Optional. Phases within which jobs are subject to automatic repair actions on failure. Proceeds only after phase name matched any one in the list, or for all phases if unspecified. This value must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: |
jobs[] |
Optional. Jobs to repair. Proceeds only after job name matched any one in the list, or for all jobs if unspecified or empty. The phase that includes the job must match the phase ID specified in |
condition |
Output only. Information around the state of the 'Automation' rule. |
repair |
Required. Defines the types of automatic repair phases for failed jobs. |
RepairPhaseConfig
Configuration of the repair phase.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field repair_phase . The repair phase to perform. repair_phase can be only one of the following: |
|
retry |
Optional. Retries a failed job. |
rollback |
Optional. Rolls back a |
Retry
Retries the failed job.
JSON representation |
---|
{
"attempts": string,
"wait": string,
"backoffMode": enum ( |
Fields | |
---|---|
attempts |
Required. Total number of retries. Retry is skipped if set to 0; The minimum value is 1, and the maximum value is 10. |
wait |
Optional. How long to wait for the first retry. Default is 0, and the maximum value is 14d. A duration in seconds with up to nine fractional digits, ending with ' |
backoff |
Optional. The pattern of how wait time will be increased. Default is linear. Backoff mode will be ignored if |
Rollback
Rolls back a Rollout
.
JSON representation |
---|
{ "destinationPhase": string, "disableRollbackIfRolloutPending": boolean } |
Fields | |
---|---|
destination |
Optional. The starting phase ID for the |
disable |
Optional. If pending rollout exists on the target, the rollback operation will be aborted. |
Methods |
|
---|---|
|
Creates a new Automation in a given project and location. |
|
Deletes a single Automation resource. |
|
Gets details of a single Automation. |
|
Lists Automations in a given project and location. |
|
Updates the parameters of a single Automation resource. |