-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
157 lines (153 loc) · 4.06 KB
/
azure-pipelines.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# Build Number
name: $(Date:yyyyMMdd)$(Rev:.r)
# -------------------------------------------------------------------------------
trigger:
- master
variables:
name: engage2019
stages:
- stage: build
displayName: Build
jobs:
- job:
displayName: 'Build Application'
steps:
- task: DotNetCoreCLI@2
displayName: "dotnet restore"
inputs:
command: 'restore'
feedsToUse: 'select'
- task: DotNetCoreCLI@2
displayName: "dotnet build"
inputs:
command: 'build'
- task: DotNetCoreCLI@2
displayName: "dotnet test"
inputs:
command: 'test'
- task: DotNetCoreCLI@2
displayName: "dotnet publish"
inputs:
command: 'publish'
publishWebProjects: false
arguments: '--configuration Release --output $(Pipeline.Workspace)/app --no-restore'
modifyOutputPath: false
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Pipeline.Workspace)/app'
artifact: 'build'
publishLocation: 'pipeline'
- task: PublishPipelineArtifact@1
inputs:
targetPath: 'templates/deploy.ps1'
artifact: 'arm'
publishLocation: 'pipeline'
- stage: dev
displayName: Development
dependsOn: build
jobs:
- deployment: Development
environment: DEV
timeoutInMinutes: 60
strategy:
runOnce:
deploy:
steps:
- template: azure-pipelines.functions.yml
parameters:
name: $(name)
- stage: integrationtests
displayName: Integration Tests
dependsOn: dev
jobs:
- deployment: Testing
environment: TEST
timeoutInMinutes: 60
strategy:
runOnce:
deploy:
steps:
- template: azure-pipelines.tests.yml
- stage: componenttests
displayName: Component Tests
dependsOn: dev
jobs:
- deployment: Testing
environment: TEST
timeoutInMinutes: 60
strategy:
runOnce:
deploy:
steps:
- template: azure-pipelines.tests.yml
- stage: endtoendtests
displayName: End-To-End Tests
dependsOn: dev
jobs:
- deployment: Testing
environment: TEST
timeoutInMinutes: 60
strategy:
runOnce:
deploy:
steps:
- template: azure-pipelines.tests.yml
- stage: uat
displayName: UAT
dependsOn:
- componenttests
- integrationtests
- endtoendtests
jobs:
- deployment: Testing
environment: TEST
timeoutInMinutes: 60
strategy:
runOnce:
deploy:
steps:
- template: azure-pipelines.functions.yml
parameters:
name: $(name)
- stage: canary
displayName: Production Canary
dependsOn: uat
jobs:
- deployment: canary
environment: PROD
timeoutInMinutes: 60
strategy:
runOnce:
deploy:
steps:
- template: azure-pipelines.functions.yml
parameters:
name: $(name)
- stage: ea
displayName: Production EarlyAdopters
dependsOn: canary
jobs:
- deployment: ea
environment: PROD
timeoutInMinutes: 60
strategy:
runOnce:
deploy:
steps:
- template: azure-pipelines.functions.yml
parameters:
name: $(name)
- stage: prod
displayName: Production Live
dependsOn: ea
jobs:
- deployment: prod
environment: PROD
timeoutInMinutes: 60
strategy:
runOnce:
deploy:
steps:
- template: azure-pipelines.functions.yml
parameters:
name: $(name)