Skip to content

Commit

Permalink
feat: isPriorityPhase on lifecycle phase. (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
domenicsim1 authored Oct 16, 2024
1 parent 7ec84b1 commit 376f033
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/lifecycles/lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func TestLifecycleAsJSON(t *testing.T) {
"AutomaticDeploymentTargets": ["test-AutomaticDeploymentTargets-1"],
"Id": "test-phase-id-1",
"IsOptionalPhase": true,
"IsPriorityPhase": false,
"MinimumEnvironmentsBeforePromotion": 123,
"Name": "test-phase-name-1",
"OptionalDeploymentTargets": ["Environments-1"],
Expand All @@ -65,6 +66,7 @@ func TestLifecycleAsJSON(t *testing.T) {
"OptionalDeploymentTargets": [],
"MinimumEnvironmentsBeforePromotion": 0,
"IsOptionalPhase": false,
"IsPriorityPhase": false,
"ReleaseRetentionPolicy": null,
"TentacleRetentionPolicy": null
}
Expand Down Expand Up @@ -206,6 +208,7 @@ func TestLifecycleFromJson(t *testing.T) {
],
"MinimumEnvironmentsBeforePromotion": 1,
"IsOptionalPhase": true,
"IsPriorityPhase": false,
"ReleaseRetentionPolicy": {
"Unit": "Days",
"QuantityToKeep": 1,
Expand All @@ -224,6 +227,7 @@ func TestLifecycleFromJson(t *testing.T) {
"OptionalDeploymentTargets": [],
"MinimumEnvironmentsBeforePromotion": 0,
"IsOptionalPhase": false,
"IsPriorityPhase": false,
"ReleaseRetentionPolicy": null,
"TentacleRetentionPolicy": null
}
Expand Down
1 change: 1 addition & 0 deletions pkg/lifecycles/phase.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ type Phase struct {
AutomaticDeploymentTargets []string `json:"AutomaticDeploymentTargets"`
ID string `json:"Id,omitempty"`
IsOptionalPhase bool `json:"IsOptionalPhase"`
IsPriorityPhase bool `json:"IsPriorityPhase"`
MinimumEnvironmentsBeforePromotion int32 `json:"MinimumEnvironmentsBeforePromotion"`
Name string `json:"Name" validate:"required"`
OptionalDeploymentTargets []string `json:"OptionalDeploymentTargets"`
Expand Down

0 comments on commit 376f033

Please sign in to comment.