-
Notifications
You must be signed in to change notification settings - Fork 811
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pipeline_template): Correctly handle multiple stage injects
- Loading branch information
1 parent
6745adb
commit 6556540
Showing
5 changed files
with
135 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
orca-pipelinetemplate/src/test/resources/integration/v1schema/stageInjection-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
schema: "1" | ||
pipeline: | ||
application: orca | ||
name: Stage Injection Test | ||
variables: | ||
waitTime: 5 | ||
stages: | ||
- id: first | ||
type: wait | ||
inject: | ||
first: true | ||
config: | ||
waitTime: "{{ waitTime }}" | ||
- id: last | ||
type: wait | ||
inject: | ||
last: true | ||
config: | ||
waitTime: "{{ waitTime }}" | ||
- id: afterWait2 | ||
type: wait | ||
inject: | ||
after: [wait2] | ||
config: | ||
waitTime: "{{ waitTime }}" | ||
- id: beforeWait2 | ||
type: wait | ||
inject: | ||
before: [wait2] | ||
config: | ||
waitTime: "{{ waitTime }}" |
66 changes: 66 additions & 0 deletions
66
orca-pipelinetemplate/src/test/resources/integration/v1schema/stageInjection-expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"keepWaitingPipelines": false, | ||
"limitConcurrent": true, | ||
"application": "orca", | ||
"name": "Stage Injection Test", | ||
"stages": [ | ||
{ | ||
"requisiteStageRefIds": [], | ||
"name": "first", | ||
"id": null, | ||
"refId": "first", | ||
"type": "wait", | ||
"waitTime": 5 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["first"], | ||
"name": "wait", | ||
"id": null, | ||
"refId": "wait", | ||
"type": "wait", | ||
"waitTime": 5 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["wait"], | ||
"name": "wait3", | ||
"id": null, | ||
"refId": "wait3", | ||
"type": "wait", | ||
"waitTime": 5 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["wait"], | ||
"name": "beforeWait2", | ||
"id": null, | ||
"refId": "beforeWait2", | ||
"type": "wait", | ||
"waitTime": 5 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["beforeWait2"], | ||
"name": "wait2", | ||
"id": null, | ||
"refId": "wait2", | ||
"type": "wait", | ||
"waitTime": 5 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["wait2"], | ||
"name": "afterWait2", | ||
"id": null, | ||
"refId": "afterWait2", | ||
"type": "wait", | ||
"waitTime": 5 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["wait3", "afterWait2"], | ||
"name": "last", | ||
"id": null, | ||
"refId": "last", | ||
"type": "wait", | ||
"waitTime": 5 | ||
} | ||
], | ||
"id": "unknown", | ||
"notifications": [] | ||
} |
24 changes: 24 additions & 0 deletions
24
orca-pipelinetemplate/src/test/resources/integration/v1schema/stageInjection-template.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
schema: "1" | ||
id: stageInjection | ||
metadata: | ||
name: Stage injection | ||
description: Stage injection test | ||
variables: | ||
- name: waitTime | ||
description: The time a wait stage should pause | ||
type: int | ||
stages: | ||
- id: wait | ||
type: wait | ||
config: | ||
waitTime: "{{ waitTime }}" | ||
- id: wait2 | ||
type: wait | ||
dependsOn: [wait] | ||
config: | ||
waitTime: "{{ waitTime }}" | ||
- id: wait3 | ||
type: wait | ||
dependsOn: [wait] | ||
config: | ||
waitTime: "{{ waitTime }}" |