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 |
createTime |
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: |
updateTime |
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. |
serviceAccount |
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. |
TargetAttribute
Contains criteria for selecting Targets.
JSON representation |
---|
{ "id": string, "labels": { string: string, ... } } |
Fields | |
---|---|
id |
ID of the
|
labels |
Target labels. An object containing a list of |
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: |
|
promoteReleaseRule |
Optional. |
advanceRolloutRule |
Optional. The |
repairRolloutRule |
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 ' |
destinationTargetId |
Optional. The ID of the stage in the pipeline to which this
|
condition |
Output only. Information around the state of the Automation rule. |
destinationPhase |
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 | |
---|---|
targetsPresentCondition |
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 |
sourcePhases[] |
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,
"jobs": [
string
],
"condition": {
object ( |
Fields | |
---|---|
id |
Required. ID of the rule. This id must be unique in the |
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. |
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. |