Engineering - cleanup pull request ADO pipeline (#262276)

* Initial implementation

* Fix indentation
This commit is contained in:
Ladislau Szomoru
2025-08-19 11:25:14 +02:00
committed by GitHub
parent b2bd568ffc
commit cb596f81ac
21 changed files with 684 additions and 1443 deletions
@@ -18,16 +18,15 @@ steps:
versionFilePath: .nvmrc
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- template: ../cli/cli-apply-patches.yml@self
- template: ../cli/cli-apply-patches.yml@self
- script: |
set -e
npm ci
workingDirectory: build
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Install build dependencies
- script: |
set -e
npm ci
workingDirectory: build
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Install build dependencies
- task: Npm@1
displayName: Download openssl prebuilt
+4 -12
View File
@@ -14,19 +14,11 @@ parameters:
steps:
- ${{ if contains(parameters.VSCODE_CLI_TARGET, '-windows-') }}:
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- pwsh: Write-Host "##vso[task.setvariable variable=VSCODE_CLI_PRODUCT_JSON]$(Build.SourcesDirectory)/product.json"
displayName: Set product.json path
- ${{ else }}:
- pwsh: Write-Host "##vso[task.setvariable variable=VSCODE_CLI_PRODUCT_JSON]$(Build.SourcesDirectory)/.build/distro/mixin/${{ parameters.VSCODE_QUALITY }}/product.json"
displayName: Set product.json path
- pwsh: Write-Host "##vso[task.setvariable variable=VSCODE_CLI_PRODUCT_JSON]$(Build.SourcesDirectory)/.build/distro/mixin/${{ parameters.VSCODE_QUALITY }}/product.json"
displayName: Set product.json path
- ${{ else }}:
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: echo "##vso[task.setvariable variable=VSCODE_CLI_PRODUCT_JSON]$(Build.SourcesDirectory)/product.json"
displayName: Set product.json path
- ${{ else }}:
- script: echo "##vso[task.setvariable variable=VSCODE_CLI_PRODUCT_JSON]$(Build.SourcesDirectory)/.build/distro/mixin/${{ parameters.VSCODE_QUALITY }}/product.json"
displayName: Set product.json path
- script: echo "##vso[task.setvariable variable=VSCODE_CLI_PRODUCT_JSON]$(Build.SourcesDirectory)/.build/distro/mixin/${{ parameters.VSCODE_QUALITY }}/product.json"
displayName: Set product.json path
- ${{ if parameters.VSCODE_CHECK_ONLY }}:
- script: cargo clippy --target ${{ parameters.VSCODE_CLI_TARGET }} --bin=code
-10
View File
@@ -1,10 +0,0 @@
steps:
- template: ./install-rust-posix.yml@self
- script: cargo clippy -- -D warnings
workingDirectory: cli
displayName: Clippy lint
- script: cargo test
workingDirectory: cli
displayName: 🧪 Run unit tests
@@ -18,8 +18,7 @@ steps:
versionFilePath: .nvmrc
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- template: ../cli/cli-apply-patches.yml@self
- template: ../cli/cli-apply-patches.yml@self
- task: Npm@1
displayName: Download openssl prebuilt
@@ -3,8 +3,6 @@ parameters:
type: boolean
- name: VSCODE_BUILD_MACOS_ARM64
type: boolean
- name: VSCODE_QUALITY
type: string
steps:
- task: NodeTool@0
@@ -13,13 +11,12 @@ steps:
versionFilePath: .nvmrc
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- 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"
- script: node build/setup-npm-registry.js $NPM_REGISTRY build
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
@@ -1,6 +1,4 @@
parameters:
- name: VSCODE_QUALITY
type: string
- name: VSCODE_RUN_ELECTRON_TESTS
type: boolean
- name: VSCODE_RUN_BROWSER_TESTS
@@ -9,9 +7,6 @@ parameters:
type: boolean
- name: VSCODE_TEST_ARTIFACT_NAME
type: string
- name: PUBLISH_TASK_NAME
type: string
default: PublishPipelineArtifact@0
steps:
- script: npm exec -- npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
@@ -20,37 +15,20 @@ steps:
displayName: Download Electron and Playwright
retryCountOnTaskFailure: 3
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: ./scripts/test.sh --tfs "Unit Tests"
displayName: 🧪 Run unit tests (Electron)
timeoutInMinutes: 15
- script: npm run test-node
displayName: 🧪 Run unit tests (node.js)
timeoutInMinutes: 15
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: ./scripts/test.sh --build --tfs "Unit Tests"
displayName: 🧪 Run unit tests (Electron)
timeoutInMinutes: 15
- script: npm run test-node -- --build
displayName: 🧪 Run unit tests (node.js)
timeoutInMinutes: 15
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: npm run test-browser-no-install -- --browser webkit --tfs "Browser Unit Tests"
env:
DEBUG: "*browser*"
displayName: 🧪 Run unit tests (Browser, Webkit)
timeoutInMinutes: 30
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: ./scripts/test.sh --build --tfs "Unit Tests"
displayName: 🧪 Run unit tests (Electron)
timeoutInMinutes: 15
- script: npm run test-node -- --build
displayName: 🧪 Run unit tests (node.js)
timeoutInMinutes: 15
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: npm run test-browser-no-install -- --build --browser webkit --tfs "Browser Unit Tests"
env:
DEBUG: "*browser*"
displayName: 🧪 Run unit tests (Browser, Webkit)
timeoutInMinutes: 30
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: npm run test-browser-no-install -- --build --browser webkit --tfs "Browser Unit Tests"
env:
DEBUG: "*browser*"
displayName: 🧪 Run unit tests (Browser, Webkit)
timeoutInMinutes: 30
- script: |
set -e
@@ -74,110 +52,79 @@ steps:
compile-extension:vscode-test-resolver
displayName: Build integration tests
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: ./scripts/test-integration.sh --tfs "Integration Tests"
displayName: 🧪 Run integration tests (Electron)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: |
# Figure out the full absolute path of the product we just built
# including the remote server and configure the integration tests
# to run with these builds instead of running out of sources.
set -e
APP_ROOT="$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)"
APP_NAME="`ls $APP_ROOT | head -n 1`"
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
./scripts/test-integration.sh --build --tfs "Integration Tests"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
displayName: 🧪 Run integration tests (Electron)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: ./scripts/test-web-integration.sh --browser webkit
displayName: 🧪 Run integration tests (Browser, Webkit)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: ./scripts/test-web-integration.sh --browser webkit
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web
displayName: 🧪 Run integration tests (Browser, Webkit)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- script: ./scripts/test-remote-integration.sh
displayName: 🧪 Run integration tests (Remote)
timeoutInMinutes: 20
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: |
# Figure out the full absolute path of the product we just built
# including the remote server and configure the integration tests
# to run with these builds instead of running out of sources.
set -e
APP_ROOT="$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)"
APP_NAME="`ls $APP_ROOT | head -n 1`"
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
./scripts/test-integration.sh --build --tfs "Integration Tests"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
displayName: 🧪 Run integration tests (Electron)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: ./scripts/test-web-integration.sh --browser webkit
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web
displayName: 🧪 Run integration tests (Browser, Webkit)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
./scripts/test-remote-integration.sh
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
displayName: 🧪 Run integration tests (Remote)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
./scripts/test-remote-integration.sh
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
displayName: 🧪 Run integration tests (Remote)
timeoutInMinutes: 20
- script: ps -ef
displayName: Diagnostics before smoke test run
continueOnError: true
condition: succeededOrFailed()
# - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
# - script: npm run compile
# workingDirectory: test/smoke
# displayName: Compile smoke tests
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
npm run smoketest-no-compile -- --tracing --build "$APP_ROOT/$APP_NAME"
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Electron)
# - script: npm run gulp compile-extension-media
# displayName: Compile extensions for smoke tests
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: npm run smoketest-no-compile -- --web --tracing --headless
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Browser, Chromium)
# - ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
# - script: npm run smoketest-no-compile -- --tracing
# timeoutInMinutes: 20
# displayName: 🧪 Run smoke tests (Electron)
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
npm run smoketest-no-compile -- --tracing --build "$APP_ROOT/$APP_NAME"
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Electron)
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: npm run smoketest-no-compile -- --web --tracing --headless
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Browser, Chromium)
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- script: |
set -e
npm run gulp compile-extension:vscode-test-resolver
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
npm run smoketest-no-compile -- --tracing --remote --build "$APP_ROOT/$APP_NAME"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Remote)
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- script: |
set -e
npm run gulp compile-extension:vscode-test-resolver
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
npm run smoketest-no-compile -- --tracing --remote --build "$APP_ROOT/$APP_NAME"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Remote)
- script: ps -ef
displayName: Diagnostics after smoke test run
continueOnError: true
condition: succeededOrFailed()
- task: ${{ parameters.PUBLISH_TASK_NAME }}
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: .build/crashes
${{ if eq(parameters.VSCODE_TEST_ARTIFACT_NAME, '') }}:
@@ -191,7 +138,7 @@ steps:
# In order to properly symbolify above crash reports
# (if any), we need the compiled native modules too
- task: ${{ parameters.PUBLISH_TASK_NAME }}
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: node_modules
${{ if eq(parameters.VSCODE_TEST_ARTIFACT_NAME, '') }}:
@@ -203,7 +150,7 @@ steps:
continueOnError: true
condition: failed()
- task: ${{ parameters.PUBLISH_TASK_NAME }}
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: .build/logs
${{ if eq(parameters.VSCODE_TEST_ARTIFACT_NAME, '') }}:
@@ -1,8 +1,6 @@
parameters:
- name: VSCODE_ARCH
type: string
- name: VSCODE_QUALITY
type: string
- name: VSCODE_CIBUILD
type: boolean
- name: VSCODE_RUN_ELECTRON_TESTS
@@ -19,35 +17,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,macos-developer-certificate,macos-developer-certificate-key"
- task: AzureKeyVault@2
displayName: "Azure Key Vault: Get Secrets"
inputs:
azureSubscription: vscode
KeyVaultName: vscode-build-secrets
SecretsFilter: "github-distro-mixin-password,macos-developer-certificate,macos-developer-certificate-key"
- 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: node build/setup-npm-registry.js $NPM_REGISTRY
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
@@ -110,10 +102,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
@@ -123,57 +114,49 @@ 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 and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'oss')) }}:
- ${{ if ne(parameters.VSCODE_CIBUILD, true) }}:
- script: node build/lib/policies darwin
displayName: Generate policy definitions
retryCountOnTaskFailure: 3
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
npm run gulp vscode-darwin-$(VSCODE_ARCH)-min-ci
echo "##vso[task.setvariable variable=BUILT_CLIENT]true"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build client
- script: |
set -e
npm run gulp vscode-darwin-$(VSCODE_ARCH)-min-ci
echo "##vso[task.setvariable variable=BUILT_CLIENT]true"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build client
- script: |
set -e
npm run gulp vscode-reh-darwin-$(VSCODE_ARCH)-min-ci
mv ../vscode-reh-darwin-$(VSCODE_ARCH) ../vscode-server-darwin-$(VSCODE_ARCH) # TODO@joaomoreno
ARCHIVE_PATH=".build/darwin/server/vscode-server-darwin-$(VSCODE_ARCH).zip"
mkdir -p $(dirname $ARCHIVE_PATH)
(cd .. && zip -Xry $(Build.SourcesDirectory)/$ARCHIVE_PATH vscode-server-darwin-$(VSCODE_ARCH))
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server
- script: |
set -e
npm run gulp vscode-reh-darwin-$(VSCODE_ARCH)-min-ci
mv ../vscode-reh-darwin-$(VSCODE_ARCH) ../vscode-server-darwin-$(VSCODE_ARCH) # TODO@joaomoreno
ARCHIVE_PATH=".build/darwin/server/vscode-server-darwin-$(VSCODE_ARCH).zip"
mkdir -p $(dirname $ARCHIVE_PATH)
(cd .. && zip -Xry $(Build.SourcesDirectory)/$ARCHIVE_PATH vscode-server-darwin-$(VSCODE_ARCH))
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server
- script: |
set -e
npm run gulp vscode-reh-web-darwin-$(VSCODE_ARCH)-min-ci
mv ../vscode-reh-web-darwin-$(VSCODE_ARCH) ../vscode-server-darwin-$(VSCODE_ARCH)-web # TODO@joaomoreno
ARCHIVE_PATH=".build/darwin/server/vscode-server-darwin-$(VSCODE_ARCH)-web.zip"
mkdir -p $(dirname $ARCHIVE_PATH)
(cd .. && zip -Xry $(Build.SourcesDirectory)/$ARCHIVE_PATH vscode-server-darwin-$(VSCODE_ARCH)-web)
echo "##vso[task.setvariable variable=WEB_PATH]$ARCHIVE_PATH"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server (web)
- script: |
set -e
npm run gulp vscode-reh-web-darwin-$(VSCODE_ARCH)-min-ci
mv ../vscode-reh-web-darwin-$(VSCODE_ARCH) ../vscode-server-darwin-$(VSCODE_ARCH)-web # TODO@joaomoreno
ARCHIVE_PATH=".build/darwin/server/vscode-server-darwin-$(VSCODE_ARCH)-web.zip"
mkdir -p $(dirname $ARCHIVE_PATH)
(cd .. && zip -Xry $(Build.SourcesDirectory)/$ARCHIVE_PATH vscode-server-darwin-$(VSCODE_ARCH)-web)
echo "##vso[task.setvariable variable=WEB_PATH]$ARCHIVE_PATH"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server (web)
- ${{ else }}:
- script: npm run gulp transpile-client-esbuild transpile-extensions
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Transpile
- ${{ if and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'oss')) }}:
- ${{ if ne(parameters.VSCODE_CIBUILD, true) }}:
- task: DownloadPipelineArtifact@2
inputs:
artifact: unsigned_vscode_cli_darwin_$(VSCODE_ARCH)_cli
@@ -285,15 +268,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-darwin-test.yml@self
parameters:
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
VSCODE_TEST_ARTIFACT_NAME: ${{ parameters.VSCODE_TEST_ARTIFACT_NAME }}
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 }}
${{ 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/darwin/codesign.js
condition: succeededOrFailed()
displayName: "Post-job: ✍️ Codesign & Notarize"
+18 -20
View File
@@ -21,8 +21,7 @@ steps:
versionFilePath: .nvmrc
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- template: ../cli/cli-apply-patches.yml@self
- template: ../cli/cli-apply-patches.yml@self
- task: Npm@1
displayName: Download openssl prebuilt
@@ -39,26 +38,25 @@ steps:
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.11.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
displayName: Extract openssl prebuilt
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: node build/setup-npm-registry.js $NPM_REGISTRY build
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- script: node build/setup-npm-registry.js $NPM_REGISTRY build
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- script: |
set -e
# Set the private NPM registry to the global npmrc file
# so that authentication works for subfolders like build/, remote/, extensions/ etc
# which does not have their own .npmrc file
npm config set registry "$NPM_REGISTRY"
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM
- script: |
set -e
# Set the private NPM registry to the global npmrc file
# so that authentication works for subfolders like build/, remote/, extensions/ etc
# which does not have their own .npmrc file
npm config set registry "$NPM_REGISTRY"
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM
- task: npmAuthenticate@0
inputs:
workingFile: $(NPMRC_PATH)
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Authentication
- task: npmAuthenticate@0
inputs:
workingFile: $(NPMRC_PATH)
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Authentication
- script: |
set -e
@@ -1,6 +1,4 @@
parameters:
- name: VSCODE_QUALITY
type: string
- name: VSCODE_RUN_ELECTRON_TESTS
type: boolean
- name: VSCODE_RUN_BROWSER_TESTS
@@ -9,9 +7,6 @@ parameters:
type: boolean
- name: VSCODE_TEST_ARTIFACT_NAME
type: string
- name: PUBLISH_TASK_NAME
type: string
default: PublishPipelineArtifact@0
steps:
- script: npm exec -- npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
@@ -20,52 +15,32 @@ steps:
displayName: Download Electron and Playwright
retryCountOnTaskFailure: 3
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
ELECTRON_ROOT=.build/electron
sudo chown root $APP_ROOT/chrome-sandbox
sudo chown root $ELECTRON_ROOT/chrome-sandbox
sudo chmod 4755 $APP_ROOT/chrome-sandbox
sudo chmod 4755 $ELECTRON_ROOT/chrome-sandbox
stat $APP_ROOT/chrome-sandbox
stat $ELECTRON_ROOT/chrome-sandbox
displayName: Change setuid helper binary permission
- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
ELECTRON_ROOT=.build/electron
sudo chown root $APP_ROOT/chrome-sandbox
sudo chown root $ELECTRON_ROOT/chrome-sandbox
sudo chmod 4755 $APP_ROOT/chrome-sandbox
sudo chmod 4755 $ELECTRON_ROOT/chrome-sandbox
stat $APP_ROOT/chrome-sandbox
stat $ELECTRON_ROOT/chrome-sandbox
displayName: Change setuid helper binary permission
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: ./scripts/test.sh --tfs "Unit Tests"
env:
DISPLAY: ":10"
displayName: 🧪 Run unit tests (Electron)
timeoutInMinutes: 15
- script: npm run test-node
displayName: 🧪 Run unit tests (node.js)
timeoutInMinutes: 15
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: ./scripts/test.sh --build --tfs "Unit Tests"
displayName: 🧪 Run unit tests (Electron)
timeoutInMinutes: 15
- script: npm run test-node -- --build
displayName: 🧪 Run unit tests (node.js)
timeoutInMinutes: 15
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: npm run test-browser-no-install -- --browser chromium --tfs "Browser Unit Tests"
env:
DEBUG: "*browser*"
displayName: 🧪 Run unit tests (Browser, Chromium)
timeoutInMinutes: 15
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: ./scripts/test.sh --build --tfs "Unit Tests"
displayName: 🧪 Run unit tests (Electron)
timeoutInMinutes: 15
- script: npm run test-node -- --build
displayName: 🧪 Run unit tests (node.js)
timeoutInMinutes: 15
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: npm run test-browser-no-install -- --build --browser chromium --tfs "Browser Unit Tests"
env:
DEBUG: "*browser*"
displayName: 🧪 Run unit tests (Browser, Chromium)
timeoutInMinutes: 15
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: npm run test-browser-no-install -- --build --browser chromium --tfs "Browser Unit Tests"
env:
DEBUG: "*browser*"
displayName: 🧪 Run unit tests (Browser, Chromium)
timeoutInMinutes: 15
- script: |
set -e
@@ -89,60 +64,41 @@ steps:
compile-extension:vscode-test-resolver
displayName: Build integration tests
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: ./scripts/test-integration.sh --tfs "Integration Tests"
env:
DISPLAY: ":10"
displayName: 🧪 Run integration tests (Electron)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: |
# Figure out the full absolute path of the product we just built
# including the remote server and configure the integration tests
# to run with these builds instead of running out of sources.
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
./scripts/test-integration.sh --build --tfs "Integration Tests"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
displayName: 🧪 Run integration tests (Electron)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: ./scripts/test-web-integration.sh --browser chromium
displayName: 🧪 Run integration tests (Browser, Chromium)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: ./scripts/test-web-integration.sh --browser chromium
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
displayName: 🧪 Run integration tests (Browser, Chromium)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- script: ./scripts/test-remote-integration.sh
displayName: 🧪 Run integration tests (Remote)
timeoutInMinutes: 20
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: |
# Figure out the full absolute path of the product we just built
# including the remote server and configure the integration tests
# to run with these builds instead of running out of sources.
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
./scripts/test-integration.sh --build --tfs "Integration Tests"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
displayName: 🧪 Run integration tests (Electron)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: ./scripts/test-web-integration.sh --browser chromium
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
displayName: 🧪 Run integration tests (Browser, Chromium)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
./scripts/test-remote-integration.sh
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
displayName: 🧪 Run integration tests (Remote)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
./scripts/test-remote-integration.sh
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
displayName: 🧪 Run integration tests (Remote)
timeoutInMinutes: 20
- script: |
set -e
@@ -153,51 +109,26 @@ steps:
continueOnError: true
condition: succeededOrFailed()
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: npm run compile
workingDirectory: test/smoke
displayName: Compile smoke tests
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: npm run smoketest-no-compile -- --tracing --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Electron)
- script: npm run gulp node
displayName: Download node.js for remote smoke tests
retryCountOnTaskFailure: 3
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: npm run smoketest-no-compile -- --web --tracing --headless
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Browser, Chromium)
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: npm run smoketest-no-compile -- --tracing
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Electron)
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: npm run smoketest-no-compile -- --web --tracing --headless
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Browser, Chromium)
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- script: npm run smoketest-no-compile -- --remote --tracing
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Remote)
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- script: npm run smoketest-no-compile -- --tracing --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Electron)
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- script: npm run smoketest-no-compile -- --web --tracing --headless
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Browser, Chromium)
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- script: |
set -e
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)" \
npm run smoketest-no-compile -- --tracing --remote --build "$APP_PATH"
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Remote)
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- script: |
set -e
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)" \
npm run smoketest-no-compile -- --tracing --remote --build "$APP_PATH"
timeoutInMinutes: 20
displayName: 🧪 Run smoke tests (Remote)
- script: |
set -e
@@ -208,7 +139,7 @@ steps:
continueOnError: true
condition: succeededOrFailed()
- task: ${{ parameters.PUBLISH_TASK_NAME }}
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: .build/crashes
${{ if eq(parameters.VSCODE_TEST_ARTIFACT_NAME, '') }}:
@@ -222,7 +153,7 @@ steps:
# In order to properly symbolify above crash reports
# (if any), we need the compiled native modules too
- task: ${{ parameters.PUBLISH_TASK_NAME }}
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: node_modules
${{ if eq(parameters.VSCODE_TEST_ARTIFACT_NAME, '') }}:
@@ -234,7 +165,7 @@ steps:
continueOnError: true
condition: failed()
- task: ${{ parameters.PUBLISH_TASK_NAME }}
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: .build/logs
${{ if eq(parameters.VSCODE_TEST_ARTIFACT_NAME, '') }}:
@@ -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"
@@ -1,79 +0,0 @@
steps:
- checkout: self
fetchDepth: 1
retryCountOnTaskFailure: 3
- task: NodeTool@0
inputs:
versionSource: fromFile
versionFilePath: .nvmrc
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
- script: node build/setup-npm-registry.js $NPM_REGISTRY
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js darwin $VSCODE_ARCH $(node -p process.arch) > .build/packagelockhash
displayName: Prepare node_modules cache key
- task: Cache@2
inputs:
key: '"node_modules" | .build/packagelockhash'
path: .build/node_modules_cache
cacheHitVar: NODE_MODULES_RESTORED
displayName: Restore node_modules cache
- script: tar -xzf .build/node_modules_cache/cache.tgz
condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Extract node_modules cache
- script: |
set -e
# Set the private NPM registry to the global npmrc file
# so that authentication works for subfolders like build/, remote/, extensions/ etc
# which does not have their own .npmrc file
npm config set registry "$NPM_REGISTRY"
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM
- task: npmAuthenticate@0
inputs:
workingFile: $(NPMRC_PATH)
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Authentication
- script: |
set -e
c++ --version
xcode-select -print-path
python3 -m pip install setuptools
for i in {1..5}; do # try 5 times
npm ci && break
if [ $i -eq 5 ]; then
echo "Npm install failed too many times" >&2
exit 1
fi
echo "Npm install failed $i, trying again..."
done
env:
npm_config_arch: $(VSCODE_ARCH)
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
# Avoid using dlopen to load Kerberos on macOS which can cause missing libraries
# https://github.com/mongodb-js/kerberos/commit/04044d2814ad1d01e77f1ce87f26b03d86692cf2
# flipped the default to support legacy linux distros which shouldn't happen
# on macOS.
GYP_DEFINES: "kerberos_use_rtld=false"
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
- script: |
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
mkdir -p .build/node_modules_cache
tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Create node_modules archive
@@ -1,76 +0,0 @@
steps:
- checkout: self
fetchDepth: 1
retryCountOnTaskFailure: 3
- task: NodeTool@0
inputs:
versionSource: fromFile
versionFilePath: .nvmrc
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
- script: node build/setup-npm-registry.js $NPM_REGISTRY
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js linux $VSCODE_ARCH $(node -p process.arch) > .build/packagelockhash
displayName: Prepare node_modules cache key
- task: Cache@2
inputs:
key: '"node_modules" | .build/packagelockhash'
path: .build/node_modules_cache
cacheHitVar: NODE_MODULES_RESTORED
displayName: Restore node_modules cache
- script: tar -xzf .build/node_modules_cache/cache.tgz
condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Extract node_modules cache
- script: |
set -e
# Set the private NPM registry to the global npmrc file
# so that authentication works for subfolders like build/, remote/, extensions/ etc
# which does not have their own .npmrc file
npm config set registry "$NPM_REGISTRY"
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM
- task: npmAuthenticate@0
inputs:
workingFile: $(NPMRC_PATH)
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Authentication
- script: |
set -e
./build/azure-pipelines/linux/apt-retry.sh sudo apt-get update
./build/azure-pipelines/linux/apt-retry.sh sudo apt-get install -y libkrb5-dev
displayName: Setup system services
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
- script: |
set -e
for i in {1..5}; do # try 5 times
npm ci && break
if [ $i -eq 5 ]; then
echo "Npm install failed too many times" >&2
exit 1
fi
echo "Npm install failed $i, trying again..."
done
env:
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
- script: |
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
mkdir -p .build/node_modules_cache
tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Create node_modules archive
@@ -1,71 +0,0 @@
steps:
- checkout: self
fetchDepth: 1
retryCountOnTaskFailure: 3
- task: NodeTool@0
inputs:
versionSource: fromFile
versionFilePath: .nvmrc
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
- powershell: node build/setup-npm-registry.js $env:NPM_REGISTRY
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- pwsh: |
mkdir .build -ea 0
node build/azure-pipelines/common/computeNodeModulesCacheKey.js win32 $(VSCODE_ARCH) $(node -p process.arch) > .build/packagelockhash
displayName: Prepare node_modules cache key
- task: Cache@2
inputs:
key: '"node_modules" | .build/packagelockhash'
path: .build/node_modules_cache
cacheHitVar: NODE_MODULES_RESTORED
displayName: Restore node_modules cache
- powershell: 7z.exe x .build/node_modules_cache/cache.7z -aoa
condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Extract node_modules cache
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
# Set the private NPM registry to the global npmrc file
# so that authentication works for subfolders like build/, remote/, extensions/ etc
# which does not have their own .npmrc file
exec { npm config set registry "$env:NPM_REGISTRY" }
$NpmrcPath = (npm config get userconfig)
echo "##vso[task.setvariable variable=NPMRC_PATH]$NpmrcPath"
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM
- task: npmAuthenticate@0
inputs:
workingFile: $(NPMRC_PATH)
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Authentication
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { npm ci }
env:
npm_config_arch: $(VSCODE_ARCH)
npm_config_foreground_scripts: "true"
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
retryCountOnTaskFailure: 5
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt }
exec { mkdir -Force .build/node_modules_cache }
exec { 7z.exe a .build/node_modules_cache/cache.7z -mx3 `@.build/node_modules_list.txt }
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Create node_modules archive
@@ -81,8 +81,6 @@ extends:
os: macOS
steps:
- template: build/azure-pipelines/product-compile.yml@self
parameters:
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
- stage: macOS
dependsOn:
@@ -102,7 +100,6 @@ extends:
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
parameters:
VSCODE_ARCH: arm64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: electron
VSCODE_RUN_ELECTRON_TESTS: true
@@ -116,7 +113,6 @@ extends:
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
parameters:
VSCODE_ARCH: arm64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: browser
VSCODE_RUN_BROWSER_TESTS: true
@@ -130,7 +126,6 @@ extends:
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
parameters:
VSCODE_ARCH: arm64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: remote
VSCODE_RUN_REMOTE_TESTS: true
-231
View File
@@ -1,231 +0,0 @@
trigger:
- release/*
pr:
branches:
include: ["release/*"]
variables:
- name: Codeql.SkipTaskAutoInjection
value: true
- name: skipComponentGovernanceDetection
value: true
- name: NPM_REGISTRY
value: "none"
- name: CARGO_REGISTRY
value: "none"
- name: VSCODE_CIBUILD
value: ${{ in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI') }}
- name: VSCODE_QUALITY
value: oss
- name: VSCODE_STEP_ON_IT
value: false
stages:
- ${{ if ne(variables['VSCODE_CIBUILD'], true) }}:
- stage: Compile
displayName: Compile & Hygiene
dependsOn: []
jobs:
- job: Compile
displayName: Compile & Hygiene
pool: 1es-oss-ubuntu-22.04-x64
timeoutInMinutes: 30
variables:
VSCODE_ARCH: x64
steps:
- template: product-compile.yml@self
parameters:
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
- stage: Test
displayName: Test
dependsOn: []
jobs:
- job: Linuxx64ElectronTest
displayName: Linux (Electron)
pool: 1es-oss-ubuntu-22.04-x64
timeoutInMinutes: 30
variables:
VSCODE_ARCH: x64
NPM_ARCH: x64
DISPLAY: ":10"
steps:
- template: linux/product-build-linux.yml@self
parameters:
VSCODE_ARCH: x64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: electron
VSCODE_RUN_ELECTRON_TESTS: true
- job: Linuxx64BrowserTest
displayName: Linux (Browser)
pool: 1es-oss-ubuntu-22.04-x64
timeoutInMinutes: 30
variables:
VSCODE_ARCH: x64
NPM_ARCH: x64
DISPLAY: ":10"
steps:
- template: linux/product-build-linux.yml@self
parameters:
VSCODE_ARCH: x64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: browser
VSCODE_RUN_BROWSER_TESTS: true
- job: Linuxx64RemoteTest
displayName: Linux (Remote)
pool: 1es-oss-ubuntu-22.04-x64
timeoutInMinutes: 30
variables:
VSCODE_ARCH: x64
NPM_ARCH: x64
DISPLAY: ":10"
steps:
- template: linux/product-build-linux.yml@self
parameters:
VSCODE_ARCH: x64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: remote
VSCODE_RUN_REMOTE_TESTS: true
- job: LinuxCLI
displayName: Linux (CLI)
pool: 1es-oss-ubuntu-22.04-x64
timeoutInMinutes: 30
steps:
- template: cli/test.yml@self
- job: Windowsx64ElectronTests
displayName: Windows (Electron)
pool: 1es-oss-windows-2022-x64
timeoutInMinutes: 30
variables:
VSCODE_ARCH: x64
NPM_ARCH: x64
steps:
- template: win32/product-build-win32.yml@self
parameters:
VSCODE_ARCH: x64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: electron
VSCODE_RUN_ELECTRON_TESTS: true
- job: Windowsx64BrowserTests
displayName: Windows (Browser)
pool: 1es-oss-windows-2022-x64
timeoutInMinutes: 60
variables:
VSCODE_ARCH: x64
NPM_ARCH: x64
steps:
- template: win32/product-build-win32.yml@self
parameters:
VSCODE_ARCH: x64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: browser
VSCODE_RUN_BROWSER_TESTS: true
- job: Windowsx64RemoteTests
displayName: Windows (Remote)
pool: 1es-oss-windows-2022-x64
timeoutInMinutes: 60
variables:
VSCODE_ARCH: x64
NPM_ARCH: x64
steps:
- template: win32/product-build-win32.yml@self
parameters:
VSCODE_ARCH: x64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: remote
VSCODE_RUN_REMOTE_TESTS: true
- job: macOSx64ElectronTests
displayName: macOS (Electron)
pool:
vmImage: macOS-14
timeoutInMinutes: 30
variables:
VSCODE_ARCH: x64
NPM_ARCH: x64
steps:
- template: darwin/product-build-darwin.yml@self
parameters:
VSCODE_ARCH: x64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: electron
VSCODE_RUN_ELECTRON_TESTS: true
- job: macOSx64BrowserTests
displayName: macOS (Browser)
pool:
vmImage: macOS-14
timeoutInMinutes: 30
variables:
VSCODE_ARCH: x64
NPM_ARCH: x64
steps:
- template: darwin/product-build-darwin.yml@self
parameters:
VSCODE_ARCH: x64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: browser
VSCODE_RUN_BROWSER_TESTS: true
- job: macOSx64RemoteTests
displayName: macOS (Remote)
pool:
vmImage: macOS-14
timeoutInMinutes: 30
variables:
VSCODE_ARCH: x64
NPM_ARCH: x64
steps:
- template: darwin/product-build-darwin.yml@self
parameters:
VSCODE_ARCH: x64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: remote
VSCODE_RUN_REMOTE_TESTS: true
- ${{ if eq(variables['VSCODE_CIBUILD'], true) }}:
- stage: NodeModuleCache
jobs:
- job: Linuxx64MaintainNodeModulesCache
displayName: Linux (Maintain node_modules cache)
pool: 1es-oss-ubuntu-22.04-x64
timeoutInMinutes: 30
variables:
VSCODE_ARCH: x64
steps:
- template: oss/product-build-pr-cache-linux.yml@self
- job: Windowsx64MaintainNodeModulesCache
displayName: Windows (Maintain node_modules cache)
pool: 1es-oss-windows-2022-x64
timeoutInMinutes: 30
variables:
VSCODE_ARCH: x64
steps:
- template: oss/product-build-pr-cache-win32.yml@self
- job: macOSx64MaintainNodeModulesCache
displayName: macOS (Maintain node_modules cache)
pool:
vmImage: macOS-14
timeoutInMinutes: 30
variables:
VSCODE_ARCH: x64
steps:
- template: oss/product-build-pr-cache-darwin.yml@self
-9
View File
@@ -197,8 +197,6 @@ extends:
os: macOS
steps:
- template: build/azure-pipelines/product-compile.yml@self
parameters:
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
- ${{ if or(eq(parameters.VSCODE_BUILD_LINUX, true),eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true),eq(parameters.VSCODE_BUILD_LINUX_ARM64, true),eq(parameters.VSCODE_BUILD_ALPINE, true),eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true),eq(parameters.VSCODE_BUILD_MACOS, true),eq(parameters.VSCODE_BUILD_MACOS_ARM64, true),eq(parameters.VSCODE_BUILD_WIN32, true),eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }}:
- stage: CompileCLI
@@ -405,7 +403,6 @@ extends:
steps:
- template: build/azure-pipelines/win32/product-build-win32-cli-sign.yml@self
parameters:
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_BUILD_WIN32: ${{ parameters.VSCODE_BUILD_WIN32 }}
VSCODE_BUILD_WIN32_ARM64: ${{ parameters.VSCODE_BUILD_WIN32_ARM64 }}
@@ -572,7 +569,6 @@ extends:
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
parameters:
VSCODE_ARCH: arm64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: electron
VSCODE_RUN_ELECTRON_TESTS: true
@@ -585,7 +581,6 @@ extends:
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
parameters:
VSCODE_ARCH: arm64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: browser
VSCODE_RUN_BROWSER_TESTS: true
@@ -598,7 +593,6 @@ extends:
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
parameters:
VSCODE_ARCH: arm64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_TEST_ARTIFACT_NAME: remote
VSCODE_RUN_REMOTE_TESTS: true
@@ -613,7 +607,6 @@ extends:
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
parameters:
VSCODE_ARCH: x64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
- job: macOSCLI
@@ -621,7 +614,6 @@ extends:
steps:
- template: build/azure-pipelines/darwin/product-build-darwin-cli-sign.yml@self
parameters:
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_BUILD_MACOS: ${{ parameters.VSCODE_BUILD_MACOS }}
VSCODE_BUILD_MACOS_ARM64: ${{ parameters.VSCODE_BUILD_MACOS_ARM64 }}
@@ -635,7 +627,6 @@ extends:
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
parameters:
VSCODE_ARCH: arm64
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
VSCODE_RUN_ELECTRON_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
VSCODE_RUN_BROWSER_TESTS: ${{ eq(parameters.VSCODE_STEP_ON_IT, false) }}
+67 -94
View File
@@ -1,7 +1,3 @@
parameters:
- name: VSCODE_QUALITY
type: string
steps:
- task: NodeTool@0
inputs:
@@ -9,15 +5,14 @@ steps:
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"
- script: node build/setup-npm-registry.js $NPM_REGISTRY
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
@@ -53,11 +48,6 @@ steps:
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Authentication
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: sudo apt update -y && sudo apt install -y build-essential pkg-config libx11-dev libx11-xcb-dev libxkbfile-dev libnotify-bin libkrb5-dev
displayName: Install build tools
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
- script: |
set -e
@@ -76,10 +66,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
@@ -89,88 +78,72 @@ steps:
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Create node_modules archive
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: npm run compile
workingDirectory: build
displayName: Compile /build/ folder
- script: .github/workflows/check-clean-git-state.sh
displayName: Check /build/ folder
- ${{ 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 eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: npm exec -- npm-run-all -lp core-ci-pr extensions-ci-pr hygiene eslint valid-layers-check define-class-fields-check vscode-dts-compile-check tsec-compile-check
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Compile & Hygiene (OSS)
- ${{ else }}:
- script: npm exec -- npm-run-all -lp core-ci extensions-ci hygiene eslint valid-layers-check define-class-fields-check vscode-dts-compile-check tsec-compile-check
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Compile & Hygiene (non-OSS)
- script: npm exec -- npm-run-all -lp core-ci extensions-ci hygiene eslint valid-layers-check define-class-fields-check vscode-dts-compile-check tsec-compile-check
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Compile & Hygiene
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
npm run compile
displayName: Compile smoke test suites (non-OSS)
workingDirectory: test/smoke
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
- script: |
set -e
npm run compile
displayName: Compile smoke test suites (non-OSS)
workingDirectory: test/smoke
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
- script: |
set -e
npm run compile
displayName: Compile integration test suites (non-OSS)
workingDirectory: test/integration/browser
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
- script: |
set -e
npm run compile
displayName: Compile integration test suites (non-OSS)
workingDirectory: test/integration/browser
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
- task: AzureCLI@2
displayName: Fetch secrets
inputs:
azureSubscription: vscode
scriptType: pscore
scriptLocation: inlineScript
addSpnToEnvironment: true
inlineScript: |
Write-Host "##vso[task.setvariable variable=AZURE_TENANT_ID]$env:tenantId"
Write-Host "##vso[task.setvariable variable=AZURE_CLIENT_ID]$env:servicePrincipalId"
Write-Host "##vso[task.setvariable variable=AZURE_ID_TOKEN;issecret=true]$env:idToken"
- task: AzureCLI@2
displayName: Fetch secrets
inputs:
azureSubscription: vscode
scriptType: pscore
scriptLocation: inlineScript
addSpnToEnvironment: true
inlineScript: |
Write-Host "##vso[task.setvariable variable=AZURE_TENANT_ID]$env:tenantId"
Write-Host "##vso[task.setvariable variable=AZURE_CLIENT_ID]$env:servicePrincipalId"
Write-Host "##vso[task.setvariable variable=AZURE_ID_TOKEN;issecret=true]$env:idToken"
- script: |
set -e
AZURE_STORAGE_ACCOUNT="vscodeweb" \
AZURE_TENANT_ID="$(AZURE_TENANT_ID)" \
AZURE_CLIENT_ID="$(AZURE_CLIENT_ID)" \
AZURE_ID_TOKEN="$(AZURE_ID_TOKEN)" \
node build/azure-pipelines/upload-sourcemaps
displayName: Upload sourcemaps to Azure
- script: |
set -e
AZURE_STORAGE_ACCOUNT="vscodeweb" \
AZURE_TENANT_ID="$(AZURE_TENANT_ID)" \
AZURE_CLIENT_ID="$(AZURE_CLIENT_ID)" \
AZURE_ID_TOKEN="$(AZURE_ID_TOKEN)" \
node build/azure-pipelines/upload-sourcemaps
displayName: Upload sourcemaps to Azure
- script: ./build/azure-pipelines/common/extract-telemetry.sh
displayName: Generate lists of telemetry events
- script: ./build/azure-pipelines/common/extract-telemetry.sh
displayName: Generate lists of telemetry events
- script: tar -cz --exclude='.build/node_modules_cache' --exclude='.build/node_modules_list.txt' --exclude='.build/distro' -f $(Build.ArtifactStagingDirectory)/compilation.tar.gz $(ls -d .build out-* test/integration/browser/out test/smoke/out test/automation/out 2>/dev/null)
displayName: Compress compilation artifact
- script: tar -cz --exclude='.build/node_modules_cache' --exclude='.build/node_modules_list.txt' --exclude='.build/distro' -f $(Build.ArtifactStagingDirectory)/compilation.tar.gz $(ls -d .build out-* test/integration/browser/out test/smoke/out test/automation/out 2>/dev/null)
displayName: Compress compilation artifact
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(Build.ArtifactStagingDirectory)/compilation.tar.gz
artifactName: Compilation
sbomEnabled: false
displayName: Publish compilation artifact
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(Build.ArtifactStagingDirectory)/compilation.tar.gz
artifactName: Compilation
sbomEnabled: false
displayName: Publish compilation artifact
- script: npm run download-builtin-extensions-cg
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Download component details of built-in extensions
- script: npm run download-builtin-extensions-cg
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Download component details of built-in extensions
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: "Component Detection"
inputs:
sourceScanPath: $(Build.SourcesDirectory)
alertWarningLevel: Medium
continueOnError: true
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: "Component Detection"
inputs:
sourceScanPath: $(Build.SourcesDirectory)
alertWarningLevel: Medium
continueOnError: true
@@ -18,8 +18,7 @@ steps:
versionFilePath: .nvmrc
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- template: ../cli/cli-apply-patches.yml@self
- template: ../cli/cli-apply-patches.yml@self
- task: Npm@1
displayName: Download openssl prebuilt
@@ -3,8 +3,6 @@ parameters:
type: boolean
- name: VSCODE_BUILD_WIN32_ARM64
type: boolean
- name: VSCODE_QUALITY
type: string
steps:
- task: NodeTool@0
@@ -14,13 +12,12 @@ steps:
versionFilePath: .nvmrc
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- 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"
- powershell: node build/setup-npm-registry.js $env:NPM_REGISTRY build
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
@@ -1,6 +1,4 @@
parameters:
- name: VSCODE_QUALITY
type: string
- name: VSCODE_ARCH
type: string
- name: VSCODE_RUN_ELECTRON_TESTS
@@ -11,9 +9,6 @@ parameters:
type: boolean
- name: VSCODE_TEST_ARTIFACT_NAME
type: string
- name: PUBLISH_TASK_NAME
type: string
default: PublishPipelineArtifact@0
steps:
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
@@ -23,35 +18,20 @@ steps:
displayName: Download Electron and Playwright
retryCountOnTaskFailure: 3
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- powershell: .\scripts\test.bat --tfs "Unit Tests"
displayName: 🧪 Run unit tests (Electron)
timeoutInMinutes: 15
- powershell: npm run test-node
displayName: 🧪 Run unit tests (node.js)
timeoutInMinutes: 15
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- powershell: .\scripts\test.bat --build --tfs "Unit Tests"
displayName: 🧪 Run unit tests (Electron)
timeoutInMinutes: 15
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: npm run test-node -- -- --build
displayName: 🧪 Run unit tests (node.js)
timeoutInMinutes: 15
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- powershell: node test/unit/browser/index.js --browser chromium --tfs "Browser Unit Tests"
displayName: 🧪 Run unit tests (Browser, Chromium)
timeoutInMinutes: 20
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- powershell: .\scripts\test.bat --build --tfs "Unit Tests"
displayName: 🧪 Run unit tests (Electron)
timeoutInMinutes: 15
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: npm run test-node -- -- --build
displayName: 🧪 Run unit tests (node.js)
timeoutInMinutes: 15
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: npm run test-browser-no-install -- -- --build --browser chromium --tfs "Browser Unit Tests"
displayName: 🧪 Run unit tests (Browser, Chromium)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: npm run test-browser-no-install -- -- --build --browser chromium --tfs "Browser Unit Tests"
displayName: 🧪 Run unit tests (Browser, Chromium)
timeoutInMinutes: 20
- powershell: |
. build/azure-pipelines/win32/exec.ps1
@@ -82,71 +62,54 @@ steps:
continueOnError: true
condition: succeededOrFailed()
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- powershell: .\scripts\test-integration.bat --tfs "Integration Tests"
displayName: 🧪 Run integration tests (Electron)
timeoutInMinutes: 20
- powershell: |
# Copy client, server and web builds to a separate test directory, to avoid Access Denied errors in codesign
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$TestDir = "$(agent.builddirectory)\test"
New-Item -ItemType Directory -Path $TestDir -Force
Copy-Item -Path "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)" -Destination "$TestDir\VSCode-win32-$(VSCODE_ARCH)" -Recurse -Force
Copy-Item -Path "$(agent.builddirectory)\vscode-server-win32-$(VSCODE_ARCH)" -Destination "$TestDir\vscode-server-win32-$(VSCODE_ARCH)" -Recurse -Force
Copy-Item -Path "$(agent.builddirectory)\vscode-server-win32-$(VSCODE_ARCH)-web" -Destination "$TestDir\vscode-server-win32-$(VSCODE_ARCH)-web" -Recurse -Force
displayName: Copy builds to test directory
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- powershell: .\scripts\test-web-integration.bat --browser chromium
displayName: 🧪 Run integration tests (Browser, Chromium)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- powershell: .\scripts\test-remote-integration.bat
displayName: 🧪 Run integration tests (Remote)
timeoutInMinutes: 20
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- powershell: |
# Copy client, server and web builds to a separate test directory, to avoid Access Denied errors in codesign
# Figure out the full absolute path of the product we just built
# including the remote server and configure the integration tests
# to run with these builds instead of running out of sources.
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$TestDir = "$(agent.builddirectory)\test"
New-Item -ItemType Directory -Path $TestDir -Force
Copy-Item -Path "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)" -Destination "$TestDir\VSCode-win32-$(VSCODE_ARCH)" -Recurse -Force
Copy-Item -Path "$(agent.builddirectory)\vscode-server-win32-$(VSCODE_ARCH)" -Destination "$TestDir\vscode-server-win32-$(VSCODE_ARCH)" -Recurse -Force
Copy-Item -Path "$(agent.builddirectory)\vscode-server-win32-$(VSCODE_ARCH)-web" -Destination "$TestDir\vscode-server-win32-$(VSCODE_ARCH)-web" -Recurse -Force
displayName: Copy builds to test directory
$AppRoot = "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"
$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
$AppNameShort = $AppProductJson.nameShort
$env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)"
exec { .\scripts\test-integration.bat --build --tfs "Integration Tests" }
displayName: 🧪 Run integration tests (Electron)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
- powershell: |
# Figure out the full absolute path of the product we just built
# including the remote server and configure the integration tests
# to run with these builds instead of running out of sources.
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$AppRoot = "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"
$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
$AppNameShort = $AppProductJson.nameShort
$env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)"
exec { .\scripts\test-integration.bat --build --tfs "Integration Tests" }
displayName: 🧪 Run integration tests (Electron)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)-web"
exec { .\scripts\test-web-integration.bat --browser firefox }
displayName: 🧪 Run integration tests (Browser, Firefox)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)-web"
exec { .\scripts\test-web-integration.bat --browser firefox }
displayName: 🧪 Run integration tests (Browser, Firefox)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$AppRoot = "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"
$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
$AppNameShort = $AppProductJson.nameShort
$env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)"
exec { .\scripts\test-remote-integration.bat }
displayName: 🧪 Run integration tests (Remote)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$AppRoot = "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"
$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
$AppNameShort = $AppProductJson.nameShort
$env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)"
exec { .\scripts\test-remote-integration.bat }
displayName: 🧪 Run integration tests (Remote)
timeoutInMinutes: 20
- powershell: .\build\azure-pipelines\win32\listprocesses.bat
displayName: Diagnostics after integration test runs
@@ -158,49 +121,34 @@ steps:
continueOnError: true
condition: succeededOrFailed()
# - ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
# - powershell: npm run compile
# workingDirectory: test/smoke
# displayName: Compile smoke tests
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: npm run smoketest-no-compile -- -- --verbose --tracing --build "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"
displayName: 🧪 Run smoke tests (Electron)
timeoutInMinutes: 20
# - powershell: npm run gulp compile-extension-media
# displayName: Build extensions for smoke tests
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: npm run smoketest-no-compile -- -- --web --tracing --headless
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)-web
displayName: 🧪 Run smoke tests (Browser, Chromium)
timeoutInMinutes: 20
# - ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
# # Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
# - powershell: npm run smoketest-no-compile -- -- --tracing
# displayName: 🧪 Run smoke tests (Electron)
# timeoutInMinutes: 20
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- ${{ if eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true) }}:
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: npm run smoketest-no-compile -- -- --verbose --tracing --build "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"
displayName: 🧪 Run smoke tests (Electron)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_BROWSER_TESTS, true) }}:
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: npm run smoketest-no-compile -- -- --web --tracing --headless
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)-web
displayName: 🧪 Run smoke tests (Browser, Chromium)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: npm run smoketest-no-compile -- -- --tracing --remote --build "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)
displayName: 🧪 Run smoke tests (Remote)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_REMOTE_TESTS, true) }}:
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: npm run smoketest-no-compile -- -- --tracing --remote --build "$(agent.builddirectory)\test\VSCode-win32-$(VSCODE_ARCH)"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)\test\vscode-server-win32-$(VSCODE_ARCH)
displayName: 🧪 Run smoke tests (Remote)
timeoutInMinutes: 20
- powershell: .\build\azure-pipelines\win32\listprocesses.bat
displayName: Diagnostics after smoke test run
continueOnError: true
condition: succeededOrFailed()
- task: ${{ parameters.PUBLISH_TASK_NAME }}
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: .build\crashes
${{ if eq(parameters.VSCODE_TEST_ARTIFACT_NAME, '') }}:
@@ -214,7 +162,7 @@ steps:
# In order to properly symbolify above crash reports
# (if any), we need the compiled native modules too
- task: ${{ parameters.PUBLISH_TASK_NAME }}
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: node_modules
${{ if eq(parameters.VSCODE_TEST_ARTIFACT_NAME, '') }}:
@@ -226,7 +174,7 @@ steps:
continueOnError: true
condition: failed()
- task: ${{ parameters.PUBLISH_TASK_NAME }}
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: .build\logs
${{ if eq(parameters.VSCODE_TEST_ARTIFACT_NAME, '') }}:
@@ -19,11 +19,6 @@ parameters:
default: ""
steps:
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- checkout: self
fetchDepth: 1
retryCountOnTaskFailure: 3
- task: NodeTool@0
inputs:
versionSource: fromFile
@@ -35,27 +30,26 @@ steps:
versionSpec: "3.x"
addToPath: true
- ${{ 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
- task: ExtractFiles@1
displayName: Extract compilation output
inputs:
archiveFilePatterns: "$(Build.ArtifactStagingDirectory)/compilation.tar.gz"
cleanDestinationFolder: false
- task: ExtractFiles@1
displayName: Extract compilation output
inputs:
archiveFilePatterns: "$(Build.ArtifactStagingDirectory)/compilation.tar.gz"
cleanDestinationFolder: false
- powershell: node build/setup-npm-registry.js $env:NPM_REGISTRY
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
@@ -143,10 +137,9 @@ steps:
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- powershell: node build/azure-pipelines/distro/mixin-npm
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Mixin distro node modules
- powershell: node build/azure-pipelines/distro/mixin-npm
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Mixin distro node modules
- powershell: |
. build/azure-pipelines/win32/exec.ps1
@@ -157,240 +150,227 @@ steps:
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Create node_modules archive
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- powershell: node build/azure-pipelines/distro/mixin-quality
displayName: Mixin distro quality
- powershell: node build/azure-pipelines/distro/mixin-quality
displayName: Mixin distro quality
- template: ../common/install-builtin-extensions.yml@self
- ${{ if and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'oss')) }}:
- ${{ if ne(parameters.VSCODE_CIBUILD, true) }}:
- powershell: node build\lib\policies win32
displayName: Generate Group Policy definitions
retryCountOnTaskFailure: 3
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- powershell: npm run gulp "transpile-client-esbuild" "transpile-extensions"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Transpile client and extensions
- ${{ if and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'exploration')) }}:
- powershell: node build/win32/explorer-dll-fetcher .build/win32/appx
displayName: Download Explorer dll
- ${{ else }}:
- ${{ if and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'exploration')) }}:
- powershell: node build/win32/explorer-dll-fetcher .build/win32/appx
displayName: Download Explorer dll
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { npm run gulp "vscode-win32-$(VSCODE_ARCH)-min-ci" }
exec { npm run gulp "vscode-win32-$(VSCODE_ARCH)-inno-updater" }
echo "##vso[task.setvariable variable=BUILT_CLIENT]true"
echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build client
# Note: the appx prepare step has to follow Build client step since build step replaces the template
# strings in the raw manifest file at resources/win32/appx/AppxManifest.xml and places it under
# <build-out-dir>/appx/manifest, we need a separate step to prepare the appx package with the
# final contents. In our case only the manifest file is bundled into the appx package.
- ${{ if and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'exploration')) }}:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { npm run gulp "vscode-win32-$(VSCODE_ARCH)-min-ci" }
exec { npm run gulp "vscode-win32-$(VSCODE_ARCH)-inno-updater" }
echo "##vso[task.setvariable variable=BUILT_CLIENT]true"
echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build client
# Add Windows SDK to path
$sdk = "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64"
$env:PATH = "$sdk;$env:PATH"
$AppxName = if ('$(VSCODE_QUALITY)' -eq 'stable') { 'code' } else { 'code_insider' }
makeappx pack /d "$(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)/appx/manifest" /p "$(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)/appx/${AppxName}_$(VSCODE_ARCH).appx" /nv
# Remove the raw manifest folder
Remove-Item -Path "$(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)/appx/manifest" -Recurse -Force
displayName: Prepare appx package
# Note: the appx prepare step has to follow Build client step since build step replaces the template
# strings in the raw manifest file at resources/win32/appx/AppxManifest.xml and places it under
# <build-out-dir>/appx/manifest, we need a separate step to prepare the appx package with the
# final contents. In our case only the manifest file is bundled into the appx package.
- ${{ if and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'exploration')) }}:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
# Add Windows SDK to path
$sdk = "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64"
$env:PATH = "$sdk;$env:PATH"
$AppxName = if ('$(VSCODE_QUALITY)' -eq 'stable') { 'code' } else { 'code_insider' }
makeappx pack /d "$(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)/appx/manifest" /p "$(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)/appx/${AppxName}_$(VSCODE_ARCH).appx" /nv
# Remove the raw manifest folder
Remove-Item -Path "$(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)/appx/manifest" -Recurse -Force
displayName: Prepare appx package
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { npm run gulp "vscode-reh-win32-$(VSCODE_ARCH)-min-ci" }
mv ..\vscode-reh-win32-$(VSCODE_ARCH) ..\vscode-server-win32-$(VSCODE_ARCH) # TODO@joaomoreno
echo "##vso[task.setvariable variable=BUILT_SERVER]true"
echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(CodeSigningFolderPath),$(Agent.BuildDirectory)/vscode-server-win32-$(VSCODE_ARCH)"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { npm run gulp "vscode-reh-win32-$(VSCODE_ARCH)-min-ci" }
mv ..\vscode-reh-win32-$(VSCODE_ARCH) ..\vscode-server-win32-$(VSCODE_ARCH) # TODO@joaomoreno
echo "##vso[task.setvariable variable=BUILT_SERVER]true"
echo "##vso[task.setvariable variable=CodeSigningFolderPath]$(CodeSigningFolderPath),$(Agent.BuildDirectory)/vscode-server-win32-$(VSCODE_ARCH)"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { npm run gulp "vscode-reh-web-win32-$(VSCODE_ARCH)-min-ci" }
mv ..\vscode-reh-web-win32-$(VSCODE_ARCH) ..\vscode-server-win32-$(VSCODE_ARCH)-web # TODO@joaomoreno
echo "##vso[task.setvariable variable=BUILT_WEB]true"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server (web)
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { npm run gulp "vscode-reh-web-win32-$(VSCODE_ARCH)-min-ci" }
mv ..\vscode-reh-web-win32-$(VSCODE_ARCH) ..\vscode-server-win32-$(VSCODE_ARCH)-web # TODO@joaomoreno
echo "##vso[task.setvariable variable=BUILT_WEB]true"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server (web)
- ${{ if ne(parameters.VSCODE_CIBUILD, true) }}:
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- task: DownloadPipelineArtifact@2
inputs:
artifact: unsigned_vscode_cli_win32_$(VSCODE_ARCH)_cli
patterns: "**"
path: $(Build.ArtifactStagingDirectory)/cli
displayName: Download VS Code CLI
- task: DownloadPipelineArtifact@2
inputs:
artifact: unsigned_vscode_cli_win32_$(VSCODE_ARCH)_cli
patterns: "**"
path: $(Build.ArtifactStagingDirectory)/cli
displayName: Download VS Code CLI
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$ArtifactName = (gci -Path "$(Build.ArtifactStagingDirectory)/cli" | Select-Object -last 1).FullName
Expand-Archive -Path $ArtifactName -DestinationPath "$(Build.ArtifactStagingDirectory)/cli"
$AppProductJson = Get-Content -Raw -Path "$(Agent.BuildDirectory)\VSCode-win32-$(VSCODE_ARCH)\resources\app\product.json" | ConvertFrom-Json
$CliAppName = $AppProductJson.tunnelApplicationName
$AppName = $AppProductJson.applicationName
Move-Item -Path "$(Build.ArtifactStagingDirectory)/cli/$AppName.exe" -Destination "$(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)/bin/$CliAppName.exe"
displayName: Move VS Code CLI
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$ArtifactName = (gci -Path "$(Build.ArtifactStagingDirectory)/cli" | Select-Object -last 1).FullName
Expand-Archive -Path $ArtifactName -DestinationPath "$(Build.ArtifactStagingDirectory)/cli"
$AppProductJson = Get-Content -Raw -Path "$(Agent.BuildDirectory)\VSCode-win32-$(VSCODE_ARCH)\resources\app\product.json" | ConvertFrom-Json
$CliAppName = $AppProductJson.tunnelApplicationName
$AppName = $AppProductJson.applicationName
Move-Item -Path "$(Build.ArtifactStagingDirectory)/cli/$AppName.exe" -Destination "$(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)/bin/$CliAppName.exe"
displayName: Move VS Code CLI
- task: UseDotNet@2
inputs:
version: 6.x
- task: UseDotNet@2
inputs:
version: 6.x
- task: EsrpCodeSigning@5
inputs:
UseMSIAuthentication: true
ConnectedServiceName: vscode-esrp
AppRegistrationClientId: $(ESRP_CLIENT_ID)
AppRegistrationTenantId: $(ESRP_TENANT_ID)
AuthAKVName: vscode-esrp
AuthSignCertName: esrp-sign
FolderPath: .
Pattern: noop
displayName: 'Install ESRP Tooling'
- task: EsrpCodeSigning@5
inputs:
UseMSIAuthentication: true
ConnectedServiceName: vscode-esrp
AppRegistrationClientId: $(ESRP_CLIENT_ID)
AppRegistrationTenantId: $(ESRP_TENANT_ID)
AuthAKVName: vscode-esrp
AuthSignCertName: esrp-sign
FolderPath: .
Pattern: noop
displayName: 'Install ESRP Tooling'
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$EsrpCodeSigningTool = (gci -directory -filter EsrpCodeSigning_* $(Agent.RootDirectory)\_tasks | Select-Object -last 1).FullName
$Version = (gci -directory $EsrpCodeSigningTool | Select-Object -last 1).FullName
echo "##vso[task.setvariable variable=EsrpCliDllPath]$Version\net6.0\esrpcli.dll"
displayName: Find ESRP CLI
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$EsrpCodeSigningTool = (gci -directory -filter EsrpCodeSigning_* $(Agent.RootDirectory)\_tasks | Select-Object -last 1).FullName
$Version = (gci -directory $EsrpCodeSigningTool | Select-Object -last 1).FullName
echo "##vso[task.setvariable variable=EsrpCliDllPath]$Version\net6.0\esrpcli.dll"
displayName: Find ESRP CLI
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
mkdir -Force .build/node-cpuprofile
exec { npx deemon --detach --wait -- -- npx zx build/azure-pipelines/win32/codesign.js }
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
NODE_DEBUG: "net,child_process"
NODE_OPTIONS: "--report-filename=stdout --report-uncaught-exception --report-on-fatalerror --cpu-prof --cpu-prof-dir=.build/node-cpuprofile"
displayName: ✍️ Codesign
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
mkdir -Force .build/node-cpuprofile
exec { npx deemon --detach --wait -- -- npx zx build/azure-pipelines/win32/codesign.js }
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
NODE_DEBUG: "net,child_process"
NODE_OPTIONS: "--report-filename=stdout --report-uncaught-exception --report-on-fatalerror --cpu-prof --cpu-prof-dir=.build/node-cpuprofile"
displayName: ✍️ Codesign
- ${{ 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-win32-test.yml@self
parameters:
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
VSCODE_ARCH: ${{ parameters.VSCODE_ARCH }}
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 ne(parameters.VSCODE_CIBUILD, true) }}:
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { npx deemon --attach -- -- npx zx build/azure-pipelines/win32/codesign.js }
condition: succeededOrFailed()
env:
NODE_DEBUG: "net,child_process"
NODE_OPTIONS: "--report-filename=stdout --report-uncaught-exception --report-on-fatalerror --cpu-prof --cpu-prof-dir=.build/node-cpuprofile"
displayName: "✍️ Post-job: Codesign"
# Additional "--" needed to workaround https://github.com/npm/cli/issues/7375
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { npx deemon --attach -- -- npx zx build/azure-pipelines/win32/codesign.js }
condition: succeededOrFailed()
env:
NODE_DEBUG: "net,child_process"
NODE_OPTIONS: "--report-filename=stdout --report-uncaught-exception --report-on-fatalerror --cpu-prof --cpu-prof-dir=.build/node-cpuprofile"
displayName: "✍️ Post-job: Codesign"
- powershell: |
$ErrorActionPreference = "Stop"
- powershell: |
$ErrorActionPreference = "Stop"
$PackageJson = Get-Content -Raw -Path ..\VSCode-win32-$(VSCODE_ARCH)\resources\app\package.json | ConvertFrom-Json
$Version = $PackageJson.version
$PackageJson = Get-Content -Raw -Path ..\VSCode-win32-$(VSCODE_ARCH)\resources\app\package.json | ConvertFrom-Json
$Version = $PackageJson.version
$ClientArchivePath = ".build\win32-$(VSCODE_ARCH)\VSCode-win32-$(VSCODE_ARCH)-$Version.zip"
$ServerArchivePath = ".build\win32-$(VSCODE_ARCH)\vscode-server-win32-$(VSCODE_ARCH).zip"
$WebArchivePath = ".build\win32-$(VSCODE_ARCH)\vscode-server-win32-$(VSCODE_ARCH)-web.zip"
$ClientArchivePath = ".build\win32-$(VSCODE_ARCH)\VSCode-win32-$(VSCODE_ARCH)-$Version.zip"
$ServerArchivePath = ".build\win32-$(VSCODE_ARCH)\vscode-server-win32-$(VSCODE_ARCH).zip"
$WebArchivePath = ".build\win32-$(VSCODE_ARCH)\vscode-server-win32-$(VSCODE_ARCH)-web.zip"
$SystemSetupPath = ".build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup-$(VSCODE_ARCH)-$Version.exe"
$UserSetupPath = ".build\win32-$(VSCODE_ARCH)\user-setup\VSCodeUserSetup-$(VSCODE_ARCH)-$Version.exe"
$SystemSetupPath = ".build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup-$(VSCODE_ARCH)-$Version.exe"
$UserSetupPath = ".build\win32-$(VSCODE_ARCH)\user-setup\VSCodeUserSetup-$(VSCODE_ARCH)-$Version.exe"
mv .build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup.exe $SystemSetupPath
mv .build\win32-$(VSCODE_ARCH)\user-setup\VSCodeSetup.exe $UserSetupPath
mv .build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup.exe $SystemSetupPath
mv .build\win32-$(VSCODE_ARCH)\user-setup\VSCodeSetup.exe $UserSetupPath
echo "##vso[task.setvariable variable=CLIENT_PATH]$ClientArchivePath"
echo "##vso[task.setvariable variable=SERVER_PATH]$ServerArchivePath"
echo "##vso[task.setvariable variable=WEB_PATH]$WebArchivePath"
echo "##vso[task.setvariable variable=CLIENT_PATH]$ClientArchivePath"
echo "##vso[task.setvariable variable=SERVER_PATH]$ServerArchivePath"
echo "##vso[task.setvariable variable=WEB_PATH]$WebArchivePath"
echo "##vso[task.setvariable variable=SYSTEM_SETUP_PATH]$SystemSetupPath"
echo "##vso[task.setvariable variable=USER_SETUP_PATH]$UserSetupPath"
condition: succeededOrFailed()
displayName: Move setup packages
echo "##vso[task.setvariable variable=SYSTEM_SETUP_PATH]$SystemSetupPath"
echo "##vso[task.setvariable variable=USER_SETUP_PATH]$UserSetupPath"
condition: succeededOrFailed()
displayName: Move setup packages
- powershell: echo "##vso[task.setvariable variable=ARTIFACT_PREFIX]attempt$(System.JobAttempt)_"
condition: and(succeededOrFailed(), notIn(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues'))
displayName: Generate artifact prefix
- powershell: echo "##vso[task.setvariable variable=ARTIFACT_PREFIX]attempt$(System.JobAttempt)_"
condition: and(succeededOrFailed(), notIn(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues'))
displayName: Generate artifact prefix
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: .build/node-cpuprofile
artifactName: node-cpuprofile-$(VSCODE_ARCH)
sbomEnabled: false
displayName: Publish Codesign cpu profile
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: .build/node-cpuprofile
artifactName: node-cpuprofile-$(VSCODE_ARCH)
sbomEnabled: false
displayName: Publish Codesign cpu profile
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(CLIENT_PATH)
artifactName: $(ARTIFACT_PREFIX)vscode_client_win32_$(VSCODE_ARCH)_archive
sbomBuildDropPath: $(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)
sbomPackageName: "VS Code Windows $(VSCODE_ARCH)"
sbomPackageVersion: $(Build.SourceVersion)
condition: and(succeededOrFailed(), ne(variables['CLIENT_PATH'], ''))
displayName: Publish archive
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(CLIENT_PATH)
artifactName: $(ARTIFACT_PREFIX)vscode_client_win32_$(VSCODE_ARCH)_archive
sbomBuildDropPath: $(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)
sbomPackageName: "VS Code Windows $(VSCODE_ARCH)"
sbomPackageVersion: $(Build.SourceVersion)
condition: and(succeededOrFailed(), ne(variables['CLIENT_PATH'], ''))
displayName: Publish archive
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(SERVER_PATH)
artifactName: $(ARTIFACT_PREFIX)vscode_server_win32_$(VSCODE_ARCH)_archive
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-win32-$(VSCODE_ARCH)
sbomPackageName: "VS Code Windows $(VSCODE_ARCH) Server"
sbomPackageVersion: $(Build.SourceVersion)
condition: and(succeededOrFailed(), ne(variables['SERVER_PATH'], ''))
displayName: Publish server archive
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(SERVER_PATH)
artifactName: $(ARTIFACT_PREFIX)vscode_server_win32_$(VSCODE_ARCH)_archive
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-win32-$(VSCODE_ARCH)
sbomPackageName: "VS Code Windows $(VSCODE_ARCH) Server"
sbomPackageVersion: $(Build.SourceVersion)
condition: and(succeededOrFailed(), ne(variables['SERVER_PATH'], ''))
displayName: Publish server archive
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(WEB_PATH)
artifactName: $(ARTIFACT_PREFIX)vscode_web_win32_$(VSCODE_ARCH)_archive
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-win32-$(VSCODE_ARCH)-web
sbomPackageName: "VS Code Windows $(VSCODE_ARCH) Web"
sbomPackageVersion: $(Build.SourceVersion)
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''))
displayName: Publish web server archive
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(WEB_PATH)
artifactName: $(ARTIFACT_PREFIX)vscode_web_win32_$(VSCODE_ARCH)_archive
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-win32-$(VSCODE_ARCH)-web
sbomPackageName: "VS Code Windows $(VSCODE_ARCH) Web"
sbomPackageVersion: $(Build.SourceVersion)
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''))
displayName: Publish web server archive
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(SYSTEM_SETUP_PATH)
artifactName: $(ARTIFACT_PREFIX)vscode_client_win32_$(VSCODE_ARCH)_setup
sbomBuildDropPath: $(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)
sbomPackageName: "VS Code Windows $(VSCODE_ARCH) System Setup"
sbomPackageVersion: $(Build.SourceVersion)
condition: and(succeededOrFailed(), ne(variables['SYSTEM_SETUP_PATH'], ''))
displayName: Publish system setup
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(SYSTEM_SETUP_PATH)
artifactName: $(ARTIFACT_PREFIX)vscode_client_win32_$(VSCODE_ARCH)_setup
sbomBuildDropPath: $(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)
sbomPackageName: "VS Code Windows $(VSCODE_ARCH) System Setup"
sbomPackageVersion: $(Build.SourceVersion)
condition: and(succeededOrFailed(), ne(variables['SYSTEM_SETUP_PATH'], ''))
displayName: Publish system setup
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(USER_SETUP_PATH)
artifactName: $(ARTIFACT_PREFIX)vscode_client_win32_$(VSCODE_ARCH)_user-setup
sbomBuildDropPath: $(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)
sbomPackageName: "VS Code Windows $(VSCODE_ARCH) User Setup"
sbomPackageVersion: $(Build.SourceVersion)
condition: and(succeededOrFailed(), ne(variables['USER_SETUP_PATH'], ''))
displayName: Publish user setup
- task: 1ES.PublishPipelineArtifact@1
inputs:
targetPath: $(USER_SETUP_PATH)
artifactName: $(ARTIFACT_PREFIX)vscode_client_win32_$(VSCODE_ARCH)_user-setup
sbomBuildDropPath: $(Agent.BuildDirectory)/VSCode-win32-$(VSCODE_ARCH)
sbomPackageName: "VS Code Windows $(VSCODE_ARCH) User Setup"
sbomPackageVersion: $(Build.SourceVersion)
condition: and(succeededOrFailed(), ne(variables['USER_SETUP_PATH'], ''))
displayName: Publish user setup