mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
e5515ac702
* extend 1es pipeline template * oops * fix template references * argh * hmm * hm * hm * use outputs for compilation artifact * this * use 1ES.PublishPipelineArtifact@1 instead of publish * more 1ES.PublishPipelineArtifact@1 adoption * provide windows pool for sdl sources * sdl * fix pools * fix macos * disable sbom for intermediate artifacts * use mariner linux * try inline tsa options * fix credscan * hm * sudo it * more suppressions * be explicit with SBOM build drop paths * fix indentation * fix file extensions * fix cli sbom build drop paths * fix more build * fix unzip cli * careful with _manifest in artifacts * do not close file * add logging * debug * use snapcraft container * remove size check * fix macos cli step * fix snap permissions * fix macos * better logs * fix snap * more cred scan suppressions * even more supressiong * alpine-arm64: try using x64 * Revert "alpine-arm64: try using x64" This reverts commitbf2003bf60
. * test docker * I wonder * logs * hm * fix indentation * hm * hm * fix snap finds * remove auth * use hostArchitecture * snap: limit find * hm * sudo * Add validateToolOutput: None to the build pipeline * bring back sdl-scan * try all tools: true * use release * Update Azure Pipelines YAML file for Linux product build and test * hm * hm * same for win32 * hm * hm * Revert "hm" This reverts commit1b9dcae85b
. * use branch * fix template file * fix template paths
115 lines
4.4 KiB
YAML
115 lines
4.4 KiB
YAML
parameters:
|
|
- name: VSCODE_BUILD_ALPINE
|
|
type: boolean
|
|
default: false
|
|
- name: VSCODE_BUILD_ALPINE_ARM64
|
|
type: boolean
|
|
default: false
|
|
- name: VSCODE_QUALITY
|
|
type: string
|
|
- name: VSCODE_CHECK_ONLY
|
|
type: boolean
|
|
default: false
|
|
|
|
steps:
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSource: fromFile
|
|
versionFilePath: .nvmrc
|
|
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
|
|
|
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
|
# Install yarn as the ARM64 build agent is using vanilla Ubuntu
|
|
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true) }}:
|
|
- task: Npm@1
|
|
displayName: Install yarn
|
|
inputs:
|
|
command: custom
|
|
customCommand: install --global yarn
|
|
|
|
- script: |
|
|
set -e
|
|
yarn --frozen-lockfile --ignore-optional
|
|
workingDirectory: build
|
|
displayName: Install pipeline build
|
|
|
|
- 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
|
|
|
|
# inspired by: https://github.com/emk/rust-musl-builder/blob/main/Dockerfile
|
|
- bash: |
|
|
set -e
|
|
sudo apt-get update
|
|
sudo apt-get install -yq build-essential musl-dev musl-tools linux-libc-dev pkgconf xutils-dev lld
|
|
sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++" || echo "link exists"
|
|
displayName: Install musl build dependencies
|
|
|
|
- template: ../cli/install-rust-posix.yml@self
|
|
parameters:
|
|
targets:
|
|
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true) }}:
|
|
- aarch64-unknown-linux-musl
|
|
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE, true) }}:
|
|
- x86_64-unknown-linux-musl
|
|
|
|
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true) }}:
|
|
- template: ../cli/cli-compile.yml@self
|
|
parameters:
|
|
VSCODE_CLI_TARGET: aarch64-unknown-linux-musl
|
|
VSCODE_CLI_ARTIFACT: vscode_cli_alpine_arm64_cli
|
|
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
|
VSCODE_CLI_ENV:
|
|
CXX_aarch64-unknown-linux-musl: musl-g++
|
|
CC_aarch64-unknown-linux-musl: musl-gcc
|
|
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux-musl/lib
|
|
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux-musl/include
|
|
OPENSSL_STATIC: "1"
|
|
|
|
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE, true) }}:
|
|
- template: ../cli/cli-compile.yml@self
|
|
parameters:
|
|
VSCODE_CLI_TARGET: x86_64-unknown-linux-musl
|
|
VSCODE_CLI_ARTIFACT: vscode_cli_alpine_x64_cli
|
|
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
|
VSCODE_CLI_ENV:
|
|
CXX_aarch64-unknown-linux-musl: musl-g++
|
|
CC_aarch64-unknown-linux-musl: musl-gcc
|
|
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux-musl/lib
|
|
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux-musl/include
|
|
OPENSSL_STATIC: "1"
|
|
|
|
- ${{ if not(parameters.VSCODE_CHECK_ONLY) }}:
|
|
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true) }}:
|
|
- task: 1ES.PublishPipelineArtifact@1
|
|
inputs:
|
|
targetPath: $(Build.ArtifactStagingDirectory)/vscode_cli_alpine_arm64_cli.tar.gz
|
|
artifactName: vscode_cli_alpine_arm64_cli
|
|
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
|
|
sbomPackageName: "VS Code Alpine arm64 CLI"
|
|
sbomPackageVersion: $(Build.SourceVersion)
|
|
displayName: Publish vscode_cli_alpine_arm64_cli artifact
|
|
|
|
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE, true) }}:
|
|
- task: 1ES.PublishPipelineArtifact@1
|
|
inputs:
|
|
targetPath: $(Build.ArtifactStagingDirectory)/vscode_cli_alpine_x64_cli.tar.gz
|
|
artifactName: vscode_cli_alpine_x64_cli
|
|
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
|
|
sbomPackageName: "VS Code Alpine x64 CLI"
|
|
sbomPackageVersion: $(Build.SourceVersion)
|
|
displayName: Publish vscode_cli_alpine_x64_cli artifact
|