-
Notifications
You must be signed in to change notification settings - Fork 808
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): config level stage replacement
- Loading branch information
Showing
6 changed files
with
303 additions
and
17 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
24 changes: 24 additions & 0 deletions
24
orca-pipelinetemplate/src/test/resources/integration/v1schema/stageReplacement-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,24 @@ | ||
--- | ||
schema: "1" | ||
pipeline: | ||
application: orca | ||
name: MPT Stage Replacement Test | ||
template: | ||
source: stageReplacement-template.yml | ||
variables: | ||
myCustomFirstStageName: "HELLO ROB" | ||
stages: | ||
- id: bake1 | ||
type: findImageFromTags | ||
name: "{{ myCustomFirstStageName }}" | ||
config: | ||
cloudProvider: aws | ||
cloudProviderType: aws | ||
packageName: "{{ application }}" | ||
regions: | ||
- us-east-1 | ||
- us-west-1 | ||
- us-west-2 | ||
- eu-west-1 | ||
tags: | ||
stack: test |
132 changes: 132 additions & 0 deletions
132
orca-pipelinetemplate/src/test/resources/integration/v1schema/stageReplacement-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,132 @@ | ||
{ | ||
"id": "unknown", | ||
"keepWaitingPipelines": false, | ||
"limitConcurrent": true, | ||
"application": "orca", | ||
"name": "MPT Stage Replacement Test", | ||
"notifications": [], | ||
"stages": [ | ||
{ | ||
"cloudProvider": "aws", | ||
"cloudProviderType": "aws", | ||
"name": "HELLO ROB", | ||
"packageName": "orca", | ||
"refId": "bake1", | ||
"regions": [ | ||
"us-east-1", | ||
"us-west-1", | ||
"us-west-2", | ||
"eu-west-1" | ||
], | ||
"tags": { | ||
"stack": "test" | ||
}, | ||
"requisiteStageRefIds": [], | ||
"type": "findImageFromTags", | ||
"id": null | ||
}, | ||
{ | ||
"id": null, | ||
"clusters": [ | ||
{ | ||
"account": "test", | ||
"application": "spindemo", | ||
"availabilityZones": { | ||
"us-west-1": [ | ||
"us-west-1a", | ||
"us-west-1c" | ||
] | ||
}, | ||
"capacity": { | ||
"desired": 1, | ||
"max": 1, | ||
"min": 1 | ||
}, | ||
"cloudProvider": "aws", | ||
"cooldown": 10, | ||
"copySourceCustomBlockDeviceMappings": true, | ||
"ebsOptimized": false, | ||
"enabledMetrics": [], | ||
"freeFormDetails": "demo", | ||
"healthCheckGracePeriod": 600, | ||
"healthCheckType": "EC2", | ||
"iamRole": "myIAMRole", | ||
"instanceMonitoring": false, | ||
"instanceType": "m3.large", | ||
"interestingHealthProviderNames": [ | ||
"Amazon" | ||
], | ||
"keyPair": "keypair", | ||
"loadBalancers": [ | ||
"spindemo-demo-frontend" | ||
], | ||
"maxRemainingAsgs": 2, | ||
"preferSourceCapacity": true, | ||
"provider": "aws", | ||
"scaleDown": true, | ||
"securityGroups": [], | ||
"stack": "test", | ||
"strategy": "redblack", | ||
"subnetType": "mySubnet", | ||
"suspendedProcesses": [], | ||
"tags": {}, | ||
"targetGroups": [], | ||
"targetHealthyDeployPercentage": 100, | ||
"terminationPolicies": [ | ||
"Default" | ||
], | ||
"useAmiBlockDeviceMappings": false, | ||
"useSourceCapacity": true | ||
}, | ||
{ | ||
"account": "test", | ||
"application": "spindemo", | ||
"availabilityZones": { | ||
"us-east-1": [ | ||
"us-east-1c", | ||
"us-east-1d", | ||
"us-east-1e" | ||
] | ||
}, | ||
"capacity": { | ||
"desired": 0, | ||
"max": 0, | ||
"min": 0 | ||
}, | ||
"cloudProvider": "aws", | ||
"cooldown": 10, | ||
"ebsOptimized": false, | ||
"freeFormDetails": "demo", | ||
"healthCheckGracePeriod": 600, | ||
"healthCheckType": "EC2", | ||
"iamRole": "myIAMRole", | ||
"instanceMonitoring": false, | ||
"instanceType": "m3.large", | ||
"interestingHealthProviderNames": [ | ||
"Amazon" | ||
], | ||
"keyPair": "keypair", | ||
"provider": "aws", | ||
"securityGroups": [], | ||
"stack": "test", | ||
"strategy": "highlander", | ||
"subnetType": "mySubnet", | ||
"suspendedProcesses": [], | ||
"tags": {}, | ||
"targetHealthyDeployPercentage": 100, | ||
"terminationPolicies": [ | ||
"Default" | ||
], | ||
"useSourceCapacity": false | ||
} | ||
], | ||
"name": "Deploy", | ||
"refId": "deploy2", | ||
"requisiteStageRefIds": [ | ||
"bake1" | ||
], | ||
"type": "deploy" | ||
} | ||
], | ||
"parameterConfig": [] | ||
} |
114 changes: 114 additions & 0 deletions
114
orca-pipelinetemplate/src/test/resources/integration/v1schema/stageReplacement-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,114 @@ | ||
--- | ||
schema: "1" | ||
id: stageReplacement | ||
metadata: | ||
name: Stage Replacement | ||
description: Example for replacing a stage | ||
variables: | ||
- name: myCustomFirstStageName | ||
stages: | ||
- id: bake1 | ||
type: bake | ||
name: "{{ myCustomFirstStageName }}" | ||
config: | ||
baseLabel: release | ||
baseOs: trusty | ||
cloudProviderType: aws | ||
enhancedNetworking: false | ||
extendedAttributes: {} | ||
overrideTimeout: true | ||
package: orca | ||
regions: | ||
- us-east-1 | ||
- us-west-1 | ||
- us-west-2 | ||
- eu-west-1 | ||
sendNotifications: true | ||
showAdvancedOptions: true | ||
stageTimeoutMs: 900000 | ||
storeType: ebs | ||
user: example@example.com | ||
vmType: hvm | ||
- id: deploy2 | ||
type: deploy | ||
dependsOn: | ||
- bake1 | ||
name: Deploy | ||
config: | ||
clusters: | ||
- account: test | ||
application: spindemo | ||
availabilityZones: | ||
us-west-1: | ||
- us-west-1a | ||
- us-west-1c | ||
capacity: | ||
desired: 1 | ||
max: 1 | ||
min: 1 | ||
cloudProvider: aws | ||
cooldown: 10 | ||
copySourceCustomBlockDeviceMappings: true | ||
ebsOptimized: false | ||
enabledMetrics: [] | ||
freeFormDetails: demo | ||
healthCheckGracePeriod: 600 | ||
healthCheckType: EC2 | ||
iamRole: myIAMRole | ||
instanceMonitoring: false | ||
instanceType: m3.large | ||
interestingHealthProviderNames: | ||
- Amazon | ||
keyPair: keypair | ||
loadBalancers: | ||
- spindemo-demo-frontend | ||
maxRemainingAsgs: 2 | ||
preferSourceCapacity: true | ||
provider: aws | ||
scaleDown: true | ||
securityGroups: [] | ||
stack: test | ||
strategy: redblack | ||
subnetType: mySubnet | ||
suspendedProcesses: [] | ||
tags: {} | ||
targetGroups: [] | ||
targetHealthyDeployPercentage: 100 | ||
terminationPolicies: | ||
- Default | ||
useAmiBlockDeviceMappings: false | ||
useSourceCapacity: true | ||
- account: test | ||
application: spindemo | ||
availabilityZones: | ||
us-east-1: | ||
- us-east-1c | ||
- us-east-1d | ||
- us-east-1e | ||
capacity: | ||
desired: 0 | ||
max: 0 | ||
min: 0 | ||
cloudProvider: aws | ||
cooldown: 10 | ||
ebsOptimized: false | ||
freeFormDetails: demo | ||
healthCheckGracePeriod: 600 | ||
healthCheckType: EC2 | ||
iamRole: myIAMRole | ||
instanceMonitoring: false | ||
instanceType: m3.large | ||
interestingHealthProviderNames: | ||
- Amazon | ||
keyPair: keypair | ||
provider: aws | ||
securityGroups: [] | ||
stack: test | ||
strategy: highlander | ||
subnetType: mySubnet | ||
suspendedProcesses: [] | ||
tags: {} | ||
targetHealthyDeployPercentage: 100 | ||
terminationPolicies: | ||
- Default | ||
useSourceCapacity: false |