-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release pipelines for themes and extension pack (#12589)
- Loading branch information
Showing
7 changed files
with
299 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: $(date:yyyyMMdd)$(rev:.r) | ||
trigger: none | ||
pr: none | ||
|
||
parameters: | ||
- name: verifyVersion | ||
displayName: Attest version in package.json is correct | ||
type: boolean | ||
default: false | ||
- name: verifyReadme | ||
displayName: Attest README.md is updated | ||
type: boolean | ||
default: false | ||
|
||
resources: | ||
repositories: | ||
- repository: MicroBuildTemplate | ||
type: git | ||
name: 1ESPipelineTemplates/MicroBuildTemplate | ||
ref: refs/tags/release | ||
|
||
extends: | ||
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate | ||
parameters: | ||
pool: | ||
name: AzurePipelines-EO | ||
image: AzurePipelinesWindows2022compliantGPT | ||
os: windows | ||
sdl: | ||
sourceAnalysisPool: | ||
name: AzurePipelines-EO | ||
image: AzurePipelinesWindows2022compliantGPT | ||
os: windows | ||
|
||
stages: | ||
- stage: package | ||
jobs: | ||
# Introduce pipeline compilation errors to block scheduling if the requisite parameters are not set | ||
- ${{ if not(eq(parameters.verifyVersion, true)) }}: | ||
- 'The version in package.json should be updated before scheduling the pipeline.' | ||
|
||
- ${{ if not(eq(parameters.verifyReadme, true)) }}: | ||
- 'README.md should be updated before scheduling the pipeline.' | ||
|
||
- template: /Build/package/jobs_package_vsix.yml@self | ||
parameters: | ||
vsixName: cpptools-extension-pack.vsix | ||
srcDir: ExtensionPack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: $(date:yyyyMMdd)$(rev:.r) | ||
trigger: none | ||
pr: none | ||
|
||
parameters: | ||
- name: verifyVersion | ||
displayName: Attest version in package.json is correct | ||
type: boolean | ||
default: false | ||
- name: verifyReadme | ||
displayName: Attest README.md is updated | ||
type: boolean | ||
default: false | ||
|
||
resources: | ||
repositories: | ||
- repository: MicroBuildTemplate | ||
type: git | ||
name: 1ESPipelineTemplates/MicroBuildTemplate | ||
ref: refs/tags/release | ||
|
||
extends: | ||
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate | ||
parameters: | ||
pool: | ||
name: AzurePipelines-EO | ||
image: AzurePipelinesWindows2022compliantGPT | ||
os: windows | ||
sdl: | ||
sourceAnalysisPool: | ||
name: AzurePipelines-EO | ||
image: AzurePipelinesWindows2022compliantGPT | ||
os: windows | ||
|
||
stages: | ||
- stage: package | ||
jobs: | ||
# Introduce pipeline compilation errors to block scheduling if the requisite parameters are not set | ||
- ${{ if not(eq(parameters.verifyVersion, true)) }}: | ||
- 'The version in package.json should be updated before scheduling the pipeline.' | ||
|
||
- ${{ if not(eq(parameters.verifyReadme, true)) }}: | ||
- 'README.md should be updated before scheduling the pipeline.' | ||
|
||
- template: /Build/package/jobs_package_vsix.yml@self | ||
parameters: | ||
vsixName: cpptools-themes.vsix | ||
srcDir: Themes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
parameters: | ||
- name: vsixName | ||
type: string | ||
default: '' | ||
- name: srcDir | ||
type: string | ||
default: '' | ||
|
||
jobs: | ||
- job: package | ||
displayName: Build ${{ parameters.vsixName }} | ||
timeoutInMinutes: 30 | ||
cancelTimeoutInMinutes: 1 | ||
templateContext: | ||
outputs: | ||
- output: pipelineArtifact | ||
displayName: '${{ parameters.vsixName }}' | ||
targetPath: $(Build.ArtifactStagingDirectory)\vsix | ||
artifactName: vsix | ||
|
||
steps: | ||
- checkout: self | ||
|
||
- task: UseNode@1 | ||
displayName: Use Node 18.x | ||
inputs: | ||
version: 18.x | ||
|
||
- task: Npm@0 | ||
displayName: Install vsce | ||
inputs: | ||
arguments: --global @vscode/vsce | ||
|
||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 | ||
displayName: Use Yarn 1.x | ||
|
||
- task: CmdLine@1 | ||
displayName: Create Staging Directory | ||
inputs: | ||
filename: mkdir | ||
arguments: $(Build.ArtifactStagingDirectory)\vsix | ||
|
||
- task: CmdLine@1 | ||
displayName: Run VSCE to package vsix | ||
inputs: | ||
filename: vsce | ||
arguments: package --yarn -o $(Build.ArtifactStagingDirectory)\vsix\${{ parameters.vsixName }} | ||
workingFolder: $(Build.SourcesDirectory)\${{ parameters.srcDir }} | ||
|
||
- task: Npm@0 | ||
displayName: Uninstall vsce | ||
inputs: | ||
command: uninstall | ||
arguments: --global @vscode/vsce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: $(Date:yyyyMMdd)$(rev:.r) | ||
trigger: none | ||
pr: none | ||
|
||
resources: | ||
repositories: | ||
- repository: MicroBuildTemplate | ||
type: git | ||
name: 1ESPipelineTemplates/MicroBuildTemplate | ||
ref: refs/tags/release | ||
pipelines: | ||
- pipeline: vsixBuild | ||
source: '\VC\VSCode\CpptoolsVSIX\Package cpptools-extension-pack' | ||
trigger: true | ||
|
||
extends: | ||
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate | ||
parameters: | ||
pool: | ||
name: AzurePipelines-EO | ||
image: AzurePipelinesWindows2022compliantGPT | ||
os: windows | ||
sdl: | ||
sourceAnalysisPool: | ||
name: AzurePipelines-EO | ||
image: AzurePipelinesWindows2022compliantGPT | ||
os: windows | ||
|
||
stages: | ||
- stage: Validate | ||
jobs: | ||
- template: /Build/publish/jobs_manual_validation.yml@self | ||
parameters: | ||
notifyUsers: $(NotifyUsers) | ||
releaseBuildUrl: $(ReleaseBuildUrl) | ||
|
||
- stage: Release | ||
dependsOn: Validate | ||
jobs: | ||
- template: /Build/publish/jobs_publish_vsix.yml@self | ||
parameters: | ||
vsixName: cpptools-extension-pack.vsix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: $(Date:yyyyMMdd)$(rev:.r) | ||
trigger: none | ||
pr: none | ||
|
||
resources: | ||
repositories: | ||
- repository: MicroBuildTemplate | ||
type: git | ||
name: 1ESPipelineTemplates/MicroBuildTemplate | ||
ref: refs/tags/release | ||
pipelines: | ||
- pipeline: vsixBuild | ||
source: '\VC\VSCode\CpptoolsVSIX\Package cpptools-themes' | ||
trigger: true | ||
|
||
extends: | ||
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate | ||
parameters: | ||
pool: | ||
name: AzurePipelines-EO | ||
image: AzurePipelinesWindows2022compliantGPT | ||
os: windows | ||
sdl: | ||
sourceAnalysisPool: | ||
name: AzurePipelines-EO | ||
image: AzurePipelinesWindows2022compliantGPT | ||
os: windows | ||
|
||
stages: | ||
- stage: Validate | ||
jobs: | ||
- template: /Build/publish/jobs_manual_validation.yml@self | ||
parameters: | ||
notifyUsers: $(NotifyUsers) | ||
releaseBuildUrl: $(ReleaseBuildUrl) | ||
|
||
- stage: Release | ||
dependsOn: Validate | ||
jobs: | ||
- template: /Build/publish/jobs_publish_vsix.yml@self | ||
parameters: | ||
vsixName: cpptools-themes.vsix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
parameters: | ||
- name: notifyUsers | ||
type: string | ||
default: '' | ||
- name: releaseBuildUrl | ||
type: string | ||
default: '' | ||
|
||
jobs: | ||
- job: WaitForValidation | ||
displayName: Wait for VSIX validation | ||
pool: server | ||
steps: | ||
- task: ManualValidation@0 | ||
displayName: "Manual Validation" | ||
inputs: | ||
notifyUsers: $(notifyUsers) | ||
instructions: | | ||
Download and test the vsix from the latest release build: $(releaseBuildUrl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
parameters: | ||
- name: vsixName | ||
type: string | ||
default: '' | ||
|
||
jobs: | ||
- job: Publish | ||
displayName: Publish to Marketplace | ||
templateContext: | ||
type: releaseJob | ||
isProduction: true | ||
inputs: | ||
- input: pipelineArtifact | ||
pipeline: vsixBuild | ||
artifactName: vsix | ||
targetPath: $(Build.StagingDirectory)\vsix | ||
|
||
steps: | ||
- task: NodeTool@0 | ||
displayName: Use Node 18.x | ||
inputs: | ||
versionSpec: 18.x | ||
|
||
- task: Npm@0 | ||
displayName: Install vsce | ||
inputs: | ||
arguments: --global @vscode/vsce | ||
|
||
- task: AzureCLI@2 | ||
displayName: Generate AAD_TOKEN | ||
inputs: | ||
azureSubscription: $(AzureSubscription) | ||
scriptType: ps | ||
scriptLocation: inlineScript | ||
inlineScript: | | ||
$aadToken = az account get-access-token --query accessToken --resource $(AzureGuid) -o tsv | ||
Write-Host "##vso[task.setvariable variable=AAD_TOKEN;issecret=true]$aadToken" | ||
- script: | | ||
vsce publish --packagePath $(Build.StagingDirectory)\vsix\${{ parameters.vsixName }} | ||
displayName: Publish to Marketplace | ||
env: | ||
VSCE_PAT: $(AAD_TOKEN) | ||