From 42029396fcb9dceef896257ecaad7d61e1723551 Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Mon, 19 May 2025 16:11:35 -0700 Subject: [PATCH 1/3] Switch to deploy box product release container --- .pipelines/vscode-powershell-Official.yml | 40 +++++++++++++---------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/.pipelines/vscode-powershell-Official.yml b/.pipelines/vscode-powershell-Official.yml index 3e7b6be52f..92f9b08110 100644 --- a/.pipelines/vscode-powershell-Official.yml +++ b/.pipelines/vscode-powershell-Official.yml @@ -58,6 +58,8 @@ extends: WindowsHostVersion: Version: 2022 Network: KS3 + release: + category: NonAzure stages: - stage: build jobs: @@ -130,33 +132,35 @@ extends: command: sign cp_code: "CP-401405-VSCodePublisherSign" search_root: $(Build.SourcesDirectory)/out - files_to_sign: | - *.signature.p7s; + files_to_sign: "*.signature.p7s" - stage: release dependsOn: build condition: eq(variables['Build.Reason'], 'Manual') variables: + ob_release_environment: PPE version: $[ stageDependencies.build.main.outputs['package.version'] ] vsixVersion: $[ stageDependencies.build.main.outputs['package.vsixVersion'] ] prerelease: $[ stageDependencies.build.main.outputs['package.prerelease'] ] - drop: $(Pipeline.Workspace)/drop_build_main jobs: - job: github displayName: Publish draft to GitHub pool: - type: windows - variables: - ob_outputDirectory: $(Build.SourcesDirectory)/out + type: release + templateContext: + inputs: + - input: pipelineArtifact + artifactName: drop_build_main steps: - - download: current - displayName: Download artifacts - task: GitHubRelease@1 displayName: Create GitHub release inputs: gitHubConnection: GitHub repositoryName: PowerShell/vscode-powershell target: main - assets: $(drop)/powershell-$(vsixVersion).vsix + assets: | + $(Pipeline.Workspace)/powershell-$(vsixVersion).vsix + $(Pipeline.Workspace)/powershell-$(vsixVersion).manifest + $(Pipeline.Workspace)/powershell-$(vsixVersion).signature.p7s tagSource: userSpecifiedTag tag: v$(version) isDraft: true @@ -167,7 +171,7 @@ extends: - job: validation displayName: Manual validation pool: - type: agentless + type: server timeoutInMinutes: 1440 steps: - task: ManualValidation@0 @@ -180,12 +184,12 @@ extends: dependsOn: validation displayName: Publish to VS Code Marketplace pool: - type: windows - variables: - ob_outputDirectory: $(Build.SourcesDirectory)/out + type: release + templateContext: + inputs: + - input: pipelineArtifact + artifactName: drop_build_main steps: - - download: current - displayName: Download artifacts - task: UseNode@1 displayName: Use Node 20.x inputs: @@ -202,11 +206,11 @@ extends: $publishArgs = @( '--azure-credential' '--packagePath' - '$(drop)/powershell-$(vsixVersion).vsix' + '$(Pipeline.Workspace)/powershell-$(vsixVersion).vsix' '--manifestPath' - '$(drop)/powershell-$(vsixVersion).manifest' + '$(Pipeline.Workspace)/powershell-$(vsixVersion).manifest' '--signaturePath' - '$(drop)/powershell-$(vsixVersion).signature.p7s' + '$(Pipeline.Workspace)/powershell-$(vsixVersion).signature.p7s' if ([bool]::Parse('$(prerelease)')) { '--pre-release' } ) npm run publish -- @publishArgs From 704c052f80f1990c40a127df6403ba3620cb664f Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Mon, 19 May 2025 16:26:02 -0700 Subject: [PATCH 2/3] Don't install Node in release container --- .pipelines/vscode-powershell-Official.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.pipelines/vscode-powershell-Official.yml b/.pipelines/vscode-powershell-Official.yml index 92f9b08110..64c5791c25 100644 --- a/.pipelines/vscode-powershell-Official.yml +++ b/.pipelines/vscode-powershell-Official.yml @@ -190,10 +190,6 @@ extends: - input: pipelineArtifact artifactName: drop_build_main steps: - - task: UseNode@1 - displayName: Use Node 20.x - inputs: - version: 20.x - pwsh: npm ci displayName: Install NPM packages (for vsce) - task: AzureCLI@2 From bf468189a0e9246d0c6cffce09ac9f5eae459a2a Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Thu, 22 May 2025 12:37:24 -0700 Subject: [PATCH 3/3] Switch to new VSCE publish workflow --- .pipelines/vscode-powershell-Official.yml | 36 ++++++++++------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/.pipelines/vscode-powershell-Official.yml b/.pipelines/vscode-powershell-Official.yml index 64c5791c25..dd36ad5a53 100644 --- a/.pipelines/vscode-powershell-Official.yml +++ b/.pipelines/vscode-powershell-Official.yml @@ -179,7 +179,6 @@ extends: inputs: notifyUsers: $(Build.RequestedForEmail) instructions: Please validate the release and then publish it! - timeoutInMinutes: 1440 - job: vscode dependsOn: validation displayName: Publish to VS Code Marketplace @@ -189,24 +188,19 @@ extends: inputs: - input: pipelineArtifact artifactName: drop_build_main + workflow: vsce + vsce: + serviceConnection: vscode-marketplace + vsixPath: "$(Pipeline.Workspace)/powershell-$(vsixVersion).vsix" + signaturePath: "$(Pipeline.Workspace)/powershell-$(vsixVersion).signature.p7s" + manifestPath: "$(Pipeline.Workspace)/powershell-$(vsixVersion).manifest" + prerelease: $(prerelease) + useCustomVSCE: true + feed: + organization: mscodehub + project: PowerShellCore + feedName: PowerShellCore_PublicPackages steps: - - pwsh: npm ci - displayName: Install NPM packages (for vsce) - - task: AzureCLI@2 - displayName: Run vsce publish - inputs: - azureSubscription: vscode-marketplace - scriptType: pscore - scriptLocation: inlineScript - inlineScript: | - $publishArgs = @( - '--azure-credential' - '--packagePath' - '$(Pipeline.Workspace)/powershell-$(vsixVersion).vsix' - '--manifestPath' - '$(Pipeline.Workspace)/powershell-$(vsixVersion).manifest' - '--signaturePath' - '$(Pipeline.Workspace)/powershell-$(vsixVersion).signature.p7s' - if ([bool]::Parse('$(prerelease)')) { '--pre-release' } - ) - npm run publish -- @publishArgs + - pwsh: | + Write-Host Publishing: $(vsixVersion), pre-release: $(prerelease) + displayName: No-op step to satisfy pipeline requirements