Skip to content

Migrate to DeployBox for release stage #5063

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 34 additions & 40 deletions .pipelines/vscode-powershell-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ extends:
WindowsHostVersion:
Version: 2022
Network: KS3
release:
category: NonAzure
stages:
- stage: build
jobs:
Expand Down Expand Up @@ -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
Expand All @@ -167,46 +171,36 @@ extends:
- job: validation
displayName: Manual validation
pool:
type: agentless
type: server
timeoutInMinutes: 1440
steps:
- task: ManualValidation@0
displayName: Wait 24 hours for validation
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
pool:
type: windows
variables:
ob_outputDirectory: $(Build.SourcesDirectory)/out
type: release
templateContext:
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:
- download: current
displayName: Download artifacts
- task: UseNode@1
displayName: Use Node 20.x
inputs:
version: 20.x
- 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'
'$(drop)/powershell-$(vsixVersion).vsix'
'--manifestPath'
'$(drop)/powershell-$(vsixVersion).manifest'
'--signaturePath'
'$(drop)/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
Loading