forked from microsoft/PTVS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
234 lines (205 loc) · 7.26 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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# This pipeline is used to build the PTVS product and installer.
# A seperate release pipeline is used to create insertion PR's into Visual Studio.
# build number format
name: $(date:yy)$(DayOfYear)$(rev:.r)
# Trigger ci builds for commits into master and any release branches
# Ignore the policy.yml file, since that's a different pipeline
trigger:
branches:
include:
- master
- release/*
- feature/pylance
paths:
exclude:
- 'azure-pipelines-policy.yml'
# Trigger pr builds for commits into master and any release branches
# Ignore the policy.yml file, since that's a different pipeline
# Also ignore draft PR's
pr:
branches:
include:
- master
- release/*
- feature/pylance
paths:
exclude:
- 'azure-pipelines-policy.yml'
drafts: false
# The agent pool the build will run on
pool:
name: VSEng-MicroBuildVS2019
demands:
- msbuild
- VisualStudio_16.0
# Build variables
# None of these are settable at build queue time. To do that, remove the variable from this list,
# browse to the pipeline editor in AzDO, add the variable there, and make it settable at queue time.
variables:
- name: DropRoot
value: \\cpvsbuild\Drops\DSTools\PTVS\$(Build.SourceBranchName)\$(Build.BuildNumber)\
- name: FileVersionPrefix
value: 16.10
- name: IncludeDjangoHtmlExtensions
value: true
- name: IncludeLiveShare
value: true
- name: IncludeMiniconda
value: true
- name: IncludeMSI
value: false
- name: IncludeUWP
value: false
- name: TrackFileAccess
value: false
# PTVS variable group
# This contains variables shared between the PTVS "product" pipeline and the PTVS "policy" pipeline.
# It also contains an AzDO Personal Access Token (ArtifactServices.Symbol.PAT) that expires on 4/15/2021
# which is used to publish symbols to symweb.
# If Visual Studio insertion PRs start failing the Symbol Check step, this token is most likely expired.
# See https://www.1eswiki.com/wiki/Using_Azure_DevOps_Symbols for more information about how to create a new
# PAT and how to update the variable group.
- group: PTVS
steps:
# check out code clean from source control
- checkout: self
clean: true
# skip some steps if this is a PR build
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
# add build tag
- powershell: 'Write-Host "##vso[build.addbuildtag]$env:VSTarget"'
displayName: 'Add vstarget build tag'
# install plugins needed for swixproj/vsmanproj, signing, and localization
- task: MicroBuildSwixPlugin@3
displayName: 'Install microbuild swix plugin'
inputs:
dropName: 'Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)'
- task: MicroBuildSigningPlugin@3
displayName: 'Install microbuild signing plugin'
inputs:
signType: 'Real'
zipSources: false
- task: MicroBuildLocalizationPlugin@3
displayName: 'Install localization plugin'
inputs:
type: 'Full'
languages: 'VS'
# Run a powershell script that does a package restore, some symlinking, and installs debugpy
- task: PowerShell@1
displayName: 'Restore packages'
inputs:
scriptName: Build/PreBuild.ps1
arguments: '-vstarget $(VSTarget)'
# Clean the old swix outputs
- task: DeleteFiles@1
displayName: 'Clean old swix outputs'
inputs:
SourceFolder: '$(Build.BinariesDirectory)\raw\setup\swix'
Contents: '**'
continueOnError: true
# Build the product
- task: MSBuild@1
displayName: 'Build product'
inputs:
solution: Python/Product/dirs.proj
msbuildVersion: $(MsBuildVersion)
platform: $(Platform)
configuration: $(BuildConfiguration)
# Build the installer
- task: MSBuild@1
displayName: 'Build installer'
inputs:
solution: Python/Setup/dirs.proj
msbuildVersion: $(MsBuildVersion)
platform: $(Platform)
configuration: $(BuildConfiguration)
msbuildArguments: '/p:SkipProduct=true'
# Publish buld artifact: raw
- task: PublishBuildArtifacts@1
displayName: '[If build failed] Publish raw build artifact'
inputs:
PathtoPublish: '$(Build.BinariesDirectory)\raw'
ArtifactName: raw
condition: failed()
# skip some steps if this is a PR build
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
# Upload vsts drop
- task: MicroBuildUploadVstsDropFolder@1
displayName: 'Upload vsts drop'
inputs:
DropFolder: '$(Build.StagingDirectory)\release'
DropServiceUri: 'https://devdiv.artifacts.visualstudio.com/DefaultCollection'
VSDropServiceUri: 'https://vsdrop.corp.microsoft.com/file/v1'
continueOnError: true
# copy some files around to prepare for publishing build artifacts
- task: CopyFiles@2
displayName: 'Copy source to staging/src'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
TargetFolder: '$(Build.ArtifactStagingDirectory)/src'
CleanTargetFolder: true
- task: CopyFiles@2
displayName: 'Copy layout to staging'
inputs:
SourceFolder: '$(Build.BinariesDirectory)/layout'
TargetFolder: '$(Build.ArtifactStagingDirectory)/layout'
CleanTargetFolder: true
- task: CopyFiles@2
displayName: 'Copy binaries to staging'
inputs:
SourceFolder: '$(Build.BinariesDirectory)/raw/binaries'
TargetFolder: '$(Build.ArtifactStagingDirectory)/binaries'
CleanTargetFolder: true
- task: CopyFiles@2
displayName: 'Prepare for symbol publishing'
inputs:
SourceFolder: '$(Build.ArtifactStagingDirectory)/binaries'
Contents: |
Microsoft.PythonTools*.pdb
Microsoft.PythonTools*.dll
Microsoft.PythonTools*.exe
Microsoft.CookiecutterTools.pdb
Microsoft.CookiecutterTools.dll
Microsoft.IronPythonTools.Resolver.pdb
Microsoft.IronPythonTools.Resolver.dll
Microsoft.Python.Analysis.Engine.dll
Microsoft.Python.Analysis.Engine.pdb
Microsoft.Python.LanguageServer.Core.dll
Microsoft.Python.LanguageServer.Core.pdb
PyDebugAttach*.pdb
PyDebugAttach*.dll
VsPyProf*.pdb
VsPyProf*.dll
TargetFolder: '$(Build.ArtifactStagingDirectory)/symbols_and_binaries'
# Index sources and publish symbols
- task: PublishSymbols@2
displayName: 'Publish symbols'
inputs:
symbolsFolder: '$(Build.ArtifactStagingDirectory)/symbols_and_binaries'
searchPattern: '*.pdb'
symbolServerType: TeamServices
# MicroBuild cleanup
- task: MicroBuildCleanup@1
displayName: 'Execute cleanup tasks'
condition: succeededOrFailed()
# Compress staging output
- task: ArchiveFiles@2
displayName: 'Compress staging dir'
inputs:
rootFolderOrFile: '$(Build.ArtifactStagingDirectory)'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/PTVSBuildArchive.zip'
replaceExistingArchive: true
# Publish build artifact: binaries
- task: PublishBuildArtifacts@1
displayName: 'Upload binaries to build artifacts'
inputs:
PathtoPublish: '$(Build.BinariesDirectory)/raw/binaries'
ArtifactName: Binaries
# Publish build artifact: staging output
- task: PublishBuildArtifacts@1
displayName: 'Upload staging zip to build artifacts'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/PTVSBuildArchive.zip'
ArtifactName: 'PTVS Staging Output'