Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/build/azure-pipelines/win32/product-build-win32-cli-sign.yml
3520 views
1
parameters:
2
- name: VSCODE_BUILD_WIN32
3
type: boolean
4
- name: VSCODE_BUILD_WIN32_ARM64
5
type: boolean
6
7
jobs:
8
- job: WindowsCLISign
9
timeoutInMinutes: 90
10
templateContext:
11
outputParentDirectory: $(Build.ArtifactStagingDirectory)
12
outputs:
13
- ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
14
- output: pipelineArtifact
15
targetPath: $(Build.ArtifactStagingDirectory)/vscode_cli_win32_x64_cli.zip
16
artifactName: vscode_cli_win32_x64_cli
17
displayName: Publish signed artifact with ID vscode_cli_win32_x64_cli
18
sbomBuildDropPath: $(Build.BinariesDirectory)/sign/unsigned_vscode_cli_win32_x64_cli
19
sbomPackageName: "VS Code Windows x64 CLI"
20
sbomPackageVersion: $(Build.SourceVersion)
21
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
22
- output: pipelineArtifact
23
targetPath: $(Build.ArtifactStagingDirectory)/vscode_cli_win32_arm64_cli.zip
24
artifactName: vscode_cli_win32_arm64_cli
25
displayName: Publish signed artifact with ID vscode_cli_win32_arm64_cli
26
sbomBuildDropPath: $(Build.BinariesDirectory)/sign/unsigned_vscode_cli_win32_arm64_cli
27
sbomPackageName: "VS Code Windows arm64 CLI"
28
sbomPackageVersion: $(Build.SourceVersion)
29
steps:
30
- template: ../common/checkout.yml@self
31
32
- task: NodeTool@0
33
displayName: "Use Node.js"
34
inputs:
35
versionSource: fromFile
36
versionFilePath: .nvmrc
37
38
- task: AzureKeyVault@2
39
displayName: "Azure Key Vault: Get Secrets"
40
inputs:
41
azureSubscription: vscode
42
KeyVaultName: vscode-build-secrets
43
SecretsFilter: "github-distro-mixin-password"
44
45
- powershell: node build/setup-npm-registry.js $env:NPM_REGISTRY build
46
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
47
displayName: Setup NPM Registry
48
49
- powershell: |
50
. build/azure-pipelines/win32/exec.ps1
51
$ErrorActionPreference = "Stop"
52
# Set the private NPM registry to the global npmrc file
53
# so that authentication works for subfolders like build/, remote/, extensions/ etc
54
# which does not have their own .npmrc file
55
exec { npm config set registry "$env:NPM_REGISTRY" }
56
$NpmrcPath = (npm config get userconfig)
57
echo "##vso[task.setvariable variable=NPMRC_PATH]$NpmrcPath"
58
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
59
displayName: Setup NPM
60
61
- task: npmAuthenticate@0
62
inputs:
63
workingFile: $(NPMRC_PATH)
64
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
65
displayName: Setup NPM Authentication
66
67
- powershell: |
68
. azure-pipelines/win32/exec.ps1
69
$ErrorActionPreference = "Stop"
70
exec { npm ci }
71
workingDirectory: build
72
env:
73
GITHUB_TOKEN: "$(github-distro-mixin-password)"
74
retryCountOnTaskFailure: 5
75
displayName: Install build dependencies
76
77
- template: ../cli/cli-win32-sign.yml@self
78
parameters:
79
VSCODE_CLI_ARTIFACTS:
80
- ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
81
- unsigned_vscode_cli_win32_x64_cli
82
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
83
- unsigned_vscode_cli_win32_arm64_cli
84
85