Skip to content

Commit 1f9d97c

Browse files
committed
Reorganize build and packages to allow for omitting dev tools
New requirements in our release pipeline require us to omit the installation of quite a few of our (optional) dev tools, as their post-install tasks reach out to the public NPM registry and so are blocked. By moving everything except `esbuild` and `vsce` to `optionalDependencies` (and reorganzing the build script) we can run the linter and tests outside of the secure container. Since OneBranch and GitHub Actions are now using PowerShell 7.4, the module setup script had to be updated. Because OneBranch now runs without releasing, the downloaded drop had to change (skipping a zip and extraction).
1 parent d69ee8a commit 1f9d97c

File tree

5 files changed

+355
-365
lines changed

5 files changed

+355
-365
lines changed

.pipelines/vscode-powershell-Official.yml

+15-25
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ parameters:
2727
variables:
2828
system.debug: ${{ parameters.debug }}
2929
BuildConfiguration: Release
30-
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest
30+
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2022/vse2022:latest
3131

3232
resources:
3333
repositories:
@@ -50,6 +50,10 @@ extends:
5050
asyncSdl:
5151
enabled: true
5252
forStages: [build]
53+
featureFlags:
54+
WindowsHostVersion:
55+
Version: 2022
56+
Network: Netlock
5357
stages:
5458
- stage: build
5559
jobs:
@@ -75,30 +79,20 @@ extends:
7579
inputs:
7680
system: Custom
7781
customVersion: $(package.version)
78-
- task: UseNode@1
79-
displayName: Use Node 18.x
80-
inputs:
81-
version: 18.x
82-
- task: PowerShell@2
83-
displayName: Install PSResources
84-
inputs:
85-
pwsh: true
86-
filePath: tools/installPSResources.ps1
8782
- task: DownloadPipelineArtifact@2
8883
displayName: Download PowerShellEditorServices
8984
inputs:
9085
source: specific
9186
project: PowerShellCore
9287
definition: 2905
9388
specificBuildWithTriggering: true
94-
artifact: drop_release_github
95-
itemPattern: PowerShellEditorServices.zip
96-
- task: ExtractFiles@1
97-
displayName: Extract PowerShellEditorServices module
98-
inputs:
99-
archiveFilePatterns: $(Pipeline.Workspace)/PowerShellEditorServices.zip
100-
destinationFolder: $(Build.SourcesDirectory)/modules
101-
- pwsh: Invoke-Build Build -Configuration $(BuildConfiguration)
89+
branchName: refs/heads/main
90+
artifact: drop_build_main
91+
targetPath: $(Build.SourcesDirectory)/modules
92+
- pwsh: |
93+
Register-PSResourceRepository -Name GalleryFeed -Uri "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/GalleryFeed/nuget/v2" -Trusted
94+
Install-Module -Repository GalleryFeed -Name InvokeBuild
95+
Invoke-Build Build -Configuration $(BuildConfiguration)
10296
displayName: Build
10397
- task: onebranch.pipeline.signing@1
10498
displayName: Sign 1st-party example PowerShell files
@@ -141,13 +135,9 @@ extends:
141135
project: PowerShellCore
142136
definition: 2905
143137
specificBuildWithTriggering: true
144-
artifact: drop_release_github
145-
itemPattern: PowerShellEditorServices.zip
146-
- task: ExtractFiles@1
147-
displayName: Extract PowerShellEditorServices module
148-
inputs:
149-
archiveFilePatterns: $(Pipeline.Workspace)/PowerShellEditorServices.zip
150-
destinationFolder: $(Build.SourcesDirectory)/modules
138+
branchName: refs/heads/main
139+
artifact: drop_build_main
140+
targetPath: $(Build.SourcesDirectory)/modules
151141
- pwsh: Invoke-Build Test -Configuration $(BuildConfiguration)
152142
displayName: Run tests
153143
- stage: release

0 commit comments

Comments
 (0)