@@ -16,19 +16,79 @@ resources:
1616 type : git
1717 name : 1ESPipelineTemplates/MicroBuildTemplate
1818 ref : refs/tags/release
19+
20+ - repository : templates
21+ type : git
22+ name : DevDiv/Pylance-Eng
23+ ref : refs/heads/main
1924variables :
2025 - name : TeamName
2126 value : VSCode-python-debugger
2227 - name : VsixName
2328 value : python-debugger.vsix
2429 - name : AZURE_ARTIFACTS_FEED
2530 value : ' https://devdiv.pkgs.visualstudio.com/DevDiv/_packaging/Pylance_PublicPackages/npm/registry/'
31+
2632parameters :
2733 - name : publishExtension
2834 displayName : 🚀 Publish Extension
2935 type : boolean
3036 default : false
3137
38+ - name : buildPlatforms
39+ type : object
40+ default :
41+ - name : Linux
42+ vsceTarget : ' '
43+ - name : Linux
44+ packageArch : arm64
45+ vsceTarget : linux-arm64
46+ - name : Linux
47+ packageArch : arm
48+ vsceTarget : linux-armhf
49+ - name : Linux
50+ packageArch : x64
51+ vsceTarget : linux-x64
52+ - name : MacOS
53+ packageArch : arm64
54+ vsceTarget : darwin-arm64
55+ - name : MacOS
56+ packageArch : x64
57+ vsceTarget : darwin-x64
58+ - name : Windows
59+ packageArch : arm
60+ vsceTarget : win32-arm64
61+ - name : Windows
62+ packageArch : x64
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 -m pip install -U pip
72+ displayName : Upgrade pip
73+
74+ - script : python -m pip install wheel
75+ displayName : Install wheel
76+
77+ - script : python -m pip install nox
78+ displayName : Install nox
79+
80+ - script : python -m nox --session install_bundled_libs
81+ displayName : Install Python dependencies
82+
83+ - script : python ./build/update_ext_version.py --for-publishing
84+ displayName : Update build number
85+
86+ - pwsh : Copy-Item -Path "pre-built/*" -Destination "." -Recurse -Force
87+ displayName : Copy pre-built files
88+
89+ - script : npm run package
90+ displayName : Build extension
91+
3292extends :
3393 template : azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
3494 parameters :
@@ -48,78 +108,25 @@ extends:
48108 - stage : Build
49109 displayName : Build & Package Extension
50110 jobs :
51- - job : Build
52- displayName : Build Job
53- pool :
54- name : VSEngSS-MicroBuild2022-1ES # use windows for codesigning to make things easier https://dev.azure.com/devdiv/DevDiv/_wiki/wikis/DevDiv.wiki/650/MicroBuild-Signing
55- os : windows
56- templateContext :
57- mb :
58- signing :
59- enabled : true
60- signType : real
61- signWithProd : true
62- outputs :
63- - output : pipelineArtifact
64- displayName : ' Publish Drop Artifact'
65- targetPath : ' $(Build.StagingDirectory)\drop'
66- artifactName : drop
67- sbomEnabled : true
68- steps :
69- - task : npmAuthenticate@0
70- inputs :
71- workingFile : .npmrc
72-
73- - script : npm config get registry
74- displayName : Verify NPM Registry
75-
76- - task : NodeTool@0
77- inputs :
78- versionSpec : ' 22.x'
79- checkLatest : true
80- displayName : Select Node 22 LTS
81-
82- - task : UsePythonVersion@0
83- inputs :
84- versionSpec : ' 3.9' # note Install Python dependencies step below relies on Python 3.9
85- addToPath : true
86- architecture : ' x64'
87- displayName : Select Python version
88-
89- - script : npm ci
90- displayName : Install NPM dependencies
91-
92- - script : python -m pip install -U pip
93- displayName : Upgrade pip
94-
95- - script : python -m pip install wheel
96- displayName : Install wheel
97-
98- - script : python -m pip install nox
99- displayName : Install nox
100-
101- - script : python -m nox --session install_bundled_libs
102- displayName : Install Python dependencies
103-
104- - script : python ./build/update_ext_version.py --for-publishing
105- displayName : Update build number
106-
107- - script : npm run vsce-package-pre
108- displayName : Build VSIX
109-
110- - template : build/templates/sign.yml@self
111- parameters :
112- vsixName : $(VsixName)
113- workingDirectory : $(Build.StagingDirectory)\drop
114- signType : real
115- verifySignature : true
116-
117- - ${{ if eq(parameters.publishExtension, true) }} :
118- - template : build/templates/publish.yml@self
119- parameters :
120- azureSubscription : PylancePublishPipelineSecureConnectionWithManagedIdentity
121- vsixName : $(VsixName)
122- manifestName : extension.manifest
123- signatureName : extension.signature.p7s
124- publishFolder : drop
125- preRelease : true
111+ - template : azure-pipelines/extension/templates/jobs/package.yml@templates
112+ parameters :
113+ buildPlatforms : ${{ parameters.buildPlatforms }}
114+ buildSteps : ${{ parameters.buildSteps }}
115+ isPreRelease : true
116+ standardizedVersioning : true
117+ customNPMRegistry : $(AZURE_ARTIFACTS_FEED)
118+
119+ - stage : Publish
120+ displayName : Publish Extension
121+ dependsOn : Build
122+ jobs :
123+ - template : azure-pipelines/extension/templates/jobs/publish-extension.yml@templates
124+ parameters :
125+ buildPlatforms : ${{ parameters.buildPlatforms }}
126+ publishExtension : ${{ parameters.publishExtension }}
127+ preRelease : true
128+ teamName : $(TeamName)
129+ ghCreateTag : true
130+ ghCreateRelease : true
131+ ghReleaseAddChangeLog : true
132+ customNPMRegistry : $(AZURE_ARTIFACTS_FEED)
0 commit comments