/
azure-pipelines.yml
182 lines (159 loc) · 6.53 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
# 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.
# The pipeline extends v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates from 1esPipelines repository defined in resources section.
parameters:
- name: pylanceVersion
displayName: Pylance Version
type: string
default: latest
- name: pylanceReleaseType
displayName: Pylance Release Type
type: string
default: stable
values:
- stable
- preview
- name: debugpyVersion
displayName: Debugpy Version
type: string
default: latest
# build number format
name: $(date:yy)$(DayOfYear)$(rev:.r)
# Trigger ci builds for commits into master and any release branches
# Ignore changes to other yml files, since they are for different pipelines
trigger:
branches:
include:
- main
- release/*
paths:
exclude:
- 'azure-pipelines-*.yml'
# Trigger pr builds for commits into master and any release branches
# Ignore changes to other yml files, since they are for different pipelines
# Also ignore draft PR's
pr:
branches:
include:
- main
- release/*
paths:
exclude:
- 'azure-pipelines-*.yml'
drafts: false
# 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: 17.0
- name: IncludeDjangoHtmlExtensions
value: true
- name: IncludeMiniconda
value: true
- name: IncludeMSI
value: false
- name: IncludeUWP
value: false
- name: TrackFileAccess
value: false
- name: Packaging.EnableSBOMSigning
value: false # disabled for now because of known issue
# Import variables from PTVS-Dev17 variable group
- group: PTVS-Dev17
# The `resources` specify the location and version of the 1ES PT.
# The ref of the repository is set to release tag which is intended to be used by most pipelines.
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
# The pool includes the name of your 1ES hosted pool and a VM image in that pool. Also, use os to
# specify the image type. Here are the allowed values: windows, linux, or macOS. The default value is windows.
# Hence, this property must be specified for linux and macOS.
pool:
name: VSEngSS-MicroBuild2022-1ES
os: windows
stages:
- stage: stage
jobs:
- job: job
# If the pipeline publishes artifacts, use `templateContext` to define the artifacts.
# This will enable 1ES PT to run SDL analysis tools on the artifacts and then upload them.
templateContext:
outputs:
- output: pipelineArtifact
displayName: 'Publish build artifact: binaries'
targetPath: '$(Build.BinariesDirectory)/raw/binaries'
artifactName: Binaries
- output: pipelineArtifact
displayName: 'Publish build artifact: raw'
condition: failed()
targetPath: '$(Build.BinariesDirectory)\raw'
artifactName: raw
- output: pipelineArtifact
displayName: 'Publish build artifact: logs'
condition: succeededOrFailed()
targetPath: '$(Build.SourcesDirectory)\logs'
artifactName: Logs
- output: pipelineArtifact
displayName: 'Publish build artifact: TestData'
targetPath: '$(Build.ArtifactStagingDirectory)/TestDataFolder/TestData.zip'
sbomBuildDropPath: '$(Build.ArtifactStagingDirectory)/TestDataFolder'
artifactName: 'TestData'
- output: pipelineArtifact
displayName: 'Publish build artifact: RunSettings'
targetPath: '$(Build.SourcesDirectory)/Python/Tests/TestData/default.runsettings'
sbomBuildDropPath: '$(Build.SourcesDirectory)/Python/Tests/TestData'
artifactName: 'RunSettings'
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
- output: pipelineArtifact
displayName: 'Publish build artifact: BoM'
targetPath: '$(Build.BinariesDirectory)\layout'
artifactName: SBOM
steps:
# check out code clean from source control
- checkout: self
clean: true
# Non-PR steps
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
# add VSTarget build tag
- powershell: 'Write-Host "##vso[build.addbuildtag]$env:VSTarget"'
displayName: 'Add vstarget build tag'
# install microbuild plugins used for swixproj/vsmanproj, signing, and localization
- template: /Build/templates/install_microbuild_plugins.yml@self
# Restore packages and install dependencies (pylance, debugpy)
- template: /Build/templates/restore_packages.yml@self
parameters:
pylanceVersion: ${{ parameters.pylanceVersion }}
pylanceReleaseType: ${{ parameters.pylanceReleaseType }}
debugpyVersion: ${{ parameters.debugpyVersion }}
# Build and publish logs
- template: /Build/templates/build.yml@self
# Non-PR steps
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
# Create VS bootstrapper for testing
# This step is disabled for now because it's blocking the build and we don't currently use it.
- template: Build/templates/create_vs_bootstrapper.yml@self
# Upload vsts drop used by Visual Studio insertions
- task: 1ES.MicroBuildVstsDrop@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'
accessToken: '$(System.AccessToken)'
# publish symbols
- template: /Build/templates/publish_symbols.yml@self
# MicroBuild cleanup
- task: MicroBuildCleanup@1
displayName: 'Execute cleanup tasks'
condition: succeededOrFailed()
# Publish test data
- template: /Build/templates/publish_test_data.yml@self