-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnonprod-build.yaml
68 lines (56 loc) · 2.08 KB
/
nonprod-build.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
parameters:
- name: subscription
displayName: subscription
type: string
default: hub
values:
- hub
- spoke
- name: region
displayName: region
type: string
default: scus
values:
- eus
- scus
- name: buildagent_os
displayName: buildagent_os
type: string
default: linux
values:
- linux
- windows
variables:
- name: SUB
value: ${{ parameters.subscription }}
- name: REGION
value: ${{ parameters.region }}
- name: BUILDAGENT_OS
value: ${{ parameters.buildagent_os }}
resources:
repositories:
- repository: example-repo
type: git
name: my-project/example-repo
ref: main
trigger:
- none
stages:
# hub
- ${{ if and( eq(variables['SUB'], 'hub'), eq(variables['REGION'], 'scus'), eq(variables['BUILDAGENT_OS'], 'linux') )}}:
- template: 'hub/build/nonprod-scus-linux.yaml'
- ${{ if and( eq(variables['SUB'], 'hub'), eq(variables['REGION'], 'scus'), eq(variables['BUILDAGENT_OS'], 'windows') )}}:
- template: 'hub/build/nonprod-scus-windows.yaml'
- ${{ if and( eq(variables['SUB'], 'hub'), eq(variables['REGION'], 'eus'), eq(variables['BUILDAGENT_OS'], 'linux') )}}:
- template: 'hub/build/nonprod-eus-linux.yaml'
- ${{ if and( eq(variables['SUB'], 'hub'), eq(variables['REGION'], 'eus'), eq(variables['BUILDAGENT_OS'], 'windows') )}}:
- template: 'hub/build/nonprod-eus-windows.yaml'
# spoke
- ${{ if and( eq(variables['SUB'], 'spoke'), eq(variables['REGION'], 'scus'), eq(variables['BUILDAGENT_OS'], 'linux') )}}:
- template: 'spoke/build/nonprod-scus-linux.yaml'
- ${{ if and( eq(variables['SUB'], 'spoke'), eq(variables['REGION'], 'scus'), eq(variables['BUILDAGENT_OS'], 'windows') )}}:
- template: 'spoke/build/nonprod-scus-windows.yaml'
- ${{ if and( eq(variables['SUB'], 'spoke'), eq(variables['REGION'], 'eus'), eq(variables['BUILDAGENT_OS'], 'linux') )}}:
- template: 'spoke/build/nonprod-eus-linux.yaml'
- ${{ if and( eq(variables['SUB'], 'spoke'), eq(variables['REGION'], 'eus'), eq(variables['BUILDAGENT_OS'], 'windows') )}}:
- template: 'spoke/build/nonprod-eus-windows.yaml'