Skip to content

Commit

Permalink
🎨 Add conditions to manual promotions and change structure slightly (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Munklinde96 authored Sep 11, 2024
1 parent 4c53824 commit 9f82b30
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 42 deletions.
63 changes: 35 additions & 28 deletions docs/docs/api/platform-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4183,6 +4183,22 @@ The actual log message



<a name="api-v1-capsule-pipeline-PhaseMessage"></a>

### PhaseMessage



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| message | [string](#string) | | |
| timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |






<a name="api-v1-capsule-pipeline-PhaseStatus"></a>

### PhaseStatus
Expand All @@ -4194,7 +4210,7 @@ The actual log message
| environment_id | [string](#string) | | |
| state | [PhaseState](#api-v1-capsule-pipeline-PhaseState) | | |
| rollout_id | [uint64](#uint64) | | |
| message | [string](#string) | | |
| messages | [PhaseMessage](#api-v1-capsule-pipeline-PhaseMessage) | repeated | |



Expand Down Expand Up @@ -8078,6 +8094,22 @@ A docker image tag.



<a name="model-FieldPrefixes"></a>

### FieldPrefixes



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| inclusion | [bool](#bool) | | |
| prefixes | [string](#string) | repeated | |






<a name="model-Phase"></a>

### Phase
Expand All @@ -8087,7 +8119,7 @@ A docker image tag.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| environment_id | [string](#string) | | Environment to promote to. The project must be active in this environment. |
| fixed_fields | [string](#string) | repeated | Fixed fields, that are not changed upon promotion. |
| field_prefixes | [FieldPrefixes](#model-FieldPrefixes) | | Fields prefixes to either promote or not. |
| triggers | [PromotionTrigger](#model-PromotionTrigger) | repeated | Promotion triggers. |


Expand Down Expand Up @@ -8122,39 +8154,14 @@ A docker image tag.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| manual | [PromotionTrigger.Manual](#model-PromotionTrigger-Manual) | | |
| auto | [PromotionTrigger.Auto](#model-PromotionTrigger-Auto) | | |






<a name="model-PromotionTrigger-Auto"></a>

### PromotionTrigger.Auto



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| automatic | [bool](#bool) | | |
| time_alive | [google.protobuf.Duration](#google-protobuf-Duration) | | |






<a name="model-PromotionTrigger-Manual"></a>

### PromotionTrigger.Manual










Expand Down
7 changes: 6 additions & 1 deletion proto/rig/api/v1/capsule/pipeline/status.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ message PhaseStatus {
string environment_id = 1;
PhaseState state = 2;
uint64 rollout_id = 3;
string message = 4;
repeated PhaseMessage messages = 4;
}

message PhaseMessage {
string message = 1;
google.protobuf.Timestamp timestamp = 2;
}

enum State {
Expand Down
23 changes: 10 additions & 13 deletions proto/rig/model/pipeline.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,20 @@ message Pipeline {
message Phase {
// Environment to promote to. The project must be active in this environment.
string environment_id = 1;
// Fixed fields, that are not changed upon promotion.
repeated string fixed_fields = 2;
// Fields prefixes to either promote or not.
FieldPrefixes field_prefixes = 2;
// Promotion triggers.
repeated PromotionTrigger triggers = 3;
}

message PromotionTrigger {
message Manual {}

message Auto {
oneof trigger {
google.protobuf.Duration time_alive = 1;
}
}
message FieldPrefixes {
bool inclusion = 1;
repeated string prefixes = 2;
}

oneof trigger {
Manual manual = 1;
Auto auto = 2;
message PromotionTrigger {
bool automatic = 1;
oneof condition {
google.protobuf.Duration time_alive = 2;
}
}

0 comments on commit 9f82b30

Please sign in to comment.