Skip to content

Commit 642bba1

Browse files
committed
Add pre-release and stable Azure DevDiv pipeline configurations
1 parent 5246c9b commit 642bba1

3 files changed

Lines changed: 382 additions & 1 deletion

File tree

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# Run on a schedule
2+
trigger: none
3+
pr: none
4+
5+
schedules:
6+
- cron: '0 10 * * 1-5' # 10AM UTC (2AM PDT) MON-FRI (VS Code Pre-release builds at 9PM PDT)
7+
displayName: Nightly Pre-Release Schedule
8+
always: false # only run if there are source code changes
9+
branches:
10+
include:
11+
- main
12+
13+
resources:
14+
repositories:
15+
- repository: MicroBuildTemplate
16+
type: git
17+
name: 1ESPipelineTemplates/MicroBuildTemplate
18+
ref: refs/tags/release
19+
20+
- repository: templates
21+
type: git
22+
name: DevDiv/Pylance-Eng
23+
ref: refs/heads/main
24+
25+
variables:
26+
- name: TeamName
27+
value: VSCode-python-environments
28+
- name: VsixName
29+
value: python-environments.vsix
30+
- name: NodeVersion
31+
value: '22.21.1'
32+
- name: AZURE_ARTIFACTS_FEED
33+
value: 'https://devdiv.pkgs.visualstudio.com/DevDiv/_packaging/Pylance_PublicPackages/npm/registry/'
34+
35+
parameters:
36+
- name: publishExtension
37+
displayName: 🚀 Publish Extension
38+
type: boolean
39+
default: true
40+
41+
- name: buildPlatforms
42+
type: object
43+
default:
44+
- name: Linux
45+
vsceTarget: web
46+
- name: Linux
47+
packageArch: arm64
48+
vsceTarget: linux-arm64
49+
- name: Linux
50+
packageArch: arm
51+
vsceTarget: linux-armhf
52+
- name: Linux
53+
packageArch: x64
54+
vsceTarget: linux-x64
55+
- name: Linux
56+
packageArch: arm64
57+
vsceTarget: alpine-arm64
58+
- name: Linux
59+
packageArch: x64
60+
vsceTarget: alpine-x64
61+
- name: MacOS
62+
packageArch: arm64
63+
vsceTarget: darwin-arm64
64+
- name: MacOS
65+
packageArch: x64
66+
vsceTarget: darwin-x64
67+
- name: Windows
68+
packageArch: arm
69+
vsceTarget: win32-arm64
70+
- name: Windows
71+
packageArch: x64
72+
vsceTarget: win32-x64
73+
74+
- name: buildSteps
75+
type: stepList
76+
default:
77+
- script: npm ci
78+
displayName: Install NPM dependencies
79+
80+
- script: python ./build/update_package_json.py
81+
displayName: Update telemetry in package.json
82+
83+
- script: python ./build/update_ext_version.py --for-publishing
84+
displayName: Validate version number
85+
86+
- bash: |
87+
mkdir -p $(Build.SourcesDirectory)/python-env-tools/bin
88+
chmod +x $(Build.SourcesDirectory)/python-env-tools/bin
89+
displayName: Make Directory for python-env-tool binary
90+
91+
- bash: |
92+
if [ "$(vsceTarget)" == "win32-x64" ]; then
93+
echo "##vso[task.setvariable variable=buildTarget]x86_64-pc-windows-msvc"
94+
elif [ "$(vsceTarget)" == "win32-arm64" ]; then
95+
echo "##vso[task.setvariable variable=buildTarget]aarch64-pc-windows-msvc"
96+
elif [ "$(vsceTarget)" == "linux-x64" ]; then
97+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
98+
elif [ "$(vsceTarget)" == "linux-arm64" ]; then
99+
echo "##vso[task.setvariable variable=buildTarget]aarch64-unknown-linux-gnu"
100+
elif [ "$(vsceTarget)" == "linux-armhf" ]; then
101+
echo "##vso[task.setvariable variable=buildTarget]armv7-unknown-linux-gnueabihf"
102+
elif [ "$(vsceTarget)" == "darwin-x64" ]; then
103+
echo "##vso[task.setvariable variable=buildTarget]x86_64-apple-darwin"
104+
elif [ "$(vsceTarget)" == "darwin-arm64" ]; then
105+
echo "##vso[task.setvariable variable=buildTarget]aarch64-apple-darwin"
106+
elif [ "$(vsceTarget)" == "alpine-x64" ]; then
107+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
108+
elif [ "$(vsceTarget)" == "alpine-arm64" ]; then
109+
echo "##vso[task.setvariable variable=buildTarget]aarch64-unknown-linux-gnu"
110+
elif [ "$(vsceTarget)" == "web" ]; then
111+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
112+
else
113+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
114+
fi
115+
displayName: Set buildTarget variable
116+
117+
- task: DownloadPipelineArtifact@2
118+
inputs:
119+
buildType: specific
120+
project: Monaco
121+
definition: 591
122+
buildVersionToDownload: latest
123+
branchName: refs/heads/main
124+
targetPath: $(Build.SourcesDirectory)/python-env-tools/bin
125+
artifactName: bin-$(buildTarget)
126+
itemPattern: |
127+
pet.exe
128+
pet
129+
ThirdPartyNotices.txt
130+
131+
- bash: |
132+
ls -l ./python-env-tools/bin
133+
chmod +x ./python-env-tools/bin/pet*
134+
ls -l ./python-env-tools/bin
135+
displayName: Set chmod for pet binary
136+
137+
- script: npm run package
138+
displayName: Build extension
139+
140+
extends:
141+
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
142+
parameters:
143+
sdl:
144+
sourceAnalysisPool: VSEng-MicroBuildVSStable
145+
codeSignValidation:
146+
enabled: true
147+
sbom:
148+
enabled: false # Disable global SBOM generation; enable it on the signed artifact.
149+
pool:
150+
name: AzurePipelines-EO
151+
os: windows
152+
153+
customBuildTags:
154+
- ES365AIMigrationTooling
155+
156+
stages:
157+
- stage: Build
158+
displayName: Build & Package Extension
159+
jobs:
160+
- template: azure-pipelines/extension/templates/jobs/package.yml@templates
161+
parameters:
162+
buildPlatforms: ${{ parameters.buildPlatforms }}
163+
buildSteps: ${{ parameters.buildSteps }}
164+
isPreRelease: true
165+
standardizedVersioning: true
166+
customNPMRegistry: $(AZURE_ARTIFACTS_FEED)
167+
nodeVersion: $(NodeVersion)
168+
169+
- stage: Publish
170+
displayName: Publish Extension
171+
dependsOn: Build
172+
jobs:
173+
- template: azure-pipelines/extension/templates/jobs/publish-extension.yml@templates
174+
parameters:
175+
buildPlatforms: ${{ parameters.buildPlatforms }}
176+
publishExtension: ${{ parameters.publishExtension }}
177+
preRelease: true
178+
teamName: $(TeamName)
179+
ghCreateTag: true
180+
ghCreateRelease: true
181+
ghReleaseAddChangeLog: true
182+
customNPMRegistry: $(AZURE_ARTIFACTS_FEED)
183+
nodeVersion: $(NodeVersion)
Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
name: Publish Release
2+
trigger:
3+
branches:
4+
include:
5+
- 'release/*'
6+
pr: none
7+
8+
resources:
9+
repositories:
10+
- repository: MicroBuildTemplate
11+
type: git
12+
name: 1ESPipelineTemplates/MicroBuildTemplate
13+
ref: refs/tags/release
14+
15+
- repository: templates
16+
type: git
17+
name: DevDiv/Pylance-Eng
18+
ref: refs/heads/main
19+
20+
variables:
21+
- name: TeamName
22+
value: VSCode-python-environments
23+
- name: VsixName
24+
value: python-environments.vsix
25+
- name: NodeVersion
26+
value: '22.21.1'
27+
- name: AZURE_ARTIFACTS_FEED
28+
value: 'https://devdiv.pkgs.visualstudio.com/DevDiv/_packaging/Pylance_PublicPackages/npm/registry/'
29+
30+
parameters:
31+
- name: publishExtension
32+
displayName: 🚀 Publish Extension
33+
type: boolean
34+
default: true
35+
36+
- name: petBranch
37+
displayName: PET artifact branch
38+
type: string
39+
default: refs/heads/release/2026.12
40+
41+
- name: buildPlatforms
42+
type: object
43+
default:
44+
- name: Linux
45+
vsceTarget: web
46+
- name: Linux
47+
packageArch: arm64
48+
vsceTarget: linux-arm64
49+
- name: Linux
50+
packageArch: arm
51+
vsceTarget: linux-armhf
52+
- name: Linux
53+
packageArch: x64
54+
vsceTarget: linux-x64
55+
- name: Linux
56+
packageArch: arm64
57+
vsceTarget: alpine-arm64
58+
- name: Linux
59+
packageArch: x64
60+
vsceTarget: alpine-x64
61+
- name: MacOS
62+
packageArch: arm64
63+
vsceTarget: darwin-arm64
64+
- name: MacOS
65+
packageArch: x64
66+
vsceTarget: darwin-x64
67+
- name: Windows
68+
packageArch: arm
69+
vsceTarget: win32-arm64
70+
- name: Windows
71+
packageArch: x64
72+
vsceTarget: win32-x64
73+
74+
- name: buildSteps
75+
type: stepList
76+
default:
77+
- script: npm ci
78+
displayName: Install NPM dependencies
79+
80+
- script: python ./build/update_package_json.py
81+
displayName: Update telemetry in package.json
82+
83+
- script: python ./build/update_ext_version.py --release --for-publishing
84+
displayName: Update build number
85+
86+
- bash: |
87+
mkdir -p $(Build.SourcesDirectory)/python-env-tools/bin
88+
chmod +x $(Build.SourcesDirectory)/python-env-tools/bin
89+
displayName: Make Directory for python-env-tool binary
90+
91+
- bash: |
92+
if [ "$(vsceTarget)" == "win32-x64" ]; then
93+
echo "##vso[task.setvariable variable=buildTarget]x86_64-pc-windows-msvc"
94+
elif [ "$(vsceTarget)" == "win32-arm64" ]; then
95+
echo "##vso[task.setvariable variable=buildTarget]aarch64-pc-windows-msvc"
96+
elif [ "$(vsceTarget)" == "linux-x64" ]; then
97+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
98+
elif [ "$(vsceTarget)" == "linux-arm64" ]; then
99+
echo "##vso[task.setvariable variable=buildTarget]aarch64-unknown-linux-gnu"
100+
elif [ "$(vsceTarget)" == "linux-armhf" ]; then
101+
echo "##vso[task.setvariable variable=buildTarget]armv7-unknown-linux-gnueabihf"
102+
elif [ "$(vsceTarget)" == "darwin-x64" ]; then
103+
echo "##vso[task.setvariable variable=buildTarget]x86_64-apple-darwin"
104+
elif [ "$(vsceTarget)" == "darwin-arm64" ]; then
105+
echo "##vso[task.setvariable variable=buildTarget]aarch64-apple-darwin"
106+
elif [ "$(vsceTarget)" == "alpine-x64" ]; then
107+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
108+
elif [ "$(vsceTarget)" == "alpine-arm64" ]; then
109+
echo "##vso[task.setvariable variable=buildTarget]aarch64-unknown-linux-gnu"
110+
elif [ "$(vsceTarget)" == "web" ]; then
111+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
112+
else
113+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
114+
fi
115+
displayName: Set buildTarget variable
116+
117+
- task: DownloadPipelineArtifact@2
118+
inputs:
119+
buildType: specific
120+
project: Monaco
121+
definition: 593
122+
buildVersionToDownload: latestFromBranch
123+
branchName: ${{ parameters.petBranch }}
124+
targetPath: $(Build.SourcesDirectory)/python-env-tools/bin
125+
artifactName: bin-$(buildTarget)
126+
itemPattern: |
127+
pet.exe
128+
pet
129+
ThirdPartyNotices.txt
130+
131+
- bash: |
132+
ls -lf ./python-env-tools/bin
133+
chmod +x ./python-env-tools/bin/pet*
134+
ls -lf ./python-env-tools/bin
135+
displayName: Set chmod for pet binary
136+
137+
- script: npm run package
138+
displayName: Build extension
139+
140+
extends:
141+
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
142+
parameters:
143+
sdl:
144+
sourceAnalysisPool: VSEng-MicroBuildVSStable
145+
codeSignValidation:
146+
enabled: true
147+
sbom:
148+
enabled: false # Disable global SBOM generation; enable it on the signed artifact.
149+
pool:
150+
name: AzurePipelines-EO
151+
os: windows
152+
153+
customBuildTags:
154+
- ES365AIMigrationTooling
155+
156+
stages:
157+
- stage: Build
158+
displayName: Build & Package Extension
159+
jobs:
160+
- template: azure-pipelines/extension/templates/jobs/package.yml@templates
161+
parameters:
162+
buildPlatforms: ${{ parameters.buildPlatforms }}
163+
buildSteps: ${{ parameters.buildSteps }}
164+
isPreRelease: false
165+
standardizedVersioning: true
166+
customNPMRegistry: $(AZURE_ARTIFACTS_FEED)
167+
nodeVersion: $(NodeVersion)
168+
169+
- stage: WaitForValidation
170+
displayName: Wait for Validation
171+
dependsOn: Build
172+
jobs:
173+
- job: wait_for_validation
174+
displayName: Wait for manual validation
175+
pool: server
176+
steps:
177+
- task: ManualValidation@0
178+
timeoutInMinutes: 1440 # task times out in 1 day
179+
inputs:
180+
notifyUsers: 'plseng@microsoft.com'
181+
instructions: 'please test the latest draft release then publish it.'
182+
onTimeout: reject
183+
184+
- stage: Publish
185+
displayName: Publish Extension
186+
dependsOn: WaitForValidation
187+
jobs:
188+
- template: azure-pipelines/extension/templates/jobs/publish-extension.yml@templates
189+
parameters:
190+
buildPlatforms: ${{ parameters.buildPlatforms }}
191+
publishExtension: ${{ parameters.publishExtension }}
192+
preRelease: false
193+
teamName: $(TeamName)
194+
ghCreateTag: true
195+
ghCreateRelease: true
196+
ghReleaseAddChangeLog: true
197+
customNPMRegistry: $(AZURE_ARTIFACTS_FEED)
198+
nodeVersion: $(NodeVersion)

‎build/azure-pipeline.npm.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ extends:
4141
template: azure-pipelines/MicroBuild.1ES.Official.Publish.yml@MicroBuildTemplate
4242
parameters:
4343
sdl:
44-
sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES
44+
sourceAnalysisPool: VSEng-MicroBuildVSStable
4545
codeSignValidation:
4646
enabled: true
4747
sbom:

0 commit comments

Comments
 (0)