mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 19:48:37 -05:00
* add remote build to the pipeline * add a separte compile step * fix darwin build * add linux container and fix docker creation * fix distro * remove system install and add xvfb start * distro * add logic to only run tests on hosted machine * fix yml * fix yml * add linux docker container * fix docker file * fixdocker * fix darwin * fix linux build * add cache salt to npm cache * intentially ignore kerberos binaries * disable docker for now * remove vsix from win32 * fix linxu and win32 * fix linux and win32 * fix linux and win32 * fix linux * maybe fix win32 * fix linux * fix linux image; disable server package for noe * fix minimatch for win32 test * fix linux build * add back in docker * fix test * use tmp directory insteado workspace * change name of docker image * try a differnt folder * fix download * add a git clean step * bump cache * fix issues with builidng * readd windows build, revert signing changes * simplify win32 server packaage * some more optimizations * use decompress task * add back in install for windows test * fix linux build * add integration test to bat file * make platform the same * add copy extension to windows test * revert tests back * fix vsix drop aquasition * inital changes * fix download * fix dependent on for release * just downlaod everything which makes it easier * setup pipeline artifacts * more clean up * fix linux * add logic to install extensions for integration tests * fix extension install * fix build failures * fix some issues * fix darwin drop * change linux build copy to js * fix darwin archive * fix copy artifacts and use it for windows * use for darinw * fix darwin * ad dep on linux * fix win32 * fix darwin * fix copy artifacts * mkdir p darwin * fix copy * add error handler * add more binaries * add more binaries * fix archive path on linux * add more options to integration extension install * add more binaries * add verbose to installer copy * fix ip rate issues * fix bat file for including extensions * move echo * add windows test condition * use powershell cmdlet rather than cp * remove verbose * remove compiling of extensions * fix pipelines * update docker location * fix copy item * fix signing on win32 * fix locations * move back to using cp * ensure the docker folder exists * test a createdrop script on darwin * wip * fix copy * add drop for linux * fix builds * fix drop * fix docker on linx * fix darwin * lets try this again * fix linux drop * i guess try the copy files task * add create drop for win32 * ensure windows drop location exists * fix extension install * just use mkdir * add better logic for installing extensions * ignore errors? * try force * testing * ok this should work * use production cli * fix liveshare vscodeignore * fix integration test script * revert changes to integration tests to fix them * try newitem * remove exec * explicitly clear last exit code * fix test build * revert publish scripts * add version json * fix tests * add back sources creation * this is stupid * fix clean positioning * add version information to drop * fix locations of artifacts in publush scripts
171 lines
5.6 KiB
YAML
171 lines
5.6 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'
|
|
|
|
- script: |
|
|
set -e
|
|
exit 1
|
|
displayName: Check RestoreCache
|
|
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: '10.15.1'
|
|
|
|
- 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
|
|
SecretsFilter: 'github-distro-mixin-password'
|
|
|
|
- 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
|
|
|
|
- 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
|
|
|
|
- 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'))
|
|
|
|
- script: |
|
|
set -e
|
|
node build/azure-pipelines/mixin
|
|
displayName: Mix in quality
|
|
|
|
- script: |
|
|
set -e
|
|
yarn gulp install-sqltoolsservice
|
|
yarn gulp install-ssmsmin
|
|
displayName: Install extension binaries
|
|
|
|
- script: |
|
|
set -e
|
|
yarn gulp vscode-linux-x64-min-ci
|
|
yarn gulp vscode-reh-linux-x64-min-ci
|
|
yarn gulp vscode-reh-web-linux-x64-min-ci
|
|
displayName: Build
|
|
env:
|
|
VSCODE_MIXIN_PASSWORD: $(github-distro-mixin-password)
|
|
|
|
- script: |
|
|
set -e
|
|
service xvfb start
|
|
displayName: Start xvfb
|
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
|
|
- script: |
|
|
set -e
|
|
yarn gulp package-rebuild-extensions
|
|
yarn gulp compile-extensions
|
|
yarn gulp package-external-extensions
|
|
displayName: Package External extensions
|
|
|
|
- script: |
|
|
set -e
|
|
APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64
|
|
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
|
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
|
DISPLAY=:10 ./scripts/test-extensions-unit.sh
|
|
displayName: 'Run Stable Extension Unit Tests'
|
|
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
|
|
- script: |
|
|
set -e
|
|
APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64
|
|
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
|
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
|
DISPLAY=:10 ./scripts/test-extensions-unit-unstable.sh
|
|
displayName: 'Run Unstable Extension Unit Tests'
|
|
continueOnError: true
|
|
condition: and(succeeded(), eq(variables['RUN_UNSTABLE_TESTS'], 'true'))
|
|
|
|
- script: |
|
|
set -e
|
|
yarn gulp vscode-linux-x64-build-deb
|
|
displayName: Build Deb
|
|
|
|
- script: |
|
|
set -e
|
|
yarn gulp vscode-linux-x64-build-rpm
|
|
displayName: Build Rpm
|
|
|
|
- script: |
|
|
set -e
|
|
./build/azure-pipelines/linux/createDrop.sh
|
|
displayName: Create Drop
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Publish Artifact: drop'
|
|
|
|
- task: PublishTestResults@2
|
|
displayName: 'Publish Test Results test-results.xml'
|
|
inputs:
|
|
testResultsFiles: 'test-results.xml'
|
|
searchFolder: '$(Build.SourcesDirectory)'
|
|
continueOnError: true
|
|
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
|
|
- task: PublishCodeCoverageResults@1
|
|
displayName: 'Publish code coverage from $(Build.SourcesDirectory)/.build/coverage/cobertura-coverage.xml'
|
|
inputs:
|
|
codeCoverageTool: Cobertura
|
|
summaryFileLocation: '$(Build.SourcesDirectory)/.build/coverage/cobertura-coverage.xml'
|
|
reportDirectory: '$(Build.SourcesDirectory)/.build/coverage'
|
|
continueOnError: true
|
|
|
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
displayName: 'Component Detection'
|
|
inputs:
|
|
failOnAlert: true
|