-
Notifications
You must be signed in to change notification settings - Fork 46
/
pipeline.yaml
154 lines (123 loc) · 3.14 KB
/
pipeline.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
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
name: $(Version).$(rev:r)
variables:
- name: Version
value: '1.0.0'
- name: Greeting
value: "G'day, mate"
trigger:
branches:
include:
- master
pr: none
stages:
- stage: BuildWithoutTemplate
displayName: 'Build without Template'
jobs:
- job: HostedVs2017
displayName: 'Hosted VS2017'
pool:
name: 'Hosted VS2017'
workspace:
clean: all
variables:
- name: Greeting
value: 'Hello World'
steps:
- task: PowerShell@2
displayName: 'Echo Greeting in PowerShell'
inputs:
targetType: Inline
script: 'Write-Host "$(Greeting)"'
- stage: BuildWithStepsTemplate
displayName: 'Build with Steps Template'
jobs:
- job: HostedVs2017
displayName: 'Hosted VS2017'
pool:
name: 'Hosted VS2017'
workspace:
clean: all
variables:
- name: Greeting
value: 'Hello World'
steps:
- template: 'template-steps-build.yaml'
parameters:
message: 'This is from the steps template'
- stage: BuildWithJobsTemplate
displayName: 'Build with Jobs Template'
variables:
- name: Greeting
value: 'Hello World'
jobs:
- template: 'template-jobs-build.yaml'
parameters:
vmImage: 'vs2017-win2016'
message: 'This is from the jobs template'
- template: 'template-stages-build.yaml'
parameters:
vmImage: 'ubuntu-16.04'
message: 'This is from the stages template'
- template: 'template-stages-nested-build.yaml'
parameters:
vmImage: 'macOS-10.13'
message: 'This is from the nested stages template'
- stage: ReleaseWithoutTemplate
displayName: 'Release without Template'
jobs:
- deployment: HostedVs2017
displayName: 'Hosted VS2017'
pool:
name: 'Hosted VS2017'
environment: release
variables:
- name: Greeting
value: 'Hello World'
strategy:
runOnce:
deploy:
steps:
- task: PowerShell@2
displayName: 'Echo Greeting in PowerShell'
inputs:
targetType: Inline
script: 'Write-Host "$(Greeting)"'
- stage: ReleaseWithStepsTemplate
displayName: 'Release with Steps Template'
jobs:
- deployment: HostedVs2017
displayName: 'Hosted VS2017'
pool:
name: 'Hosted VS2017'
environment: release
variables:
- name: Greeting
value: 'Hello World'
strategy:
runOnce:
deploy:
steps:
- template: 'template-steps-release.yaml'
parameters:
message: 'This is from the steps template'
- stage: ReleaseWithJobsTemplate
displayName: 'Release with Jobs Template'
variables:
- name: Greeting
value: 'Hello World'
jobs:
- template: 'template-jobs-release.yaml'
parameters:
templateLevel: jobs
vmImage: 'vs2017-win2016'
message: 'This is from the jobs template'
- template: 'template-stages-release.yaml'
parameters:
templateLevel: stages
vmImage: 'ubuntu-16.04'
message: 'This is from the stages template'
- template: 'template-stages-nested-release.yaml'
parameters:
templateLevel: nested-stages
vmImage: 'macOS-10.13'
message: 'This is from the nested stages template'