-
Notifications
You must be signed in to change notification settings - Fork 56
/
adf_deploy_stage.yml
45 lines (42 loc) · 1.7 KB
/
adf_deploy_stage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
parameters:
- name: environmentObjects
type: object
default:
environmentName: 'dev'
regionAbrvs: ['cus']
- name: templateParametersFile
type: string
default: 'parameters'
- name: serviceName
type: string
default: ''
- name: linkedTemplates
type: boolean
default: false
stages:
- ${{ each environmentObject in parameters.environmentObjects }} :
- ${{ each regionAbrv in environmentObject.regionAbrvs }} :
- stage: '${{ parameters.serviceName }}_${{ environmentObject.environmentName}}_${{regionAbrv}}_adf_deploy'
variables:
- name: templateFile
${{ if eq(parameters.linkedTemplates, false)}} :
value: 'ARMTemplateForFactory.json'
${{ else }} :
value: 'linkedTemplates/ArmTemplate_master.json'
jobs:
- ${{ if eq(parameters.linkedTemplates, false)}} :
- template: ../jobs/adf_deploy_env_job.yml
parameters:
environmentName: ${{ environmentObject.environmentName }}
templateFile: ${{ variables.templateFile }}
templateParametersFile: ${{ parameters.templateParametersFile }}
serviceName: ${{ parameters.serviceName}}
regionAbrv: ${{ regionAbrv }}
- ${{ else }} :
- template: ../jobs/adf_linked_template_deploy_env_job.yml
parameters:
environmentName: ${{ environmentObject.environmentName }}
templateFile: ${{ variables.templateFile }}
templateParametersFile: ${{ parameters.templateParametersFile }}
serviceName: ${{ parameters.serviceName}}
regionAbrv: ${{ regionAbrv }}