Skip to content

Commit

Permalink
feat: [deploy] A new field timed_promote_release_rule is added to m…
Browse files Browse the repository at this point in the history
…essage `.google.cloud.deploy.v1.AutomationRule` (#5806)

* feat: A new field `timed_promote_release_rule` is added to message `.google.cloud.deploy.v1.AutomationRule`
feat: A new message `TimedPromoteReleaseRule` is added
feat: A new field `timed_promote_release_condition` is added to message `.google.cloud.deploy.v1.AutomationRuleCondition`
feat: A new message `TimedPromoteReleaseCondition` is added
feat: A new field `timed_promote_release_operation` is added to message `.google.cloud.deploy.v1.AutomationRun`
feat: A new message `TimedPromoteReleaseOperation` is added
docs: A comment for field `target_id` in message `.google.cloud.deploy.v1.AutomationRun` is changed

PiperOrigin-RevId: 695827924

Source-Link: googleapis/googleapis@4805138

Source-Link: googleapis/googleapis-gen@2b3fa48
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRlcGxveS8uT3dsQm90LnlhbWwiLCJoIjoiMmIzZmE0OGQ0YTNmZDA5ZTU3NjZmZTJkZDY1YWE2NmRkOTdjMTcyYSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Nov 14, 2024
1 parent b288d9f commit 0e61aec
Show file tree
Hide file tree
Showing 4 changed files with 1,905 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4150,9 +4150,48 @@ message AutomationRule {
// rollout.
RepairRolloutRule repair_rollout_rule = 3
[(google.api.field_behavior) = OPTIONAL];

// Optional. The `TimedPromoteReleaseRule` will automatically promote a
// release from the current target(s) to the specified target(s) on a
// configured schedule.
TimedPromoteReleaseRule timed_promote_release_rule = 4
[(google.api.field_behavior) = OPTIONAL];
}
}

// The `TimedPromoteReleaseRule` will automatically promote a release from the
// current target(s) to the specified target(s) on a configured schedule.
message TimedPromoteReleaseRule {
// Required. ID of the rule. This ID must be unique in the `Automation`
// resource to which this rule belongs. The format is
// `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
string id = 1 [(google.api.field_behavior) = REQUIRED];

// Optional. The ID of the stage in the pipeline to which this `Release` is
// deploying. If unspecified, default it to the next stage in the promotion
// flow. The value of this field could be one of the following:
//
// * The last segment of a target name
// * "@next", the next target in the promotion sequence
string destination_target_id = 2 [(google.api.field_behavior) = OPTIONAL];

// Required. Schedule in crontab format. e.g. "0 9 * * 1" for every Monday at
// 9am.
string schedule = 3 [(google.api.field_behavior) = REQUIRED];

// Required. The time zone in IANA format [IANA Time Zone
// Database](https://www.iana.org/time-zones) (e.g. America/New_York).
string time_zone = 4 [(google.api.field_behavior) = REQUIRED];

// Output only. Information around the state of the Automation rule.
AutomationRuleCondition condition = 5
[(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. The starting phase of the rollout created by this rule. Default
// to the first phase.
string destination_phase = 6 [(google.api.field_behavior) = OPTIONAL];
}

// The `PromoteRelease` rule will automatically promote a release from the
// current target to a specified target.
message PromoteReleaseRule {
Expand Down Expand Up @@ -4284,6 +4323,34 @@ message AutomationRuleCondition {
// Optional. Details around targets enumerated in the rule.
TargetsPresentCondition targets_present_condition = 1
[(google.api.field_behavior) = OPTIONAL];

// Details specific to the automation rule type.
oneof rule_type_condition {
// Optional. TimedPromoteReleaseCondition contains rule conditions specific
// to a an Automation with a timed promote release rule defined.
TimedPromoteReleaseCondition timed_promote_release_condition = 2
[(google.api.field_behavior) = OPTIONAL];
}
}

// `TimedPromoteReleaseCondition` contains conditions specific to an Automation
// with a Timed Promote Release rule defined.
message TimedPromoteReleaseCondition {
// The targets involved in a single timed promotion.
message Targets {
// Optional. The source target ID.
string source_target_id = 1 [(google.api.field_behavior) = OPTIONAL];

// Optional. The destination target ID.
string destination_target_id = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Output only. When the next scheduled promotion(s) will occur.
google.protobuf.Timestamp next_promotion_time = 1
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. A list of targets involved in the upcoming timed promotion(s).
repeated Targets targets_list = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// The request object for `CreateAutomation`.
Expand Down Expand Up @@ -4521,9 +4588,9 @@ message AutomationRun {
Automation automation_snapshot = 6
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The ID of the target that represents the promotion stage that
// initiates the `AutomationRun`. The value of this field is the last segment
// of a target name.
// Output only. The ID of the source target that initiates the
// `AutomationRun`. The value of this field is the last segment of a target
// name.
string target_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Current state of the `AutomationRun`.
Expand Down Expand Up @@ -4562,6 +4629,11 @@ message AutomationRun {
// Output only. Repairs a failed 'Rollout'.
RepairRolloutOperation repair_rollout_operation = 17
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Promotes a release to a specified 'Target' as defined in a
// Timed Promote Release rule.
TimedPromoteReleaseOperation timed_promote_release_operation = 19
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// Output only. Earliest time the `AutomationRun` will attempt to resume.
Expand Down Expand Up @@ -4624,6 +4696,20 @@ message RepairRolloutOperation {
string job_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Contains the information of an automated timed promote-release operation.
message TimedPromoteReleaseOperation {
// Output only. The ID of the target that represents the promotion stage to
// which the release will be promoted. The value of this field is the last
// segment of a target name.
string target_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The name of the release to be promoted.
string release = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The starting phase of the rollout created by this operation.
string phase = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// RepairPhase tracks the repair attempts that have been made for
// each `RepairPhaseConfig` specified in the `Automation` resource.
message RepairPhase {
Expand Down
Loading

0 comments on commit 0e61aec

Please sign in to comment.