forked from spinnaker/orca
-
Notifications
You must be signed in to change notification settings - Fork 0
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): Multiple fixes from integration suite (spinna…
…ker#1616) * fix(pipeline_template): Correctly handle multiple stage injects * fix(pipeline_template): Fix module rendering in partials
- Loading branch information
1 parent
027dd74
commit 86c8e1b
Showing
21 changed files
with
441 additions
and
16 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
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
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
7 changes: 7 additions & 0 deletions
7
orca-pipelinetemplate/src/test/resources/integration/v1schema/conditionalStage-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,7 @@ | ||
--- | ||
schema: "1" | ||
pipeline: | ||
application: orca | ||
variables: | ||
includeStage: false | ||
stages: [] |
9 changes: 9 additions & 0 deletions
9
orca-pipelinetemplate/src/test/resources/integration/v1schema/conditionalStage-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,9 @@ | ||
{ | ||
"id": "unknown", | ||
"keepWaitingPipelines": false, | ||
"limitConcurrent": true, | ||
"application": "orca", | ||
"name": "Unnamed Execution", | ||
"stages": [], | ||
"notifications": [] | ||
} |
15 changes: 15 additions & 0 deletions
15
orca-pipelinetemplate/src/test/resources/integration/v1schema/conditionalStage-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,15 @@ | ||
--- | ||
schema: "1" | ||
id: conditionalStage | ||
metadata: | ||
name: Conditional stage test | ||
description: Tests conditional expressions | ||
variables: | ||
- name: includeStage | ||
stages: | ||
- id: wait | ||
type: wait | ||
config: | ||
waitTime: 5 | ||
when: | ||
- "{{ includeStage }}" |
13 changes: 13 additions & 0 deletions
13
orca-pipelinetemplate/src/test/resources/integration/v1schema/modules-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,13 @@ | ||
--- | ||
schema: "1" | ||
pipeline: | ||
application: orca | ||
variables: | ||
regions: | ||
- us-east-1 | ||
- us-west-2 | ||
stages: [] | ||
modules: | ||
- id: wait | ||
definition: | ||
foo: 10 |
39 changes: 39 additions & 0 deletions
39
orca-pipelinetemplate/src/test/resources/integration/v1schema/modules-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,39 @@ | ||
{ | ||
"id": "unknown", | ||
"keepWaitingPipelines": false, | ||
"limitConcurrent": true, | ||
"application": "orca", | ||
"name": "Unnamed Execution", | ||
"stages": [ | ||
{ | ||
"requisiteStageRefIds": [], | ||
"name": "wait", | ||
"id": null, | ||
"refId": "wait", | ||
"type": "wait", | ||
"someConfig": { | ||
"foo": 10 | ||
} | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["wait"], | ||
"name": "deploy", | ||
"id": null, | ||
"refId": "deploy", | ||
"type": "deploy", | ||
"clusters": [ | ||
{ | ||
"provider": "aws", | ||
"account": "myAccount", | ||
"region": "us-east-1" | ||
}, | ||
{ | ||
"provider": "aws", | ||
"account": "myAccount", | ||
"region": "us-west-2" | ||
} | ||
] | ||
} | ||
], | ||
"notifications": [] | ||
} |
38 changes: 38 additions & 0 deletions
38
orca-pipelinetemplate/src/test/resources/integration/v1schema/modules-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,38 @@ | ||
--- | ||
schema: "1" | ||
id: modules | ||
metadata: | ||
name: Modules test | ||
description: Tests modules functionality | ||
variables: | ||
- name: regions | ||
type: list | ||
stages: | ||
- id: wait | ||
type: wait | ||
config: | ||
someConfig: "{% module wait %}" | ||
- id: deploy | ||
type: deploy | ||
dependsOn: | ||
- wait | ||
config: | ||
clusters: | | ||
{% for region in regions %} | ||
- {% module deployClusterAws region=region %} | ||
{% endfor %} | ||
modules: | ||
- id: wait | ||
usage: Defines config for a wait stage | ||
definition: | ||
foo: 5 | ||
- id: deployClusterAws | ||
usage: Defines a deploy stage cluster using the AWS cloud provider | ||
variables: | ||
- name: region | ||
description: The AWS region to deploy into | ||
definition: | ||
provider: aws | ||
account: myAccount | ||
region: "{{ region }}" |
5 changes: 5 additions & 0 deletions
5
orca-pipelinetemplate/src/test/resources/integration/v1schema/partials-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,5 @@ | ||
--- | ||
schema: "1" | ||
pipeline: | ||
application: orca | ||
stages: [] |
44 changes: 44 additions & 0 deletions
44
orca-pipelinetemplate/src/test/resources/integration/v1schema/partials-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,44 @@ | ||
{ | ||
"id": "unknown", | ||
"keepWaitingPipelines": false, | ||
"limitConcurrent": true, | ||
"application": "orca", | ||
"name": "Unnamed Execution", | ||
"stages": [ | ||
{ | ||
"requisiteStageRefIds": [], | ||
"name": "firstWait", | ||
"id": null, | ||
"refId": "firstWait", | ||
"type": "wait", | ||
"waitTime": 5 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["firstWait"], | ||
"name": "Build chrome", | ||
"id": null, | ||
"refId": "buildChrome.buildTarget", | ||
"type": "jenkins", | ||
"group": "buildBrowser: buildChrome", | ||
"foo": "bar" | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["buildChrome.buildTarget"], | ||
"name": "Publish chrome", | ||
"id": null, | ||
"refId": "buildChrome.publishTarget", | ||
"type": "jenkins", | ||
"group": "buildBrowser: buildChrome", | ||
"baz": "bang" | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["buildChrome.publishTarget"], | ||
"name": "finalWait", | ||
"id": null, | ||
"refId": "finalWait", | ||
"type": "wait", | ||
"waitTime": 5 | ||
} | ||
], | ||
"notifications": [] | ||
} |
43 changes: 43 additions & 0 deletions
43
orca-pipelinetemplate/src/test/resources/integration/v1schema/partials-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,43 @@ | ||
--- | ||
schema: "1" | ||
id: partials | ||
metadata: | ||
name: Partials test | ||
description: Tests partials spec | ||
stages: | ||
- id: firstWait | ||
type: wait | ||
config: | ||
waitTime: 5 | ||
- id: buildChrome | ||
type: partial.buildBrowser | ||
dependsOn: | ||
- firstWait | ||
config: | ||
target: chrome | ||
- id: finalWait | ||
type: wait | ||
dependsOn: | ||
- buildChrome | ||
config: | ||
waitTime: 5 | ||
|
||
partials: | ||
- id: buildBrowser | ||
usage: Builds the pipeline artifact targeting the a specified browser. | ||
variables: | ||
- name: target | ||
description: The target browser to build for | ||
stages: | ||
- id: buildTarget | ||
type: jenkins | ||
name: Build {{ target }} | ||
config: | ||
foo: bar | ||
- id: publishTarget | ||
type: jenkins | ||
name: Publish {{ target }} | ||
dependsOn: | ||
- buildTarget | ||
config: | ||
baz: bang |
5 changes: 5 additions & 0 deletions
5
orca-pipelinetemplate/src/test/resources/integration/v1schema/partialsAndModules-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,5 @@ | ||
--- | ||
schema: "1" | ||
pipeline: | ||
application: orca | ||
stages: [] |
35 changes: 35 additions & 0 deletions
35
...pipelinetemplate/src/test/resources/integration/v1schema/partialsAndModules-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,35 @@ | ||
{ | ||
"id": "unknown", | ||
"keepWaitingPipelines": false, | ||
"limitConcurrent": true, | ||
"application": "orca", | ||
"name": "Unnamed Execution", | ||
"stages": [ | ||
{ | ||
"requisiteStageRefIds": [], | ||
"name": "firstWait", | ||
"id": null, | ||
"refId": "firstWait", | ||
"type": "wait", | ||
"waitTime": 5 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["firstWait"], | ||
"name": "Build chrome", | ||
"id": null, | ||
"refId": "buildChrome.buildTarget", | ||
"type": "jenkins", | ||
"group": "buildBrowser: buildChrome", | ||
"foo": "We're building what? We're building chrome" | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["buildChrome.buildTarget"], | ||
"name": "finalWait", | ||
"id": null, | ||
"refId": "finalWait", | ||
"type": "wait", | ||
"waitTime": 5 | ||
} | ||
], | ||
"notifications": [] | ||
} |
Oops, something went wrong.