mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Engineering - refactor product pipeline (#269979)
This commit is contained in:
@@ -1,158 +0,0 @@
|
||||
parameters:
|
||||
- name: VSCODE_BUILD_LINUX
|
||||
type: boolean
|
||||
default: false
|
||||
- name: VSCODE_BUILD_LINUX_ARM64
|
||||
type: boolean
|
||||
default: false
|
||||
- name: VSCODE_BUILD_LINUX_ARMHF
|
||||
type: boolean
|
||||
default: false
|
||||
- name: VSCODE_CHECK_ONLY
|
||||
type: boolean
|
||||
default: false
|
||||
- name: VSCODE_QUALITY
|
||||
type: string
|
||||
|
||||
steps:
|
||||
- template: ../common/checkout.yml@self
|
||||
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- template: ../cli/cli-apply-patches.yml@self
|
||||
|
||||
- task: Npm@1
|
||||
displayName: Download openssl prebuilt
|
||||
inputs:
|
||||
command: custom
|
||||
customCommand: pack @vscode-internal/openssl-prebuilt@0.0.11
|
||||
customRegistry: useFeed
|
||||
customFeed: "Monaco/openssl-prebuilt"
|
||||
workingDir: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
mkdir $(Build.ArtifactStagingDirectory)/openssl
|
||||
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.11.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
|
||||
displayName: Extract openssl prebuilt
|
||||
|
||||
- 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
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
- 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
|
||||
workingDirectory: build
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Install build dependencies
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
mkdir -p $(Build.SourcesDirectory)/.build
|
||||
displayName: Create .build folder for misc dependencies
|
||||
|
||||
- template: ../cli/install-rust-posix.yml@self
|
||||
parameters:
|
||||
targets:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64, true) }}:
|
||||
- aarch64-unknown-linux-gnu
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX, true) }}:
|
||||
- x86_64-unknown-linux-gnu
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true) }}:
|
||||
- armv7-unknown-linux-gnueabihf
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64, true) }}:
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: aarch64-unknown-linux-gnu
|
||||
VSCODE_CLI_ARTIFACT: vscode_cli_linux_arm64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
VSCODE_CLI_ENV:
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux/include
|
||||
SYSROOT_ARCH: arm64
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX, true) }}:
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: x86_64-unknown-linux-gnu
|
||||
VSCODE_CLI_ARTIFACT: vscode_cli_linux_x64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
VSCODE_CLI_ENV:
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux/include
|
||||
SYSROOT_ARCH: amd64
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true) }}:
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: armv7-unknown-linux-gnueabihf
|
||||
VSCODE_CLI_ARTIFACT: vscode_cli_linux_armhf_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
VSCODE_CLI_ENV:
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm-linux/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm-linux/include
|
||||
SYSROOT_ARCH: armhf
|
||||
|
||||
- ${{ if not(parameters.VSCODE_CHECK_ONLY) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true) }}:
|
||||
- template: ../common/publish-artifact.yml@self
|
||||
parameters:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/vscode_cli_linux_armhf_cli.tar.gz
|
||||
artifactName: vscode_cli_linux_armhf_cli
|
||||
displayName: Publish vscode_cli_linux_armhf_cli artifact
|
||||
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
|
||||
sbomPackageName: "VS Code Linux armhf CLI"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX, true) }}:
|
||||
- template: ../common/publish-artifact.yml@self
|
||||
parameters:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/vscode_cli_linux_x64_cli.tar.gz
|
||||
artifactName: vscode_cli_linux_x64_cli
|
||||
displayName: Publish vscode_cli_linux_x64_cli artifact
|
||||
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
|
||||
sbomPackageName: "VS Code Linux x64 CLI"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64, true) }}:
|
||||
- template: ../common/publish-artifact.yml@self
|
||||
parameters:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/vscode_cli_linux_arm64_cli.tar.gz
|
||||
artifactName: vscode_cli_linux_arm64_cli
|
||||
displayName: Publish vscode_cli_linux_arm64_cli artifact
|
||||
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
|
||||
sbomPackageName: "VS Code Linux arm64 CLI"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
@@ -11,8 +11,8 @@ async function main() {
|
||||
// Start the code sign processes in parallel
|
||||
// 1. Codesign deb package
|
||||
// 2. Codesign rpm package
|
||||
const codesignTask1 = (0, codesign_1.spawnCodesignProcess)(esrpCliDLLPath, 'sign-pgp', '.build/linux/out/deb', '*.deb');
|
||||
const codesignTask2 = (0, codesign_1.spawnCodesignProcess)(esrpCliDLLPath, 'sign-pgp', '.build/linux/out/rpm', '*.rpm');
|
||||
const codesignTask1 = (0, codesign_1.spawnCodesignProcess)(esrpCliDLLPath, 'sign-pgp', '.build/linux/deb', '*.deb');
|
||||
const codesignTask2 = (0, codesign_1.spawnCodesignProcess)(esrpCliDLLPath, 'sign-pgp', '.build/linux/rpm', '*.rpm');
|
||||
// Codesign deb package
|
||||
(0, codesign_1.printBanner)('Codesign deb package');
|
||||
await (0, codesign_1.streamProcessOutputAndCheckResult)('Codesign deb package', codesignTask1);
|
||||
|
||||
@@ -12,8 +12,8 @@ async function main() {
|
||||
// Start the code sign processes in parallel
|
||||
// 1. Codesign deb package
|
||||
// 2. Codesign rpm package
|
||||
const codesignTask1 = spawnCodesignProcess(esrpCliDLLPath, 'sign-pgp', '.build/linux/out/deb', '*.deb');
|
||||
const codesignTask2 = spawnCodesignProcess(esrpCliDLLPath, 'sign-pgp', '.build/linux/out/rpm', '*.rpm');
|
||||
const codesignTask1 = spawnCodesignProcess(esrpCliDLLPath, 'sign-pgp', '.build/linux/deb', '*.deb');
|
||||
const codesignTask2 = spawnCodesignProcess(esrpCliDLLPath, 'sign-pgp', '.build/linux/rpm', '*.rpm');
|
||||
|
||||
// Codesign deb package
|
||||
printBanner('Codesign deb package');
|
||||
|
||||
@@ -17,21 +17,21 @@ jobs:
|
||||
templateContext:
|
||||
outputs:
|
||||
- output: pipelineArtifact
|
||||
targetPath: .build/crashes
|
||||
targetPath: $(Build.SourcesDirectory)/.build/crashes
|
||||
artifactName: crash-dump-linux-$(VSCODE_ARCH)-${{ lower(parameters.VSCODE_TEST_SUITE) }}-$(System.JobAttempt)
|
||||
displayName: Publish Crash Reports
|
||||
sbomEnabled: false
|
||||
isProduction: false
|
||||
condition: failed()
|
||||
- output: pipelineArtifact
|
||||
targetPath: node_modules
|
||||
targetPath: $(Build.SourcesDirectory)/node_modules
|
||||
artifactName: node-modules-linux-$(VSCODE_ARCH)-${{ lower(parameters.VSCODE_TEST_SUITE) }}-$(System.JobAttempt)
|
||||
displayName: Publish Node Modules
|
||||
sbomEnabled: false
|
||||
isProduction: false
|
||||
condition: failed()
|
||||
- output: pipelineArtifact
|
||||
targetPath: .build/logs
|
||||
targetPath: $(Build.SourcesDirectory)/.build/logs
|
||||
artifactName: logs-linux-$(VSCODE_ARCH)-${{ lower(parameters.VSCODE_TEST_SUITE) }}-$(System.JobAttempt)
|
||||
displayName: Publish Log Files
|
||||
sbomEnabled: false
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
parameters:
|
||||
- name: VSCODE_ARCH
|
||||
type: string
|
||||
- name: VSCODE_CHECK_ONLY
|
||||
type: boolean
|
||||
default: false
|
||||
- name: VSCODE_QUALITY
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
- job: LinuxCLI_${{ parameters.VSCODE_ARCH }}
|
||||
displayName: Linux (${{ upper(parameters.VSCODE_ARCH) }})
|
||||
timeoutInMinutes: 60
|
||||
pool:
|
||||
name: 1es-ubuntu-22.04-x64
|
||||
os: linux
|
||||
variables:
|
||||
VSCODE_ARCH: ${{ parameters.VSCODE_ARCH }}
|
||||
templateContext:
|
||||
outputs:
|
||||
- ${{ if not(parameters.VSCODE_CHECK_ONLY) }}:
|
||||
- output: pipelineArtifact
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/vscode_cli_linux_$(VSCODE_ARCH)_cli.tar.gz
|
||||
artifactName: vscode_cli_linux_$(VSCODE_ARCH)_cli
|
||||
displayName: Publish vscode_cli_linux_$(VSCODE_ARCH)_cli artifact
|
||||
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) CLI"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
steps:
|
||||
- template: ../common/checkout.yml@self
|
||||
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- template: ../cli/cli-apply-patches.yml@self
|
||||
|
||||
- task: Npm@1
|
||||
displayName: Download openssl prebuilt
|
||||
inputs:
|
||||
command: custom
|
||||
customCommand: pack @vscode-internal/openssl-prebuilt@0.0.11
|
||||
customRegistry: useFeed
|
||||
customFeed: "Monaco/openssl-prebuilt"
|
||||
workingDir: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
mkdir $(Build.ArtifactStagingDirectory)/openssl
|
||||
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.11.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
|
||||
displayName: Extract openssl prebuilt
|
||||
|
||||
- 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
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
- 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
|
||||
workingDirectory: build
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Install build dependencies
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
mkdir -p $(Build.SourcesDirectory)/.build
|
||||
displayName: Create .build folder for misc dependencies
|
||||
|
||||
- template: ../cli/install-rust-posix.yml@self
|
||||
parameters:
|
||||
targets:
|
||||
- ${{ if eq(parameters.VSCODE_ARCH, 'x64') }}:
|
||||
- x86_64-unknown-linux-gnu
|
||||
- ${{ if eq(parameters.VSCODE_ARCH, 'arm64') }}:
|
||||
- aarch64-unknown-linux-gnu
|
||||
- ${{ if eq(parameters.VSCODE_ARCH, 'armhf') }}:
|
||||
- armv7-unknown-linux-gnueabihf
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_ARCH, 'x64') }}:
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: x86_64-unknown-linux-gnu
|
||||
VSCODE_CLI_ARTIFACT: vscode_cli_linux_x64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
VSCODE_CLI_ENV:
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux/include
|
||||
SYSROOT_ARCH: amd64
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_ARCH, 'arm64') }}:
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: aarch64-unknown-linux-gnu
|
||||
VSCODE_CLI_ARTIFACT: vscode_cli_linux_arm64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
VSCODE_CLI_ENV:
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux/include
|
||||
SYSROOT_ARCH: arm64
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_ARCH, 'armhf') }}:
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: armv7-unknown-linux-gnueabihf
|
||||
VSCODE_CLI_ARTIFACT: vscode_cli_linux_armhf_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
VSCODE_CLI_ENV:
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm-linux/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm-linux/include
|
||||
SYSROOT_ARCH: armhf
|
||||
@@ -29,79 +29,73 @@ jobs:
|
||||
NPM_ARCH: ${{ parameters.NPM_ARCH }}
|
||||
VSCODE_ARCH: ${{ parameters.VSCODE_ARCH }}
|
||||
templateContext:
|
||||
outputParentDirectory: $(Build.SourcesDirectory)/.build/linux/out
|
||||
outputParentDirectory: $(Build.ArtifactStagingDirectory)/out
|
||||
outputs:
|
||||
- ${{ if or(eq(parameters.VSCODE_RUN_ELECTRON_TESTS, true), eq(parameters.VSCODE_RUN_BROWSER_TESTS, true), eq(parameters.VSCODE_RUN_REMOTE_TESTS, true)) }}:
|
||||
- output: pipelineArtifact
|
||||
targetPath: .build/crashes
|
||||
targetPath: $(Build.SourcesDirectory)/.build/crashes
|
||||
artifactName: crash-dump-linux-$(VSCODE_ARCH)-$(System.JobAttempt)
|
||||
displayName: Publish Crash Reports
|
||||
sbomEnabled: false
|
||||
isProduction: false
|
||||
condition: failed()
|
||||
- output: pipelineArtifact
|
||||
targetPath: node_modules
|
||||
targetPath: $(Build.SourcesDirectory)/node_modules
|
||||
artifactName: node-modules-linux-$(VSCODE_ARCH)-$(System.JobAttempt)
|
||||
displayName: Publish Node Modules
|
||||
sbomEnabled: false
|
||||
isProduction: false
|
||||
condition: failed()
|
||||
- output: pipelineArtifact
|
||||
targetPath: .build/logs
|
||||
targetPath: $(Build.SourcesDirectory)/.build/logs
|
||||
artifactName: logs-linux-$(VSCODE_ARCH)-$(System.JobAttempt)
|
||||
displayName: Publish Log Files
|
||||
sbomEnabled: false
|
||||
isProduction: false
|
||||
condition: succeededOrFailed()
|
||||
- output: pipelineArtifact
|
||||
targetPath: $(CLIENT_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_client_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/out/client/$(CLIENT_ARCHIVE_NAME)
|
||||
artifactName: vscode_client_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
displayName: Publish client archive
|
||||
sbomBuildDropPath: $(Agent.BuildDirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) (unsigned)"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['CLIENT_PATH'], ''))
|
||||
- output: pipelineArtifact
|
||||
targetPath: $(SERVER_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_server_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/out/server/vscode-server-linux-$(VSCODE_ARCH).tar.gz
|
||||
artifactName: vscode_server_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
displayName: Publish server archive
|
||||
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) Server"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['SERVER_PATH'], ''))
|
||||
- output: pipelineArtifact
|
||||
targetPath: $(WEB_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_web_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/out/web/vscode-server-linux-$(VSCODE_ARCH)-web.tar.gz
|
||||
artifactName: vscode_web_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
displayName: Publish web server archive
|
||||
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) Web"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''))
|
||||
- output: pipelineArtifact
|
||||
targetPath: $(DEB_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_client_linux_$(VSCODE_ARCH)_deb-package
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/out/deb/$(DEB_PACKAGE_NAME)
|
||||
artifactName: vscode_client_linux_$(VSCODE_ARCH)_deb-package
|
||||
displayName: Publish deb package
|
||||
sbomBuildDropPath: .build/linux/deb
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) DEB"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['DEB_PATH'], ''))
|
||||
- output: pipelineArtifact
|
||||
targetPath: $(RPM_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_client_linux_$(VSCODE_ARCH)_rpm-package
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/out/rpm/$(RPM_PACKAGE_NAME)
|
||||
artifactName: vscode_client_linux_$(VSCODE_ARCH)_rpm-package
|
||||
displayName: Publish rpm package
|
||||
sbomBuildDropPath: .build/linux/rpm
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) RPM"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['RPM_PATH'], ''))
|
||||
- output: pipelineArtifact
|
||||
targetPath: $(SNAP_PATH)
|
||||
artifactName: vscode_client_linux_$(VSCODE_ARCH)_snap
|
||||
displayName: Publish snap package
|
||||
sbomBuildDropPath: $(SNAP_EXTRACTED_PATH)
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) SNAP"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['SNAP_PATH'], ''))
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_SNAP, true) }}:
|
||||
- output: pipelineArtifact
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/out/snap/$(SNAP_PACKAGE_NAME)
|
||||
artifactName: vscode_client_linux_$(VSCODE_ARCH)_snap
|
||||
displayName: Publish snap package
|
||||
sbomBuildDropPath: $(SNAP_EXTRACTED_PATH)
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) SNAP"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
steps:
|
||||
- template: ./steps/product-build-linux-compile.yml@self
|
||||
parameters:
|
||||
|
||||
@@ -169,9 +169,10 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
npm run gulp vscode-linux-$(VSCODE_ARCH)-min-ci
|
||||
ARCHIVE_PATH=".build/linux/out/client/code-${{ parameters.VSCODE_QUALITY }}-$(VSCODE_ARCH)-$(date +%s).tar.gz"
|
||||
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"
|
||||
echo "##vso[task.setvariable variable=CLIENT_ARCHIVE_NAME]$(basename $ARCHIVE_PATH)"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build client
|
||||
@@ -203,7 +204,7 @@ steps:
|
||||
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/out/server/vscode-server-linux-$(VSCODE_ARCH).tar.gz"
|
||||
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)
|
||||
@@ -217,7 +218,7 @@ steps:
|
||||
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/out/web/vscode-server-linux-$(VSCODE_ARCH)-web.tar.gz"
|
||||
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"
|
||||
@@ -264,14 +265,15 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
npm run gulp "vscode-linux-$(VSCODE_ARCH)-build-deb"
|
||||
mkdir -p .build/linux/out/deb
|
||||
cp .build/linux/deb/*/deb/*.deb .build/linux/out/deb/
|
||||
file_output=$(file $(ls .build/linux/out/deb/*.deb))
|
||||
mkdir -p .build/linux/deb
|
||||
cp .build/linux/deb/*/deb/*.deb .build/linux/deb/
|
||||
file_output=$(file $(ls .build/linux/deb/*.deb))
|
||||
if [[ "$file_output" != *"data compression xz"* ]]; then
|
||||
echo "Error: unknown compression. $file_output"
|
||||
exit 1
|
||||
fi
|
||||
echo "##vso[task.setvariable variable=DEB_PATH]$(ls .build/linux/out/deb/*.deb)"
|
||||
echo "##vso[task.setvariable variable=DEB_PATH]$(ls .build/linux/deb/*.deb)"
|
||||
echo "##vso[task.setvariable variable=DEB_PACKAGE_NAME]$(basename $(ls .build/linux/deb/*.deb))"
|
||||
displayName: Build deb package
|
||||
|
||||
- script: |
|
||||
@@ -294,9 +296,10 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
npm run gulp "vscode-linux-$(VSCODE_ARCH)-build-rpm"
|
||||
mkdir -p .build/linux/out/rpm
|
||||
cp .build/linux/rpm/*/*.rpm .build/linux/out/rpm/
|
||||
echo "##vso[task.setvariable variable=RPM_PATH]$(ls .build/linux/out/rpm/*.rpm)"
|
||||
mkdir -p .build/linux/rpm
|
||||
cp .build/linux/rpm/*/*.rpm .build/linux/rpm/
|
||||
echo "##vso[task.setvariable variable=RPM_PATH]$(ls .build/linux/rpm/*.rpm)"
|
||||
echo "##vso[task.setvariable variable=RPM_PACKAGE_NAME]$(basename $(ls .build/linux/rpm/*.rpm))"
|
||||
displayName: Build rpm package
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_ARCH, 'x64') }}:
|
||||
@@ -316,14 +319,15 @@ steps:
|
||||
SNAP_ROOT="$(pwd)/.build/linux/snap/$(VSCODE_ARCH)"
|
||||
SNAP_EXTRACTED_PATH=$(find $SNAP_ROOT -maxdepth 1 -type d -name 'code-*')
|
||||
|
||||
mkdir -p .build/linux/out/snap
|
||||
cp $(find $SNAP_ROOT -maxdepth 1 -type f -name '*.snap') .build/linux/out/snap/
|
||||
mkdir -p .build/linux/snap
|
||||
cp $(find $SNAP_ROOT -maxdepth 1 -type f -name '*.snap') .build/linux/snap/
|
||||
|
||||
# SBOM tool doesn't like recursive symlinks
|
||||
sudo find $SNAP_EXTRACTED_PATH -type l -delete
|
||||
|
||||
echo "##vso[task.setvariable variable=SNAP_EXTRACTED_PATH]$SNAP_EXTRACTED_PATH"
|
||||
echo "##vso[task.setvariable variable=SNAP_PATH]$(ls .build/linux/out/snap/*.snap)"
|
||||
echo "##vso[task.setvariable variable=SNAP_PATH]$(ls .build/linux/snap/*.snap)"
|
||||
echo "##vso[task.setvariable variable=SNAP_PACKAGE_NAME]$(basename $(ls .build/linux/snap/*.snap))"
|
||||
env:
|
||||
VSCODE_ARCH: $(VSCODE_ARCH)
|
||||
displayName: Build snap package
|
||||
@@ -370,6 +374,26 @@ steps:
|
||||
condition: succeededOrFailed()
|
||||
displayName: "✍️ Post-job: Codesign deb & rpm"
|
||||
|
||||
- script: echo "##vso[task.setvariable variable=ARTIFACT_PREFIX]attempt$(System.JobAttempt)_"
|
||||
condition: and(succeededOrFailed(), notIn(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues'))
|
||||
displayName: Generate artifact prefix
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
mkdir -p $(Build.ArtifactStagingDirectory)/out/client
|
||||
mv $(CLIENT_PATH) $(Build.ArtifactStagingDirectory)/out/client/$(CLIENT_ARCHIVE_NAME)
|
||||
|
||||
mkdir -p $(Build.ArtifactStagingDirectory)/out/server
|
||||
mv $(SERVER_PATH) $(Build.ArtifactStagingDirectory)/out/server/$(basename $(SERVER_PATH))
|
||||
|
||||
mkdir -p $(Build.ArtifactStagingDirectory)/out/web
|
||||
mv $(WEB_PATH) $(Build.ArtifactStagingDirectory)/out/web/$(basename $(WEB_PATH))
|
||||
|
||||
mkdir -p $(Build.ArtifactStagingDirectory)/out/deb
|
||||
mv $(DEB_PATH) $(Build.ArtifactStagingDirectory)/out/deb/$(DEB_PACKAGE_NAME)
|
||||
|
||||
mkdir -p $(Build.ArtifactStagingDirectory)/out/rpm
|
||||
mv $(RPM_PATH) $(Build.ArtifactStagingDirectory)/out/rpm/$(RPM_PACKAGE_NAME)
|
||||
|
||||
if [ -n "$SNAP_PATH" ]; then
|
||||
mkdir -p $(Build.ArtifactStagingDirectory)/out/snap
|
||||
mv $(SNAP_PATH) $(Build.ArtifactStagingDirectory)/out/snap/$(SNAP_PACKAGE_NAME)
|
||||
fi
|
||||
displayName: Move artifacts to out directory
|
||||
|
||||
Reference in New Issue
Block a user