Skip to content

Commit 2d020fb

Browse files
bschnurrCopilot
andauthored
Add pre-release and stable Azure DevDiv pipeline configurations (#1763)
This pull request introduces two new Azure DevOps pipeline YAML files for pre-release and stable builds, and updates the SDL pool for the existing npm pipeline. The changes modernize and standardize the CI/CD process for building and publishing the Python Environments extension, supporting multiple platforms and improving release management. **New Azure DevOps pipelines:** * Added `build/azure-devdiv-pipeline.pre-release.yml` to automate nightly pre-release builds and publishing, supporting multiple platforms and artifact downloads, and integrating with shared pipeline templates. * Added `build/azure-devdiv-pipeline.stable.yml` to handle stable release builds, including manual validation before publishing, platform matrix builds, artifact handling, and integration with shared templates. **Pipeline configuration improvements:** * Updated the SDL `sourceAnalysisPool` in `build/azure-pipeline.npm.yml` to use `VSEng-MicroBuildVSStable`, aligning with the pools used in the new pipelines for consistency and stability. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 87fa1bdb-2bee-401c-8518-31498b25c21c
1 parent 87f4dea commit 2d020fb

3 files changed

Lines changed: 364 additions & 1 deletion

File tree

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
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+
vsceTarget: linux-arm64
48+
- name: Linux
49+
vsceTarget: linux-armhf
50+
- name: Linux
51+
vsceTarget: linux-x64
52+
- name: Linux
53+
vsceTarget: alpine-arm64
54+
- name: Linux
55+
vsceTarget: alpine-x64
56+
- name: MacOS
57+
vsceTarget: darwin-arm64
58+
- name: MacOS
59+
vsceTarget: darwin-x64
60+
- name: Windows
61+
vsceTarget: win32-arm64
62+
- name: Windows
63+
vsceTarget: win32-x64
64+
65+
- name: buildSteps
66+
type: stepList
67+
default:
68+
- script: npm ci
69+
displayName: Install NPM dependencies
70+
71+
- script: python ./build/update_package_json.py
72+
displayName: Update telemetry in package.json
73+
74+
- script: python ./build/update_ext_version.py --for-publishing
75+
displayName: Validate version number
76+
77+
- bash: |
78+
mkdir -p $(Build.SourcesDirectory)/python-env-tools/bin
79+
chmod +x $(Build.SourcesDirectory)/python-env-tools/bin
80+
displayName: Make Directory for python-env-tool binary
81+
82+
- bash: |
83+
if [ "$(vsceTarget)" == "win32-x64" ]; then
84+
echo "##vso[task.setvariable variable=buildTarget]x86_64-pc-windows-msvc"
85+
elif [ "$(vsceTarget)" == "win32-arm64" ]; then
86+
echo "##vso[task.setvariable variable=buildTarget]aarch64-pc-windows-msvc"
87+
elif [ "$(vsceTarget)" == "linux-x64" ]; then
88+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
89+
elif [ "$(vsceTarget)" == "linux-arm64" ]; then
90+
echo "##vso[task.setvariable variable=buildTarget]aarch64-unknown-linux-gnu"
91+
elif [ "$(vsceTarget)" == "linux-armhf" ]; then
92+
echo "##vso[task.setvariable variable=buildTarget]armv7-unknown-linux-gnueabihf"
93+
elif [ "$(vsceTarget)" == "darwin-x64" ]; then
94+
echo "##vso[task.setvariable variable=buildTarget]x86_64-apple-darwin"
95+
elif [ "$(vsceTarget)" == "darwin-arm64" ]; then
96+
echo "##vso[task.setvariable variable=buildTarget]aarch64-apple-darwin"
97+
elif [ "$(vsceTarget)" == "alpine-x64" ]; then
98+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
99+
elif [ "$(vsceTarget)" == "alpine-arm64" ]; then
100+
echo "##vso[task.setvariable variable=buildTarget]aarch64-unknown-linux-gnu"
101+
elif [ "$(vsceTarget)" == "web" ]; then
102+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
103+
else
104+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
105+
fi
106+
displayName: Set buildTarget variable
107+
108+
- task: DownloadPipelineArtifact@2
109+
inputs:
110+
buildType: specific
111+
project: Monaco
112+
definition: 591
113+
buildVersionToDownload: latestFromBranch
114+
branchName: refs/heads/main
115+
targetPath: $(Build.SourcesDirectory)/python-env-tools/bin
116+
artifactName: bin-$(buildTarget)
117+
itemPattern: |
118+
pet.exe
119+
pet
120+
ThirdPartyNotices.txt
121+
122+
- bash: |
123+
ls -l ./python-env-tools/bin
124+
chmod +x ./python-env-tools/bin/pet*
125+
ls -l ./python-env-tools/bin
126+
displayName: Set chmod for pet binary
127+
128+
- script: npm run package
129+
displayName: Build extension
130+
131+
extends:
132+
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
133+
parameters:
134+
sdl:
135+
sourceAnalysisPool: VSEng-MicroBuildVSStable
136+
codeSignValidation:
137+
enabled: true
138+
sbom:
139+
enabled: false # Disable global SBOM generation; enable it on the signed artifact.
140+
pool:
141+
name: AzurePipelines-EO
142+
os: windows
143+
144+
customBuildTags:
145+
- ES365AIMigrationTooling
146+
147+
stages:
148+
- stage: Build
149+
displayName: Build & Package Extension
150+
jobs:
151+
- template: azure-pipelines/extension/templates/jobs/package.yml@templates
152+
parameters:
153+
buildPlatforms: ${{ parameters.buildPlatforms }}
154+
buildSteps: ${{ parameters.buildSteps }}
155+
isPreRelease: true
156+
standardizedVersioning: true
157+
customNPMRegistry: $(AZURE_ARTIFACTS_FEED)
158+
nodeVersion: $(NodeVersion)
159+
160+
- stage: Publish
161+
displayName: Publish Extension
162+
dependsOn: Build
163+
jobs:
164+
- template: azure-pipelines/extension/templates/jobs/publish-extension.yml@templates
165+
parameters:
166+
buildPlatforms: ${{ parameters.buildPlatforms }}
167+
publishExtension: ${{ parameters.publishExtension }}
168+
preRelease: true
169+
teamName: $(TeamName)
170+
ghCreateTag: true
171+
ghCreateRelease: true
172+
ghReleaseAddChangeLog: true
173+
customNPMRegistry: $(AZURE_ARTIFACTS_FEED)
174+
nodeVersion: $(NodeVersion)
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
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+
vsceTarget: linux-arm64
48+
- name: Linux
49+
vsceTarget: linux-armhf
50+
- name: Linux
51+
vsceTarget: linux-x64
52+
- name: Linux
53+
vsceTarget: alpine-arm64
54+
- name: Linux
55+
vsceTarget: alpine-x64
56+
- name: MacOS
57+
vsceTarget: darwin-arm64
58+
- name: MacOS
59+
vsceTarget: darwin-x64
60+
- name: Windows
61+
vsceTarget: win32-arm64
62+
- name: Windows
63+
vsceTarget: win32-x64
64+
65+
- name: buildSteps
66+
type: stepList
67+
default:
68+
- script: npm ci
69+
displayName: Install NPM dependencies
70+
71+
- script: python ./build/update_package_json.py
72+
displayName: Update telemetry in package.json
73+
74+
- script: python ./build/update_ext_version.py --release --for-publishing
75+
displayName: Update build number
76+
77+
- bash: |
78+
mkdir -p $(Build.SourcesDirectory)/python-env-tools/bin
79+
chmod +x $(Build.SourcesDirectory)/python-env-tools/bin
80+
displayName: Make Directory for python-env-tool binary
81+
82+
- bash: |
83+
if [ "$(vsceTarget)" == "win32-x64" ]; then
84+
echo "##vso[task.setvariable variable=buildTarget]x86_64-pc-windows-msvc"
85+
elif [ "$(vsceTarget)" == "win32-arm64" ]; then
86+
echo "##vso[task.setvariable variable=buildTarget]aarch64-pc-windows-msvc"
87+
elif [ "$(vsceTarget)" == "linux-x64" ]; then
88+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
89+
elif [ "$(vsceTarget)" == "linux-arm64" ]; then
90+
echo "##vso[task.setvariable variable=buildTarget]aarch64-unknown-linux-gnu"
91+
elif [ "$(vsceTarget)" == "linux-armhf" ]; then
92+
echo "##vso[task.setvariable variable=buildTarget]armv7-unknown-linux-gnueabihf"
93+
elif [ "$(vsceTarget)" == "darwin-x64" ]; then
94+
echo "##vso[task.setvariable variable=buildTarget]x86_64-apple-darwin"
95+
elif [ "$(vsceTarget)" == "darwin-arm64" ]; then
96+
echo "##vso[task.setvariable variable=buildTarget]aarch64-apple-darwin"
97+
elif [ "$(vsceTarget)" == "alpine-x64" ]; then
98+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
99+
elif [ "$(vsceTarget)" == "alpine-arm64" ]; then
100+
echo "##vso[task.setvariable variable=buildTarget]aarch64-unknown-linux-gnu"
101+
elif [ "$(vsceTarget)" == "web" ]; then
102+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
103+
else
104+
echo "##vso[task.setvariable variable=buildTarget]x86_64-unknown-linux-musl"
105+
fi
106+
displayName: Set buildTarget variable
107+
108+
- task: DownloadPipelineArtifact@2
109+
inputs:
110+
buildType: specific
111+
project: Monaco
112+
definition: 593
113+
buildVersionToDownload: latestFromBranch
114+
branchName: ${{ parameters.petBranch }}
115+
targetPath: $(Build.SourcesDirectory)/python-env-tools/bin
116+
artifactName: bin-$(buildTarget)
117+
itemPattern: |
118+
pet.exe
119+
pet
120+
ThirdPartyNotices.txt
121+
122+
- bash: |
123+
ls -lf ./python-env-tools/bin
124+
chmod +x ./python-env-tools/bin/pet*
125+
ls -lf ./python-env-tools/bin
126+
displayName: Set chmod for pet binary
127+
128+
- script: npm run package
129+
displayName: Build extension
130+
131+
extends:
132+
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
133+
parameters:
134+
sdl:
135+
sourceAnalysisPool: VSEng-MicroBuildVSStable
136+
codeSignValidation:
137+
enabled: true
138+
sbom:
139+
enabled: false # Disable global SBOM generation; enable it on the signed artifact.
140+
pool:
141+
name: AzurePipelines-EO
142+
os: windows
143+
144+
customBuildTags:
145+
- ES365AIMigrationTooling
146+
147+
stages:
148+
- stage: Build
149+
displayName: Build & Package Extension
150+
jobs:
151+
- template: azure-pipelines/extension/templates/jobs/package.yml@templates
152+
parameters:
153+
buildPlatforms: ${{ parameters.buildPlatforms }}
154+
buildSteps: ${{ parameters.buildSteps }}
155+
isPreRelease: false
156+
standardizedVersioning: true
157+
customNPMRegistry: $(AZURE_ARTIFACTS_FEED)
158+
nodeVersion: $(NodeVersion)
159+
160+
- stage: WaitForValidation
161+
displayName: Wait for Validation
162+
dependsOn: Build
163+
jobs:
164+
- job: wait_for_validation
165+
displayName: Wait for manual validation
166+
pool: server
167+
steps:
168+
- task: ManualValidation@0
169+
timeoutInMinutes: 1440 # task times out in 1 day
170+
inputs:
171+
notifyUsers: 'plseng@microsoft.com'
172+
instructions: 'please test the latest draft release then publish it.'
173+
onTimeout: reject
174+
175+
- stage: Publish
176+
displayName: Publish Extension
177+
dependsOn: WaitForValidation
178+
jobs:
179+
- template: azure-pipelines/extension/templates/jobs/publish-extension.yml@templates
180+
parameters:
181+
buildPlatforms: ${{ parameters.buildPlatforms }}
182+
publishExtension: ${{ parameters.publishExtension }}
183+
preRelease: false
184+
teamName: $(TeamName)
185+
ghCreateTag: true
186+
ghCreateRelease: true
187+
ghReleaseAddChangeLog: true
188+
customNPMRegistry: $(AZURE_ARTIFACTS_FEED)
189+
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)