-
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.
tests(pipeline_templates): integrations tests and removing unique ID
- Loading branch information
Showing
14 changed files
with
261 additions
and
4 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
13 changes: 13 additions & 0 deletions
13
orca-pipelinetemplate/src/test/resources/integration/v1schema/example-child.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" | ||
id: child-template | ||
source: example-root.yml # Indicates that this template inherits from the root-template | ||
metadata: | ||
name: Child template | ||
description: A child template | ||
stages: | ||
- id: waitChild1 | ||
type: wait | ||
dependsOn: | ||
- wait1 # Depending on a stage from the root-template | ||
config: | ||
waitTime: "{{ waitTime }}" # Using a variable from the root-template |
27 changes: 27 additions & 0 deletions
27
orca-pipelinetemplate/src/test/resources/integration/v1schema/example-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,27 @@ | ||
schema: "1" | ||
pipeline: | ||
application: myApp | ||
name: My super awesome pipeline | ||
template: | ||
source: example-template.yml | ||
variables: | ||
waitTime: 20 | ||
childWaitTime: 15 | ||
configuration: | ||
notifications: | ||
- address: example@example.com | ||
level: pipeline | ||
name: email0 | ||
type: email | ||
when: | ||
- pipeline.failed | ||
triggers: [] | ||
stages: | ||
- id: finalWait | ||
type: wait | ||
dependsOn: | ||
- waitChild1 | ||
- waitChild2 | ||
config: | ||
waitTime: 10 | ||
|
51 changes: 51 additions & 0 deletions
51
orca-pipelinetemplate/src/test/resources/integration/v1schema/example-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,51 @@ | ||
{ | ||
"keepWaitingPipelines": false, | ||
"limitConcurrent": true, | ||
"application": "myApp", | ||
"name": "My super awesome pipeline", | ||
"stages": [ | ||
{ | ||
"requisiteStageRefIds": [], | ||
"name": "wait1", | ||
"id": null, | ||
"refId": "wait1", | ||
"type": "wait", | ||
"waitTime": 20 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["wait1"], | ||
"id": null, | ||
"name": "waitChild2", | ||
"refId": "waitChild2", | ||
"type": "wait", | ||
"waitTime": 15 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["wait1"], | ||
"id": null, | ||
"name": "waitChild1", | ||
"refId": "waitChild1", | ||
"type": "wait", | ||
"waitTime": 20 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["waitChild2", "waitChild1"], | ||
"id": null, | ||
"name": "finalWait", | ||
"refId": "finalWait", | ||
"type": "wait", | ||
"waitTime": 10 | ||
} | ||
], | ||
"id": "unknown", | ||
"notifications": [ | ||
{ | ||
"address": "example@example.com", | ||
"level": "pipeline", | ||
"name": "email0", | ||
"when": ["pipeline.failed"], | ||
"type": "email" | ||
} | ||
], | ||
"parameterConfig": [] | ||
} |
14 changes: 14 additions & 0 deletions
14
orca-pipelinetemplate/src/test/resources/integration/v1schema/example-root.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,14 @@ | ||
schema: "1" # Schema must match for all | ||
id: root-template | ||
metadata: | ||
name: Simple wait template | ||
description: Extendable root template | ||
variables: # Variables available to all that inherit | ||
- name: waitTime | ||
description: The time a wait stage should pause | ||
type: int | ||
stages: # Stages available to all that inherit | ||
- id: wait1 | ||
type: wait | ||
config: | ||
waitTime: "{{ waitTime }}" # Variables can be used anywhere |
16 changes: 16 additions & 0 deletions
16
orca-pipelinetemplate/src/test/resources/integration/v1schema/example-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,16 @@ | ||
schema: "1" | ||
id: child-2-template | ||
source: example-child.yml | ||
variables: | ||
- name: childWaitTime | ||
description: pause time for another wait | ||
metadata: | ||
name: A Second Child template | ||
description: A second child template | ||
stages: | ||
- id: waitChild2 | ||
type: wait | ||
dependsOn: | ||
- wait1 | ||
config: | ||
waitTime: "{{ childWaitTime }}" |
20 changes: 20 additions & 0 deletions
20
orca-pipelinetemplate/src/test/resources/integration/v1schema/exampleCombined-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,20 @@ | ||
schema: "1" | ||
pipeline: | ||
application: myApp | ||
name: My super awesome pipeline | ||
template: | ||
source: exampleCombined-template.yml | ||
variables: | ||
waitTime: 20 | ||
childWaitTime: 15 | ||
configuration: | ||
notifications: | ||
- address: example@example.com | ||
level: pipeline | ||
name: email0 | ||
type: email | ||
when: | ||
- pipeline.failed | ||
triggers: [] | ||
|
||
|
51 changes: 51 additions & 0 deletions
51
orca-pipelinetemplate/src/test/resources/integration/v1schema/exampleCombined-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,51 @@ | ||
{ | ||
"keepWaitingPipelines": false, | ||
"limitConcurrent": true, | ||
"application": "myApp", | ||
"name": "My super awesome pipeline", | ||
"stages": [ | ||
{ | ||
"requisiteStageRefIds": [], | ||
"name": "wait1", | ||
"id": null, | ||
"refId": "wait1", | ||
"type": "wait", | ||
"waitTime": 20 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["wait1"], | ||
"id": null, | ||
"name": "waitChild2", | ||
"refId": "waitChild2", | ||
"type": "wait", | ||
"waitTime": 15 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["wait1"], | ||
"id": null, | ||
"name": "waitChild1", | ||
"refId": "waitChild1", | ||
"type": "wait", | ||
"waitTime": 20 | ||
}, | ||
{ | ||
"requisiteStageRefIds": ["waitChild2", "waitChild1"], | ||
"id": null, | ||
"name": "finalWait", | ||
"refId": "finalWait", | ||
"type": "wait", | ||
"waitTime": 10 | ||
} | ||
], | ||
"id": "unknown", | ||
"notifications": [ | ||
{ | ||
"address": "example@example.com", | ||
"level": "pipeline", | ||
"name": "email0", | ||
"when": ["pipeline.failed"], | ||
"type": "email" | ||
} | ||
], | ||
"parameterConfig": [] | ||
} |
35 changes: 35 additions & 0 deletions
35
orca-pipelinetemplate/src/test/resources/integration/v1schema/exampleCombined-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,35 @@ | ||
schema: "1" | ||
id: combined-template | ||
metadata: | ||
name: Less simple wait template | ||
description: A template with many waits | ||
variables: | ||
- name: waitTime | ||
description: The time a wait stage should pause | ||
type: int | ||
- name: childWaitTime | ||
description: pause time for another wait | ||
stages: | ||
- id: wait1 | ||
type: wait | ||
config: | ||
waitTime: "{{ waitTime }}" | ||
- id: waitChild1 | ||
type: wait | ||
dependsOn: | ||
- wait1 | ||
config: | ||
waitTime: "{{ waitTime }}" | ||
- id: waitChild2 | ||
type: wait | ||
dependsOn: | ||
- wait1 | ||
config: | ||
waitTime: "{{ childWaitTime }}" | ||
- id: finalWait | ||
type: wait | ||
dependsOn: | ||
- waitChild1 | ||
- waitChild2 | ||
config: | ||
waitTime: 10 |
11 changes: 11 additions & 0 deletions
11
orca-pipelinetemplate/src/test/resources/integration/v1schema/protect-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,11 @@ | ||
--- | ||
schema: "1" | ||
pipeline: | ||
application: orca | ||
stages: | ||
- id: wait2 | ||
type: wait | ||
config: | ||
waitTime: "{{ waitTime }}" | ||
dependsOn: | ||
- wait1 |
9 changes: 9 additions & 0 deletions
9
orca-pipelinetemplate/src/test/resources/integration/v1schema/protect-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 @@ | ||
{ | ||
"errors": [ | ||
{ | ||
"severity": "FATAL", | ||
"cause": "The template being used has marked itself as protected", | ||
"message": "Modification of the stage graph (adding, removing, editing) is disallowed" | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
orca-pipelinetemplate/src/test/resources/integration/v1schema/protect-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,13 @@ | ||
--- | ||
schema: "1" | ||
id: simple | ||
protect: true | ||
metadata: | ||
name: Barebones | ||
description: The simplest template possible. | ||
stages: | ||
- id: wait1 | ||
type: wait | ||
config: | ||
waitTime: "{{ waitTime }}" | ||
|
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