Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/build/azure-pipelines/darwin/product-build-darwin-cli-sign.yml
3520 views
1
parameters:
2
- name: VSCODE_BUILD_MACOS
3
type: boolean
4
- name: VSCODE_BUILD_MACOS_ARM64
5
type: boolean
6
7
steps:
8
- template: ../common/checkout.yml@self
9
10
- task: NodeTool@0
11
inputs:
12
versionSource: fromFile
13
versionFilePath: .nvmrc
14
15
- task: AzureKeyVault@2
16
displayName: "Azure Key Vault: Get Secrets"
17
inputs:
18
azureSubscription: vscode
19
KeyVaultName: vscode-build-secrets
20
SecretsFilter: "github-distro-mixin-password"
21
22
- script: node build/setup-npm-registry.js $NPM_REGISTRY build
23
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
24
displayName: Setup NPM Registry
25
26
- script: |
27
set -e
28
# Set the private NPM registry to the global npmrc file
29
# so that authentication works for subfolders like build/, remote/, extensions/ etc
30
# which does not have their own .npmrc file
31
npm config set registry "$NPM_REGISTRY"
32
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
33
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
34
displayName: Setup NPM
35
36
- task: npmAuthenticate@0
37
inputs:
38
workingFile: $(NPMRC_PATH)
39
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
40
displayName: Setup NPM Authentication
41
42
- script: |
43
set -e
44
45
for i in {1..5}; do # try 5 times
46
npm ci && break
47
if [ $i -eq 5 ]; then
48
echo "Npm install failed too many times" >&2
49
exit 1
50
fi
51
echo "Npm install failed $i, trying again..."
52
done
53
workingDirectory: build
54
env:
55
GITHUB_TOKEN: "$(github-distro-mixin-password)"
56
displayName: Install build dependencies
57
58
- template: ../cli/cli-darwin-sign.yml@self
59
parameters:
60
VSCODE_CLI_ARTIFACTS:
61
- ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}:
62
- unsigned_vscode_cli_darwin_x64_cli
63
- ${{ if eq(parameters.VSCODE_BUILD_MACOS_ARM64, true) }}:
64
- unsigned_vscode_cli_darwin_arm64_cli
65
66