mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
133 lines
4.5 KiB
YAML
133 lines
4.5 KiB
YAML
steps:
|
|
- script: |
|
|
mkdir -p .build
|
|
echo -n $BUILD_SOURCEVERSION > .build/commit
|
|
echo -n $VSCODE_QUALITY > .build/quality
|
|
displayName: Prepare cache flag
|
|
|
|
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
inputs:
|
|
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
vstsFeed: 'BuildCache'
|
|
platformIndependent: true
|
|
alias: 'Compilation'
|
|
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: "12.13.0"
|
|
|
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
|
inputs:
|
|
versionSpec: "1.x"
|
|
|
|
- task: AzureKeyVault@1
|
|
displayName: 'Azure Key Vault: Get Secrets'
|
|
inputs:
|
|
azureSubscription: 'ClientToolsInfra_670062 (88d5392f-a34f-4769-b405-f597fc533613)'
|
|
KeyVaultName: ado-secrets
|
|
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
|
|
- script: |
|
|
set -e
|
|
cat << EOF > ~/.netrc
|
|
machine github.com
|
|
login azuredatastudio
|
|
password $(github-distro-mixin-password)
|
|
EOF
|
|
|
|
git config user.email "andresse@microsoft.com"
|
|
git config user.name "AzureDataStudio"
|
|
displayName: Prepare tooling
|
|
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
|
|
- script: |
|
|
set -e
|
|
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
|
git fetch distro
|
|
git merge $(node -p "require('./package.json').distro")
|
|
displayName: Merge distro
|
|
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
|
|
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
inputs:
|
|
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
|
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
|
vstsFeed: 'BuildCache'
|
|
|
|
- script: |
|
|
set -e
|
|
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
|
displayName: Install dependencies
|
|
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
|
|
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
inputs:
|
|
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
|
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
|
vstsFeed: 'BuildCache'
|
|
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
|
|
- script: |
|
|
set -e
|
|
yarn postinstall
|
|
displayName: Run postinstall scripts
|
|
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
|
|
|
# Mixin must run before optimize, because the CSS loader will
|
|
# inline small SVGs
|
|
- script: |
|
|
set -e
|
|
node build/azure-pipelines/mixin
|
|
displayName: Mix in quality
|
|
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
|
|
- script: |
|
|
set -e
|
|
yarn sqllint
|
|
yarn gulp hygiene
|
|
yarn strict-vscode
|
|
yarn valid-layers-check
|
|
displayName: Run hygiene, eslint
|
|
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
|
|
- script: |
|
|
set -e
|
|
yarn gulp compile-build
|
|
yarn gulp compile-extensions-build
|
|
yarn gulp minify-vscode
|
|
yarn gulp minify-vscode-reh
|
|
yarn gulp minify-vscode-reh-web
|
|
displayName: Compile
|
|
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
|
|
- script: |
|
|
set -e
|
|
AZURE_STORAGE_ACCOUNT="$(sourcemap-storage-account)" \
|
|
AZURE_STORAGE_ACCESS_KEY="$(sourcemap-storage-key)" \
|
|
node build/azure-pipelines/upload-sourcemaps
|
|
displayName: Upload sourcemaps
|
|
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
|
|
- script: |
|
|
set -e
|
|
|
|
VERSION=$(node -p "require(\"./package.json\").version")
|
|
|
|
echo -e "{ \"version\": \"$VERSION\", \"quality\": \"$VSCODE_QUALITY\", \"commit\": \"$BUILD_SOURCEVERSION\" }" > ".build/version.json"
|
|
|
|
node build/azure-pipelines/common/copyArtifacts.js
|
|
displayName: Write Version Information
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Publish Artifact: drop'
|
|
|
|
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
inputs:
|
|
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
vstsFeed: 'BuildCache'
|
|
platformIndependent: true
|
|
alias: 'Compilation'
|
|
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|