|
| 1 | +steps: |
| 2 | +- script: | |
| 3 | + mkdir -p .build |
| 4 | + echo -n $BUILD_SOURCEVERSION > .build/commit |
| 5 | + displayName: Prepare cache flag |
| 6 | + |
| 7 | +- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 |
| 8 | + inputs: |
| 9 | + keyfile: '.build/commit' |
| 10 | + targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-reh-web-min' |
| 11 | + vstsFeed: 'npm-vscode' |
| 12 | + platformIndependent: true |
| 13 | + alias: 'Compilation' |
| 14 | + |
| 15 | +- script: | |
| 16 | + set -e |
| 17 | + exit 1 |
| 18 | + displayName: Check RestoreCache |
| 19 | + condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) |
| 20 | + |
| 21 | +- task: NodeTool@0 |
| 22 | + inputs: |
| 23 | + versionSpec: "10.15.1" |
| 24 | + |
| 25 | +- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 |
| 26 | + inputs: |
| 27 | + versionSpec: "1.10.1" |
| 28 | + |
| 29 | +- task: AzureKeyVault@1 |
| 30 | + displayName: 'Azure Key Vault: Get Secrets' |
| 31 | + inputs: |
| 32 | + azureSubscription: 'vscode-builds-subscription' |
| 33 | + KeyVaultName: vscode |
| 34 | + |
| 35 | +- script: | |
| 36 | + set -e |
| 37 | + cat << EOF > ~/.netrc |
| 38 | + machine github.com |
| 39 | + login vscode |
| 40 | + password $(github-distro-mixin-password) |
| 41 | + EOF |
| 42 | +
|
| 43 | + git config user.email "vscode@microsoft.com" |
| 44 | + git config user.name "VSCode" |
| 45 | + displayName: Prepare tooling |
| 46 | + |
| 47 | +- script: | |
| 48 | + set -e |
| 49 | + git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git" |
| 50 | + git fetch distro |
| 51 | + git merge $(node -p "require('./package.json').distro") |
| 52 | + displayName: Merge distro |
| 53 | + |
| 54 | +- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 |
| 55 | + inputs: |
| 56 | + keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' |
| 57 | + targetfolder: '**/node_modules, !**/node_modules/**/node_modules' |
| 58 | + vstsFeed: 'npm-vscode' |
| 59 | + |
| 60 | +- script: | |
| 61 | + set -e |
| 62 | + CHILD_CONCURRENCY=1 yarn --frozen-lockfile |
| 63 | + displayName: Install dependencies |
| 64 | + condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) |
| 65 | + |
| 66 | +- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 |
| 67 | + inputs: |
| 68 | + keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' |
| 69 | + targetfolder: '**/node_modules, !**/node_modules/**/node_modules' |
| 70 | + vstsFeed: 'npm-vscode' |
| 71 | + condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) |
| 72 | + |
| 73 | +- script: | |
| 74 | + set -e |
| 75 | + yarn postinstall |
| 76 | + displayName: Run postinstall scripts |
| 77 | + condition: and(succeeded(), eq(variables['CacheRestored'], 'true')) |
| 78 | + |
| 79 | +- script: | |
| 80 | + set -e |
| 81 | + node build/azure-pipelines/mixin |
| 82 | + displayName: Mix in quality |
| 83 | + |
| 84 | +- script: | |
| 85 | + set -e |
| 86 | + VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ |
| 87 | + yarn gulp vscode-web-min-ci |
| 88 | + displayName: Build |
| 89 | + |
| 90 | +- script: | |
| 91 | + set -e |
| 92 | + AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \ |
| 93 | + AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \ |
| 94 | + VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ |
| 95 | + ./build/azure-pipelines/web/publish.sh |
| 96 | + displayName: Publish |
0 commit comments