mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 16:49:06 +01:00
Engineering - cleanup pull request ADO pipeline (#262276)
* Initial implementation * Fix indentation
This commit is contained in:
@@ -19,35 +19,29 @@ parameters:
|
||||
default: ""
|
||||
|
||||
steps:
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- checkout: self
|
||||
fetchDepth: 1
|
||||
retryCountOnTaskFailure: 3
|
||||
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../distro/download-distro.yml@self
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: vscode
|
||||
KeyVaultName: vscode-build-secrets
|
||||
SecretsFilter: "github-distro-mixin-password"
|
||||
- task: AzureKeyVault@2
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
inputs:
|
||||
azureSubscription: vscode
|
||||
KeyVaultName: vscode-build-secrets
|
||||
SecretsFilter: "github-distro-mixin-password"
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifact: Compilation
|
||||
path: $(Build.ArtifactStagingDirectory)
|
||||
displayName: Download compilation output
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifact: Compilation
|
||||
path: $(Build.ArtifactStagingDirectory)
|
||||
displayName: Download compilation output
|
||||
|
||||
- script: tar -xzf $(Build.ArtifactStagingDirectory)/compilation.tar.gz
|
||||
displayName: Extract compilation output
|
||||
- script: tar -xzf $(Build.ArtifactStagingDirectory)/compilation.tar.gz
|
||||
displayName: Extract compilation output
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
@@ -154,10 +148,9 @@ steps:
|
||||
displayName: Install dependencies
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: node build/azure-pipelines/distro/mixin-npm
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
||||
displayName: Mixin distro node modules
|
||||
- script: node build/azure-pipelines/distro/mixin-npm
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
||||
displayName: Mixin distro node modules
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
@@ -167,107 +160,99 @@ steps:
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
||||
displayName: Create node_modules archive
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: node build/azure-pipelines/distro/mixin-quality
|
||||
displayName: Mixin distro quality
|
||||
- script: node build/azure-pipelines/distro/mixin-quality
|
||||
displayName: Mixin distro quality
|
||||
|
||||
- template: ../common/install-builtin-extensions.yml@self
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: |
|
||||
set -e
|
||||
npm run gulp vscode-linux-$(VSCODE_ARCH)-min-ci
|
||||
ARCHIVE_PATH=".build/linux/client/code-${{ parameters.VSCODE_QUALITY }}-$(VSCODE_ARCH)-$(date +%s).tar.gz"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
echo "##vso[task.setvariable variable=CLIENT_PATH]$ARCHIVE_PATH"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build client
|
||||
- script: |
|
||||
set -e
|
||||
npm run gulp vscode-linux-$(VSCODE_ARCH)-min-ci
|
||||
ARCHIVE_PATH=".build/linux/client/code-${{ parameters.VSCODE_QUALITY }}-$(VSCODE_ARCH)-$(date +%s).tar.gz"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
echo "##vso[task.setvariable variable=CLIENT_PATH]$ARCHIVE_PATH"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build client
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_CIBUILD, true) }}:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_cli_linux_$(VSCODE_ARCH)_cli
|
||||
patterns: "**"
|
||||
path: $(Build.ArtifactStagingDirectory)/cli
|
||||
displayName: Download VS Code CLI
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
tar -xzvf $(Build.ArtifactStagingDirectory)/cli/*.tar.gz -C $(Build.ArtifactStagingDirectory)/cli
|
||||
CLI_APP_NAME=$(node -p "require(\"$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)/resources/app/product.json\").tunnelApplicationName")
|
||||
APP_NAME=$(node -p "require(\"$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)/resources/app/product.json\").applicationName")
|
||||
mv $(Build.ArtifactStagingDirectory)/cli/$APP_NAME $(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)/bin/$CLI_APP_NAME
|
||||
displayName: Mix in CLI
|
||||
- ${{ if ne(parameters.VSCODE_CIBUILD, true) }}:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_cli_linux_$(VSCODE_ARCH)_cli
|
||||
patterns: "**"
|
||||
path: $(Build.ArtifactStagingDirectory)/cli
|
||||
displayName: Download VS Code CLI
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
tar -czf $CLIENT_PATH -C .. VSCode-linux-$(VSCODE_ARCH)
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Archive client
|
||||
tar -xzvf $(Build.ArtifactStagingDirectory)/cli/*.tar.gz -C $(Build.ArtifactStagingDirectory)/cli
|
||||
CLI_APP_NAME=$(node -p "require(\"$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)/resources/app/product.json\").tunnelApplicationName")
|
||||
APP_NAME=$(node -p "require(\"$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)/resources/app/product.json\").applicationName")
|
||||
mv $(Build.ArtifactStagingDirectory)/cli/$APP_NAME $(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)/bin/$CLI_APP_NAME
|
||||
displayName: Mix in CLI
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
tar -czf $CLIENT_PATH -C .. VSCode-linux-$(VSCODE_ARCH)
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Archive client
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm run gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
|
||||
mv ../vscode-reh-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH) # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/server/vscode-server-linux-$(VSCODE_ARCH).tar.gz"
|
||||
UNARCHIVE_PATH="`pwd`/../vscode-server-linux-$(VSCODE_ARCH)"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)
|
||||
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
|
||||
echo "##vso[task.setvariable variable=SERVER_UNARCHIVE_PATH]$UNARCHIVE_PATH"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build server
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm run gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
|
||||
mv ../vscode-reh-web-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH)-web # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/web/vscode-server-linux-$(VSCODE_ARCH)-web.tar.gz"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)-web
|
||||
echo "##vso[task.setvariable variable=WEB_PATH]$ARCHIVE_PATH"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build server (web)
|
||||
|
||||
- ${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
|
||||
- script: |
|
||||
set -e
|
||||
npm run gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
|
||||
mv ../vscode-reh-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH) # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/server/vscode-server-linux-$(VSCODE_ARCH).tar.gz"
|
||||
UNARCHIVE_PATH="`pwd`/../vscode-server-linux-$(VSCODE_ARCH)"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)
|
||||
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
|
||||
echo "##vso[task.setvariable variable=SERVER_UNARCHIVE_PATH]$UNARCHIVE_PATH"
|
||||
|
||||
EXPECTED_GLIBC_VERSION="2.28" \
|
||||
EXPECTED_GLIBCXX_VERSION="3.4.25" \
|
||||
VSCODE_SYSROOT_DIR="$(Build.SourcesDirectory)/.build/sysroots/glibc-2.28-gcc-8.5.0" \
|
||||
./build/azure-pipelines/linux/verify-glibc-requirements.sh
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build server
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
npm run gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
|
||||
mv ../vscode-reh-web-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH)-web # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/web/vscode-server-linux-$(VSCODE_ARCH)-web.tar.gz"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)-web
|
||||
echo "##vso[task.setvariable variable=WEB_PATH]$ARCHIVE_PATH"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build server (web)
|
||||
|
||||
- ${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
EXPECTED_GLIBC_VERSION="2.28" \
|
||||
EXPECTED_GLIBCXX_VERSION="3.4.25" \
|
||||
VSCODE_SYSROOT_DIR="$(Build.SourcesDirectory)/.build/sysroots/glibc-2.28-gcc-8.5.0" \
|
||||
./build/azure-pipelines/linux/verify-glibc-requirements.sh
|
||||
env:
|
||||
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
|
||||
npm_config_arch: $(NPM_ARCH)
|
||||
VSCODE_ARCH: $(VSCODE_ARCH)
|
||||
displayName: Check GLIBC and GLIBCXX dependencies in server archive
|
||||
|
||||
- ${{ else }}:
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
EXPECTED_GLIBC_VERSION="2.28" \
|
||||
EXPECTED_GLIBCXX_VERSION="3.4.26" \
|
||||
VSCODE_SYSROOT_DIR="$(Build.SourcesDirectory)/.build/sysroots/glibc-2.28-gcc-8.5.0" \
|
||||
./build/azure-pipelines/linux/verify-glibc-requirements.sh
|
||||
env:
|
||||
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
|
||||
npm_config_arch: $(NPM_ARCH)
|
||||
VSCODE_ARCH: $(VSCODE_ARCH)
|
||||
displayName: Check GLIBC and GLIBCXX dependencies in server archive
|
||||
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
|
||||
npm_config_arch: $(NPM_ARCH)
|
||||
VSCODE_ARCH: $(VSCODE_ARCH)
|
||||
displayName: Check GLIBC and GLIBCXX dependencies in server archive
|
||||
|
||||
- ${{ else }}:
|
||||
- script: npm run gulp "transpile-client-esbuild" "transpile-extensions"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Transpile client and extensions
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
- ${{ if and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'oss')) }}:
|
||||
EXPECTED_GLIBC_VERSION="2.28" \
|
||||
EXPECTED_GLIBCXX_VERSION="3.4.26" \
|
||||
VSCODE_SYSROOT_DIR="$(Build.SourcesDirectory)/.build/sysroots/glibc-2.28-gcc-8.5.0" \
|
||||
./build/azure-pipelines/linux/verify-glibc-requirements.sh
|
||||
env:
|
||||
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
|
||||
npm_config_arch: $(NPM_ARCH)
|
||||
VSCODE_ARCH: $(VSCODE_ARCH)
|
||||
displayName: Check GLIBC and GLIBCXX dependencies in server archive
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_CIBUILD, true) }}:
|
||||
- script: |
|
||||
set -e
|
||||
npm run gulp "vscode-linux-$(VSCODE_ARCH)-prepare-deb"
|
||||
@@ -368,15 +353,12 @@ steps:
|
||||
- ${{ if or(eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true), eq(parameters.VSCODE_RUN_BROWSER_TESTS, true), eq(parameters.VSCODE_RUN_REMOTE_TESTS, true)) }}:
|
||||
- template: product-build-linux-test.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_RUN_ELECTRON_TESTS: ${{ parameters.VSCODE_RUN_ELECTRON_TESTS }}
|
||||
VSCODE_RUN_BROWSER_TESTS: ${{ parameters.VSCODE_RUN_BROWSER_TESTS }}
|
||||
VSCODE_RUN_REMOTE_TESTS: ${{ parameters.VSCODE_RUN_REMOTE_TESTS }}
|
||||
VSCODE_TEST_ARTIFACT_NAME: ${{ parameters.VSCODE_TEST_ARTIFACT_NAME }}
|
||||
${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
PUBLISH_TASK_NAME: 1ES.PublishPipelineArtifact@1
|
||||
|
||||
- ${{ if and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'oss')) }}:
|
||||
- ${{ if ne(parameters.VSCODE_CIBUILD, true) }}:
|
||||
- script: npx deemon --attach node build/azure-pipelines/linux/codesign.js
|
||||
condition: succeededOrFailed()
|
||||
displayName: "✍️ Post-job: Codesign deb & rpm"
|
||||
|
||||
Reference in New Issue
Block a user