forked from IBM-Blockchain/blockchain-vscode-extension
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
217 lines (197 loc) · 6.7 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
schedules:
- cron: "0 0 * * *"
displayName: Daily insiders build
branches:
include:
- master
always: true
trigger: # Hopefully should run the buildPdf stage after every merge into master
branches:
include:
- master
tags:
include:
- '*'
pr: # Hopefully this causes PR's to trigger
branches:
include:
- '*'
stages:
- stage: unitTest
condition: or(eq(variables['Build.Reason'], 'PullRequest'), and(eq(variables['Build.Reason'], 'IndividualCI'), or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v1'), startsWith(variables['Build.SourceBranch'], 'refs/tags/v2'))))
dependsOn: []
jobs:
- job: unit
strategy:
matrix:
linux:
imageName: 'ubuntu-16.04'
VERSION: '1.35.1'
MODULES: 64
ELECTRON: '3.0'
TARGET: '3.0.0'
mac:
imageName: 'macos-10.14'
VERSION: '1.35.1'
MODULES: 64
ELECTRON: '3.0'
TARGET: '3.0.0'
pool:
vmImage: $(imageName)
steps:
- template: azure-templates/setup-steps.yml
- template: azure-templates/unit-test-steps.yml
- template: azure-templates/rebuild-steps.yml
- template: azure-templates/extension-unit-test-steps.yml
- stage: cucumberTest
condition: or(eq(variables['Build.Reason'], 'PullRequest'), and(eq(variables['Build.Reason'], 'IndividualCI'), or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v1'), startsWith(variables['Build.SourceBranch'], 'refs/tags/v2'))))
dependsOn: []
jobs:
- template: azure-templates/cucumber-job.yml
parameters:
name: cucumber
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
version: '1.39.2'
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags') }}:
version: 'stable'
- stage: cucumberReport
dependsOn: [cucumberTest]
jobs:
- template: azure-templates/cucumber-report-job.yml
- stage: cypressTest
condition: or(eq(variables['Build.Reason'], 'PullRequest'), and(eq(variables['Build.Reason'], 'IndividualCI'), or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v1'), startsWith(variables['Build.SourceBranch'], 'refs/tags/v2'))))
dependsOn: []
jobs:
- job: cypress
strategy:
matrix:
linux:
imageName: 'ubuntu-16.04'
VERSION: '1.35.1'
MODULES: 64
ELECTRON: '3.0'
TARGET: '3.0.0'
mac:
imageName: 'macos-10.14'
VERSION: '1.35.1'
MODULES: 64
ELECTRON: '3.0'
TARGET: '3.0.0'
pool:
vmImage: $(imageName)
steps:
- template: azure-templates/setup-steps.yml
- template: azure-templates/rebuild-steps.yml
- template: azure-templates/cypress-steps.yml
- stage: buildPackage
dependsOn:
- unitTest
- cucumberTest
- cypressTest
jobs:
- template: azure-templates/build-package-job.yml
- stage: buildChePackage
dependsOn:
- unitTest
- cucumberTest
- cypressTest
jobs:
- job: buildChePackage
pool:
vmImage: ubuntu-16.04
steps:
- script: che/build.sh
displayName: Build Che package
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)/che'
contents: |
ibm-blockchain-platform-*.vsix
ibm-blockchain-platform-*.yaml
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: vscode-che-package
- stage: buildPdf
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
jobs:
- template: azure-templates/build-pdf.yml
- stage: deploy
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
dependsOn:
- unitTest
- cucumberTest
- cypressTest
- buildPackage
- buildChePackage
jobs:
- template: azure-templates/deploy-job.yml
- stage: otherVersionsUnitTest
condition: eq(variables['Build.Reason'], 'Schedule')
dependsOn: []
jobs:
- job: unit
strategy:
matrix:
insiders_linux:
imageName: 'ubuntu-16.04'
VERSION: 'insiders'
MODULES: 75
ELECTRON: '7.2'
TARGET: '7.2.1'
insiders_mac:
imageName: 'macos-10.14'
VERSION: 'insiders'
MODULES: 75
ELECTRON: '7.2'
TARGET: '7.2.1'
pool:
vmImage: $(imageName)
steps:
- template: azure-templates/setup-steps.yml
- template: azure-templates/unit-test-steps.yml
- template: azure-templates/rebuild-steps.yml
- template: azure-templates/extension-unit-test-steps.yml
- stage: otherVersionsCucumberTest
condition: eq(variables['Build.Reason'], 'Schedule')
dependsOn: []
jobs:
- template: azure-templates/cucumber-job.yml
parameters:
name: insiders
version: 'insiders'
- template: azure-templates/cucumber-job.yml
parameters:
name: old
version: '1.38.1'
- template: azure-templates/cucumber-job.yml
parameters:
name: latest
version: 'stable'
# - stage: docker
# dependsOn:
# - unitTest
# - cucumberTest
# - cypressTest
# jobs:
# - job: docker
# pool:
# vmImage: ubuntu-16.04
# steps:
# - script: docker/build.sh
# displayName: Build Docker image
# - script: |
# set -ex
# VERSION=$(jq -r ".version" ./packages/blockchain-extension/package.json)
# docker tag ibmblockchain/vscode:latest ibmblockchain/vscode:${VERSION}
# echo docker push ibmblockchain/vscode:${VERSION}
# echo docker push ibmblockchain/vscode:latest
# condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
# displayName: Push Docker image to Docker Hub (release build)
# - script: |
# set -ex
# docker tag ibmblockchain/vscode:latest ibmblockchain/vscode:unstable
# echo docker push ibmblockchain/vscode:unstable
# condition: eq(variables['Build.Reason'], 'Schedule')
# displayName: Push Docker image to Docker Hub (nightly build)