mirror of
https://github.com/Microsoft/vscode
synced 2024-10-04 02:14:06 +00:00
Merge branch 'main' into aiday/addingIndentationForIfForWhile
This commit is contained in:
commit
20ef51faea
|
@ -33,7 +33,7 @@ steps:
|
|||
workingDirectory: build
|
||||
displayName: Install pipeline build
|
||||
|
||||
- template: ../cli/cli-apply-patches.yml
|
||||
- template: ../cli/cli-apply-patches.yml@self
|
||||
|
||||
- task: Npm@1
|
||||
displayName: Download openssl prebuilt
|
||||
|
@ -58,7 +58,7 @@ steps:
|
|||
sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++" || echo "link exists"
|
||||
displayName: Install musl build dependencies
|
||||
|
||||
- template: ../cli/install-rust-posix.yml
|
||||
- template: ../cli/install-rust-posix.yml@self
|
||||
parameters:
|
||||
targets:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true) }}:
|
||||
|
@ -67,7 +67,7 @@ steps:
|
|||
- x86_64-unknown-linux-musl
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true) }}:
|
||||
- template: ../cli/cli-compile.yml
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_CLI_TARGET: aarch64-unknown-linux-musl
|
||||
VSCODE_CLI_ARTIFACT: vscode_cli_alpine_arm64_cli
|
||||
|
@ -80,7 +80,7 @@ steps:
|
|||
OPENSSL_STATIC: "1"
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE, true) }}:
|
||||
- template: ../cli/cli-compile.yml
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_CLI_TARGET: x86_64-unknown-linux-musl
|
||||
VSCODE_CLI_ARTIFACT: vscode_cli_alpine_x64_cli
|
||||
|
@ -92,14 +92,23 @@ steps:
|
|||
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) }}:
|
||||
- template: ../cli/cli-publish.yml
|
||||
parameters:
|
||||
VSCODE_CLI_ARTIFACT: vscode_cli_alpine_arm64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
- 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) }}:
|
||||
- template: ../cli/cli-publish.yml
|
||||
parameters:
|
||||
VSCODE_CLI_ARTIFACT: vscode_cli_alpine_x64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
- 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
|
||||
|
|
|
@ -5,7 +5,7 @@ steps:
|
|||
versionFilePath: .nvmrc
|
||||
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
||||
|
||||
- template: ../distro/download-distro.yml
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
|
@ -107,7 +107,7 @@ steps:
|
|||
- script: node build/azure-pipelines/distro/mixin-quality
|
||||
displayName: Mixin distro quality
|
||||
|
||||
- template: ../common/install-builtin-extensions.yml
|
||||
- template: ../common/install-builtin-extensions.yml@self
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
@ -115,8 +115,10 @@ steps:
|
|||
yarn gulp vscode-reh-$TARGET-min-ci
|
||||
(cd .. && mv vscode-reh-$TARGET vscode-server-$TARGET) # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/server/vscode-server-$TARGET.tar.gz"
|
||||
DIR_PATH="$(realpath ../vscode-server-$TARGET)"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-$TARGET
|
||||
echo "##vso[task.setvariable variable=SERVER_DIR_PATH]$DIR_PATH"
|
||||
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
|
@ -128,8 +130,10 @@ steps:
|
|||
yarn gulp vscode-reh-web-$TARGET-min-ci
|
||||
(cd .. && mv vscode-reh-web-$TARGET vscode-server-$TARGET-web) # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/web/vscode-server-$TARGET-web.tar.gz"
|
||||
DIR_PATH="$(realpath ../vscode-server-$TARGET-web)"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-$TARGET-web
|
||||
echo "##vso[task.setvariable variable=WEB_DIR_PATH]$DIR_PATH"
|
||||
echo "##vso[task.setvariable variable=WEB_PATH]$ARCHIVE_PATH"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
|
@ -139,36 +143,40 @@ steps:
|
|||
condition: and(succeededOrFailed(), notIn(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues'))
|
||||
displayName: Generate artifact prefix
|
||||
|
||||
- script: mkdir $(agent.builddirectory)/vscode-alpine-$(VSCODE_ARCH)
|
||||
displayName: Make folder for SBOM
|
||||
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
BuildDropPath: $(agent.builddirectory)/vscode-alpine-$(VSCODE_ARCH)
|
||||
PackageName: Visual Studio Code Server
|
||||
|
||||
- publish: $(agent.builddirectory)/vscode-alpine-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_alpine_$(VSCODE_ARCH)
|
||||
|
||||
- publish: $(SERVER_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_server_alpine_$(VSCODE_ARCH)_archive-unsigned
|
||||
targetPath: $(SERVER_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_server_alpine_$(VSCODE_ARCH)_archive-unsigned
|
||||
sbomBuildDropPath: $(SERVER_DIR_PATH)
|
||||
sbomPackageName: "VS Code Alpine $(VSCODE_ARCH) Server"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish server archive
|
||||
condition: and(succeededOrFailed(), ne(variables['SERVER_PATH'], ''), ne(variables['VSCODE_ARCH'], 'x64'))
|
||||
|
||||
- publish: $(WEB_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_web_alpine_$(VSCODE_ARCH)_archive-unsigned
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(WEB_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_web_alpine_$(VSCODE_ARCH)_archive-unsigned
|
||||
sbomBuildDropPath: $(WEB_DIR_PATH)
|
||||
sbomPackageName: "VS Code Alpine $(VSCODE_ARCH) Web"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish web server archive
|
||||
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''), ne(variables['VSCODE_ARCH'], 'x64'))
|
||||
|
||||
# Legacy x64 artifact name
|
||||
- publish: $(SERVER_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_server_linux_alpine_archive-unsigned
|
||||
# same as above, keep legacy name
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(SERVER_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_server_linux_alpine_archive-unsigned
|
||||
sbomEnabled: false
|
||||
displayName: Publish x64 server archive
|
||||
condition: and(succeededOrFailed(), ne(variables['SERVER_PATH'], ''), eq(variables['VSCODE_ARCH'], 'x64'))
|
||||
|
||||
- publish: $(WEB_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_web_linux_alpine_archive-unsigned
|
||||
# same as above, keep legacy name
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(WEB_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_web_linux_alpine_archive-unsigned
|
||||
sbomEnabled: false
|
||||
displayName: Publish x64 web server archive
|
||||
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''), eq(variables['VSCODE_ARCH'], 'x64'))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
steps:
|
||||
- template: ../distro/download-distro.yml
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- script: node build/azure-pipelines/distro/mixin-quality
|
||||
displayName: Mixin distro quality
|
||||
|
|
|
@ -110,13 +110,14 @@ steps:
|
|||
|
||||
Write-Host "##vso[task.setvariable variable=VSCODE_CLI_APPLICATION_NAME]$env:VSCODE_CLI_APPLICATION_NAME"
|
||||
|
||||
Move-Item -Path $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code.exe -Destination "$(Build.ArtifactStagingDirectory)/${env:VSCODE_CLI_APPLICATION_NAME}.exe"
|
||||
New-Item -ItemType Directory -Force -Path "$(Build.ArtifactStagingDirectory)/cli"
|
||||
Move-Item -Path $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code.exe -Destination "$(Build.ArtifactStagingDirectory)/cli/${env:VSCODE_CLI_APPLICATION_NAME}.exe"
|
||||
displayName: Stage CLI
|
||||
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Archive CLI
|
||||
inputs:
|
||||
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME).exe
|
||||
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/cli/$(VSCODE_CLI_APPLICATION_NAME).exe
|
||||
includeRootFolder: false
|
||||
archiveType: zip
|
||||
archiveFile: $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.zip
|
||||
|
@ -127,43 +128,19 @@ steps:
|
|||
VSCODE_CLI_APPLICATION_NAME=$(node -p "require(\"$VSCODE_CLI_PRODUCT_JSON\").applicationName")
|
||||
echo "##vso[task.setvariable variable=VSCODE_CLI_APPLICATION_NAME]$VSCODE_CLI_APPLICATION_NAME"
|
||||
|
||||
mv $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code $(Build.ArtifactStagingDirectory)/$VSCODE_CLI_APPLICATION_NAME
|
||||
mkdir -p $(Build.ArtifactStagingDirectory)/cli
|
||||
mv $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code $(Build.ArtifactStagingDirectory)/cli/$VSCODE_CLI_APPLICATION_NAME
|
||||
displayName: Stage CLI
|
||||
|
||||
- ${{ if contains(parameters.VSCODE_CLI_TARGET, '-darwin') }}:
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Archive CLI
|
||||
inputs:
|
||||
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME)
|
||||
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/cli/$(VSCODE_CLI_APPLICATION_NAME)
|
||||
includeRootFolder: false
|
||||
${{ if contains(parameters.VSCODE_CLI_TARGET, '-darwin') }}:
|
||||
archiveType: zip
|
||||
archiveFile: $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.zip
|
||||
|
||||
- ${{ else }}:
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Archive CLI
|
||||
inputs:
|
||||
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME)
|
||||
includeRootFolder: false
|
||||
${{ else }}:
|
||||
archiveType: tar
|
||||
tarCompression: gz
|
||||
archiveFile: $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.tar.gz
|
||||
|
||||
# Make a folder for the SBOM for the specific artifact
|
||||
- ${{ if contains(parameters.VSCODE_CLI_TARGET, '-windows-') }}:
|
||||
- powershell: mkdir $(Build.ArtifactStagingDirectory)/sbom_${{ parameters.VSCODE_CLI_ARTIFACT }}
|
||||
displayName: Make folder for SBOM (Windows)
|
||||
|
||||
- ${{ else }}:
|
||||
- script: mkdir $(Build.ArtifactStagingDirectory)/sbom_${{ parameters.VSCODE_CLI_ARTIFACT }}
|
||||
displayName: Make folder for SBOM (non-Windows)
|
||||
|
||||
# The if cases above are for different OSes,
|
||||
# but we're still in the branch where the cli is being published in general.
|
||||
# Generate and publish an SBOM.
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM
|
||||
inputs:
|
||||
BuildComponentPath: $(Build.SourcesDirectory)/cli
|
||||
BuildDropPath: $(Build.ArtifactStagingDirectory)/sbom_${{ parameters.VSCODE_CLI_ARTIFACT }}
|
||||
PackageName: Visual Studio Code CLI
|
||||
|
|
|
@ -26,6 +26,12 @@ steps:
|
|||
artifact: ${{ target }}
|
||||
path: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}
|
||||
|
||||
- task: ExtractFiles@1
|
||||
displayName: Extract artifact
|
||||
inputs:
|
||||
archiveFilePatterns: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}/*.zip
|
||||
destinationFolder: $(Build.ArtifactStagingDirectory)/sign/${{ target }}
|
||||
|
||||
- script: node build/azure-pipelines/common/sign $(Agent.ToolsDirectory)/esrpclient/*/*/net6.0/esrpcli.dll sign-darwin $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(Build.ArtifactStagingDirectory)/pkg "*.zip"
|
||||
displayName: Codesign
|
||||
|
||||
|
@ -40,6 +46,11 @@ steps:
|
|||
echo "##vso[task.setvariable variable=ASSET_ID]$ASSET_ID"
|
||||
displayName: Set asset id variable
|
||||
|
||||
- publish: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}/$(ASSET_ID).zip
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/pkg/${{ target }}/$(ASSET_ID).zip
|
||||
artifactName: $(ASSET_ID)
|
||||
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/sign/${{ target }}
|
||||
sbomPackageName: "VS Code macOS ${{ target }} CLI"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish signed artifact with ID $(ASSET_ID)
|
||||
artifact: $(ASSET_ID)
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
parameters:
|
||||
- name: VSCODE_CLI_ARTIFACT
|
||||
type: string
|
||||
- name: VSCODE_CHECK_ONLY
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
steps:
|
||||
- ${{ if not(parameters.VSCODE_CHECK_ONLY) }}:
|
||||
- ${{ if contains(parameters.VSCODE_CLI_ARTIFACT, 'win32') }}:
|
||||
- publish: $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.zip
|
||||
artifact: ${{ parameters.VSCODE_CLI_ARTIFACT }}
|
||||
displayName: Publish ${{ parameters.VSCODE_CLI_ARTIFACT }} artifact
|
||||
|
||||
- ${{ else }}:
|
||||
- ${{ if contains(parameters.VSCODE_CLI_ARTIFACT, 'darwin') }}:
|
||||
- publish: $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.zip
|
||||
artifact: ${{ parameters.VSCODE_CLI_ARTIFACT }}
|
||||
displayName: Publish ${{ parameters.VSCODE_CLI_ARTIFACT }} artifact
|
||||
|
||||
- ${{ else }}:
|
||||
- publish: $(Build.ArtifactStagingDirectory)/${{ parameters.VSCODE_CLI_ARTIFACT }}.tar.gz
|
||||
artifact: ${{ parameters.VSCODE_CLI_ARTIFACT }}
|
||||
displayName: Publish ${{ parameters.VSCODE_CLI_ARTIFACT }} artifact
|
||||
|
||||
- publish: $(Build.ArtifactStagingDirectory)/sbom_${{ parameters.VSCODE_CLI_ARTIFACT }}/_manifest
|
||||
displayName: Publish SBOM
|
||||
artifact: sbom_${{ parameters.VSCODE_CLI_ARTIFACT }}
|
|
@ -59,6 +59,11 @@ steps:
|
|||
archiveType: zip
|
||||
archiveFile: $(Build.ArtifactStagingDirectory)/$(ASSET_ID).zip
|
||||
|
||||
- publish: $(Build.ArtifactStagingDirectory)/$(ASSET_ID).zip
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/$(ASSET_ID).zip
|
||||
artifactName: $(ASSET_ID)
|
||||
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/sign/${{ target }}
|
||||
sbomPackageName: "VS Code Windows ${{ target }} CLI"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish signed artifact with ID $(ASSET_ID)
|
||||
artifact: $(ASSET_ID)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
steps:
|
||||
- template: ./install-rust-posix.yml
|
||||
- template: ./install-rust-posix.yml@self
|
||||
|
||||
- script: cargo clippy -- -D warnings
|
||||
workingDirectory: cli
|
||||
|
|
|
@ -340,10 +340,11 @@ async function downloadArtifact(artifact, downloadPath) {
|
|||
}
|
||||
async function unzip(packagePath, outputPath) {
|
||||
return new Promise((resolve, reject) => {
|
||||
yauzl.open(packagePath, { lazyEntries: true }, (err, zipfile) => {
|
||||
yauzl.open(packagePath, { lazyEntries: true, autoClose: true }, (err, zipfile) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
const result = [];
|
||||
zipfile.on('entry', entry => {
|
||||
if (/\/$/.test(entry.fileName)) {
|
||||
zipfile.readEntry();
|
||||
|
@ -357,14 +358,15 @@ async function unzip(packagePath, outputPath) {
|
|||
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
||||
const ostream = fs.createWriteStream(filePath);
|
||||
ostream.on('finish', () => {
|
||||
zipfile.close();
|
||||
resolve(filePath);
|
||||
result.push(filePath);
|
||||
zipfile.readEntry();
|
||||
});
|
||||
istream?.on('error', err => reject(err));
|
||||
istream.pipe(ostream);
|
||||
});
|
||||
}
|
||||
});
|
||||
zipfile.on('close', () => resolve(result));
|
||||
zipfile.readEntry();
|
||||
});
|
||||
});
|
||||
|
@ -421,12 +423,12 @@ function getPlatform(product, os, arch, type, isLegacy) {
|
|||
case 'client':
|
||||
return `linux-${arch}`;
|
||||
case 'server':
|
||||
return isLegacy ? `legacy-server-linux-${arch}` : `server-linux-${arch}`;
|
||||
return isLegacy ? `server-linux-legacy-${arch}` : `server-linux-${arch}`;
|
||||
case 'web':
|
||||
if (arch === 'standalone') {
|
||||
return 'web-standalone';
|
||||
}
|
||||
return isLegacy ? `legacy-server-linux-${arch}-web` : `server-linux-${arch}-web`;
|
||||
return isLegacy ? `server-linux-legacy-${arch}-web` : `server-linux-${arch}-web`;
|
||||
default:
|
||||
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
|
||||
}
|
||||
|
@ -495,7 +497,7 @@ async function processArtifact(artifact, artifactFilePath) {
|
|||
const [hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]); // CodeQL [SM04514] Using SHA1 only for legacy reasons, we are actually only respecting SHA256
|
||||
const url = await releaseAndProvision(log, e('RELEASE_TENANT_ID'), e('RELEASE_CLIENT_ID'), e('RELEASE_AUTH_CERT_SUBJECT_NAME'), e('RELEASE_REQUEST_SIGNING_CERT_SUBJECT_NAME'), e('PROVISION_TENANT_ID'), e('PROVISION_AAD_USERNAME'), e('PROVISION_AAD_PASSWORD'), commit, quality, artifactFilePath);
|
||||
const asset = { platform, type, url, hash, sha256hash, size, supportsFastUpdate: true };
|
||||
log('Creating asset...', JSON.stringify(asset));
|
||||
log('Creating asset...', JSON.stringify(asset, undefined, 2));
|
||||
await (0, retry_1.retry)(async (attempt) => {
|
||||
log(`Creating asset in Cosmos DB (attempt ${attempt})...`);
|
||||
const aadCredentials = new identity_1.ClientSecretCredential(e('AZURE_TENANT_ID'), e('AZURE_CLIENT_ID'), e('AZURE_CLIENT_SECRET'));
|
||||
|
@ -572,12 +574,8 @@ async function main() {
|
|||
const downloadSpeedKBS = Math.round((archiveSize / 1024) / downloadDurationS);
|
||||
console.log(`[${artifact.name}] Successfully downloaded after ${Math.floor(downloadDurationS)} seconds(${downloadSpeedKBS} KB/s).`);
|
||||
});
|
||||
const artifactFilePath = await unzip(artifactZipPath, e('AGENT_TEMPDIRECTORY'));
|
||||
const artifactSize = fs.statSync(artifactFilePath).size;
|
||||
if (artifactSize !== Number(artifact.resource.properties.artifactsize)) {
|
||||
console.log(`[${artifact.name}] Artifact size mismatch.Expected ${artifact.resource.properties.artifactsize}. Actual ${artifactSize} `);
|
||||
throw new Error(`Artifact size mismatch.`);
|
||||
}
|
||||
const artifactFilePaths = await unzip(artifactZipPath, e('AGENT_TEMPDIRECTORY'));
|
||||
const artifactFilePath = artifactFilePaths.filter(p => !/_manifest/.test(p))[0];
|
||||
processing.add(artifact.name);
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
const worker = new node_worker_threads_1.Worker(__filename, { workerData: { artifact, artifactFilePath } });
|
||||
|
|
|
@ -483,13 +483,14 @@ async function downloadArtifact(artifact: Artifact, downloadPath: string): Promi
|
|||
}
|
||||
}
|
||||
|
||||
async function unzip(packagePath: string, outputPath: string): Promise<string> {
|
||||
async function unzip(packagePath: string, outputPath: string): Promise<string[]> {
|
||||
return new Promise((resolve, reject) => {
|
||||
yauzl.open(packagePath, { lazyEntries: true }, (err, zipfile) => {
|
||||
yauzl.open(packagePath, { lazyEntries: true, autoClose: true }, (err, zipfile) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
const result: string[] = [];
|
||||
zipfile!.on('entry', entry => {
|
||||
if (/\/$/.test(entry.fileName)) {
|
||||
zipfile!.readEntry();
|
||||
|
@ -504,8 +505,8 @@ async function unzip(packagePath: string, outputPath: string): Promise<string> {
|
|||
|
||||
const ostream = fs.createWriteStream(filePath);
|
||||
ostream.on('finish', () => {
|
||||
zipfile!.close();
|
||||
resolve(filePath);
|
||||
result.push(filePath);
|
||||
zipfile!.readEntry();
|
||||
});
|
||||
istream?.on('error', err => reject(err));
|
||||
istream!.pipe(ostream);
|
||||
|
@ -513,6 +514,7 @@ async function unzip(packagePath: string, outputPath: string): Promise<string> {
|
|||
}
|
||||
});
|
||||
|
||||
zipfile!.on('close', () => resolve(result));
|
||||
zipfile!.readEntry();
|
||||
});
|
||||
});
|
||||
|
@ -582,12 +584,12 @@ function getPlatform(product: string, os: string, arch: string, type: string, is
|
|||
case 'client':
|
||||
return `linux-${arch}`;
|
||||
case 'server':
|
||||
return isLegacy ? `legacy-server-linux-${arch}` : `server-linux-${arch}`;
|
||||
return isLegacy ? `server-linux-legacy-${arch}` : `server-linux-${arch}`;
|
||||
case 'web':
|
||||
if (arch === 'standalone') {
|
||||
return 'web-standalone';
|
||||
}
|
||||
return isLegacy ? `legacy-server-linux-${arch}-web` : `server-linux-${arch}-web`;
|
||||
return isLegacy ? `server-linux-legacy-${arch}-web` : `server-linux-${arch}-web`;
|
||||
default:
|
||||
throw new Error(`Unrecognized: ${product} ${os} ${arch} ${type}`);
|
||||
}
|
||||
|
@ -674,7 +676,7 @@ async function processArtifact(artifact: Artifact, artifactFilePath: string): Pr
|
|||
);
|
||||
|
||||
const asset: Asset = { platform, type, url, hash, sha256hash, size, supportsFastUpdate: true };
|
||||
log('Creating asset...', JSON.stringify(asset));
|
||||
log('Creating asset...', JSON.stringify(asset, undefined, 2));
|
||||
|
||||
await retry(async (attempt) => {
|
||||
log(`Creating asset in Cosmos DB (attempt ${attempt})...`);
|
||||
|
@ -752,13 +754,8 @@ async function main() {
|
|||
console.log(`[${artifact.name}] Successfully downloaded after ${Math.floor(downloadDurationS)} seconds(${downloadSpeedKBS} KB/s).`);
|
||||
});
|
||||
|
||||
const artifactFilePath = await unzip(artifactZipPath, e('AGENT_TEMPDIRECTORY'));
|
||||
const artifactSize = fs.statSync(artifactFilePath).size;
|
||||
|
||||
if (artifactSize !== Number(artifact.resource.properties.artifactsize)) {
|
||||
console.log(`[${artifact.name}] Artifact size mismatch.Expected ${artifact.resource.properties.artifactsize}. Actual ${artifactSize} `);
|
||||
throw new Error(`Artifact size mismatch.`);
|
||||
}
|
||||
const artifactFilePaths = await unzip(artifactZipPath, e('AGENT_TEMPDIRECTORY'));
|
||||
const artifactFilePath = artifactFilePaths.filter(p => !/_manifest/.test(p))[0];
|
||||
|
||||
processing.add(artifact.name);
|
||||
const promise = new Promise<void>((resolve, reject) => {
|
||||
|
|
|
@ -3,9 +3,36 @@
|
|||
"suppressions": [
|
||||
{
|
||||
"file": [
|
||||
"src/vs/base/test/common/uri.test.ts"
|
||||
"src/vs/base/test/common/uri.test.ts",
|
||||
"src/vs/workbench/api/test/browser/extHostTelemetry.test.ts"
|
||||
],
|
||||
"_justification": "These are not passwords, they are URIs."
|
||||
"_justification": "These are dummy credentials in tests."
|
||||
},
|
||||
{
|
||||
"file": [
|
||||
".build/web/extensions/github-authentication/dist/browser/extension.js",
|
||||
".build/web/extensions/emmet/dist/browser/emmetBrowserMain.js.map",
|
||||
".build/web/extensions/emmet/dist/browser/emmetBrowserMain.js",
|
||||
".build/linux/rpm/x86_64/rpmbuild/BUILD/usr/share/code-insiders/resources/app/extensions/github-authentication/dist/extension.js",
|
||||
".build/linux/rpm/x86_64/rpmbuild/BUILD/usr/share/code-insiders/resources/app/extensions/emmet/dist/node/emmetNodeMain.js",
|
||||
".build/linux/rpm/armv7hl/rpmbuild/BUILD/usr/share/code-insiders/resources/app/extensions/github-authentication/dist/extension.js",
|
||||
".build/linux/rpm/armv7hl/rpmbuild/BUILD/usr/share/code-insiders/resources/app/extensions/emmet/dist/node/emmetNodeMain.js",
|
||||
".build/linux/rpm/aarch64/rpmbuild/BUILD/usr/share/code-insiders/resources/app/extensions/github-authentication/dist/extension.js",
|
||||
".build/linux/rpm/aarch64/rpmbuild/BUILD/usr/share/code-insiders/resources/app/extensions/emmet/dist/node/emmetNodeMain.js",
|
||||
".build/linux/snap/x64/code-insiders-x64/usr/share/code-insiders/resources/app/extensions/github-authentication/dist/extension.js",
|
||||
".build/linux/snap/x64/code-insiders-x64/usr/share/code-insiders/resources/app/extensions/emmet/dist/node/emmetNodeMain.js",
|
||||
".build/linux/snap/x64/code-insiders-x64/stage/usr/share/code-insiders/resources/app/extensions/github-authentication/dist/extension.js",
|
||||
".build/linux/snap/x64/code-insiders-x64/stage/usr/share/code-insiders/resources/app/extensions/emmet/dist/node/emmetNodeMain.js",
|
||||
".build/linux/snap/x64/code-insiders-x64/prime/usr/share/code-insiders/resources/app/extensions/github-authentication/dist/extension.js",
|
||||
".build/linux/snap/x64/code-insiders-x64/prime/usr/share/code-insiders/resources/app/extensions/emmet/dist/node/emmetNodeMain.js",
|
||||
".build/linux/snap/x64/code-insiders-x64/parts/code/build/usr/share/code-insiders/resources/app/extensions/github-authentication/dist/extension.js",
|
||||
".build/linux/snap/x64/code-insiders-x64/parts/code/install/usr/share/code-insiders/resources/app/extensions/github-authentication/dist/extension.js",
|
||||
".build/linux/snap/x64/code-insiders-x64/parts/code/src/usr/share/code-insiders/resources/app/extensions/github-authentication/dist/extension.js",
|
||||
".build/linux/snap/x64/code-insiders-x64/parts/code/build/usr/share/code-insiders/resources/app/extensions/emmet/dist/node/emmetNodeMain.js",
|
||||
".build/linux/snap/x64/code-insiders-x64/parts/code/install/usr/share/code-insiders/resources/app/extensions/emmet/dist/node/emmetNodeMain.js",
|
||||
".build/linux/snap/x64/code-insiders-x64/parts/code/src/usr/share/code-insiders/resources/app/extensions/emmet/dist/node/emmetNodeMain.js"
|
||||
],
|
||||
"_justification": "These are safe to ignore, since they are built artifacts."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"codebaseName": "devdiv_vscode-client",
|
||||
"ppe": false,
|
||||
"notificationAliases": [
|
||||
"sbatten@microsoft.com"
|
||||
],
|
||||
"codebaseAdmins": [
|
||||
"REDMOND\\stbatt",
|
||||
"REDMOND\\monacotools"
|
||||
],
|
||||
"instanceUrl": "https://devdiv.visualstudio.com/defaultcollection",
|
||||
"projectName": "DevDiv",
|
||||
"areaPath": "DevDiv\\VS Code (compliance tracking only)\\Visual Studio Code Client",
|
||||
"notifyAlways": true,
|
||||
"template": "TFSDEVDIV",
|
||||
"tools": [
|
||||
"BinSkim",
|
||||
"CredScan",
|
||||
"CodeQL"
|
||||
]
|
||||
}
|
|
@ -19,7 +19,7 @@ steps:
|
|||
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../cli/cli-apply-patches.yml
|
||||
- template: ../cli/cli-apply-patches.yml@self
|
||||
|
||||
- task: Npm@1
|
||||
displayName: Download openssl prebuilt
|
||||
|
@ -36,7 +36,7 @@ steps:
|
|||
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.11.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
|
||||
displayName: Extract openssl prebuilt
|
||||
|
||||
- template: ../cli/install-rust-posix.yml
|
||||
- template: ../cli/install-rust-posix.yml@self
|
||||
parameters:
|
||||
targets:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}:
|
||||
|
@ -45,7 +45,7 @@ steps:
|
|||
- aarch64-apple-darwin
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}:
|
||||
- template: ../cli/cli-compile.yml
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: x86_64-apple-darwin
|
||||
|
@ -56,7 +56,7 @@ steps:
|
|||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-osx/include
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_MACOS_ARM64, true) }}:
|
||||
- template: ../cli/cli-compile.yml
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: aarch64-apple-darwin
|
||||
|
@ -66,14 +66,23 @@ steps:
|
|||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-osx/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-osx/include
|
||||
|
||||
- ${{ if not(parameters.VSCODE_CHECK_ONLY) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}:
|
||||
- template: ../cli/cli-publish.yml
|
||||
parameters:
|
||||
VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_darwin_x64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/unsigned_vscode_cli_darwin_x64_cli.zip
|
||||
artifactName: unsigned_vscode_cli_darwin_x64_cli
|
||||
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
|
||||
sbomPackageName: "VS Code macOS x64 CLI (unsigned)"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish unsigned_vscode_cli_darwin_x64_cli artifact
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_MACOS_ARM64, true) }}:
|
||||
- template: ../cli/cli-publish.yml
|
||||
parameters:
|
||||
VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_darwin_arm64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/unsigned_vscode_cli_darwin_arm64_cli.zip
|
||||
artifactName: unsigned_vscode_cli_darwin_arm64_cli
|
||||
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
|
||||
sbomPackageName: "VS Code macOS arm64 CLI (unsigned)"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish unsigned_vscode_cli_darwin_arm64_cli artifact
|
||||
|
|
|
@ -46,7 +46,7 @@ steps:
|
|||
workingDirectory: build
|
||||
displayName: Install build dependencies
|
||||
|
||||
- template: ../cli/cli-darwin-sign.yml
|
||||
- template: ../cli/cli-darwin-sign.yml@self
|
||||
parameters:
|
||||
VSCODE_CLI_ARTIFACTS:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}:
|
||||
|
|
|
@ -32,7 +32,6 @@ steps:
|
|||
|
||||
- script: unzip $(Pipeline.Workspace)/unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive/VSCode-darwin-$(VSCODE_ARCH).zip -d $(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH)
|
||||
displayName: Extract signed app
|
||||
condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
@ -58,5 +57,11 @@ steps:
|
|||
displayName: Rename x64 build to its legacy name
|
||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
|
||||
|
||||
- publish: $(Pipeline.Workspace)/unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive/VSCode-$(ASSET_ID).zip
|
||||
artifact: vscode_client_darwin_$(VSCODE_ARCH)_archive
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Pipeline.Workspace)/unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive/VSCode-$(ASSET_ID).zip
|
||||
artifactName: vscode_client_darwin_$(VSCODE_ARCH)_archive
|
||||
sbomBuildDropPath: $(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH)
|
||||
sbomPackageName: "VS Code macOS $(VSCODE_ARCH)"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish client archive
|
||||
|
|
|
@ -155,7 +155,7 @@ steps:
|
|||
condition: succeededOrFailed()
|
||||
|
||||
- ${{ if or(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
|
||||
- task: PublishPipelineArtifact@0
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: .build/crashes
|
||||
${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
|
||||
|
@ -164,13 +164,14 @@ steps:
|
|||
artifactName: crash-dump-macos-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
|
||||
${{ else }}:
|
||||
artifactName: crash-dump-macos-$(VSCODE_ARCH)-$(System.JobAttempt)
|
||||
sbomEnabled: false
|
||||
displayName: "Publish Crash Reports"
|
||||
continueOnError: true
|
||||
condition: failed()
|
||||
|
||||
# In order to properly symbolify above crash reports
|
||||
# (if any), we need the compiled native modules too
|
||||
- task: PublishPipelineArtifact@0
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: node_modules
|
||||
${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
|
||||
|
@ -179,11 +180,12 @@ steps:
|
|||
artifactName: node-modules-macos-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
|
||||
${{ else }}:
|
||||
artifactName: node-modules-macos-$(VSCODE_ARCH)-$(System.JobAttempt)
|
||||
sbomEnabled: false
|
||||
displayName: "Publish Node Modules"
|
||||
continueOnError: true
|
||||
condition: failed()
|
||||
|
||||
- task: PublishPipelineArtifact@0
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: .build/logs
|
||||
${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
|
||||
|
@ -192,6 +194,7 @@ steps:
|
|||
artifactName: logs-macos-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
|
||||
${{ else }}:
|
||||
artifactName: logs-macos-$(VSCODE_ARCH)-$(System.JobAttempt)
|
||||
sbomEnabled: false
|
||||
displayName: "Publish Log Files"
|
||||
continueOnError: true
|
||||
condition: succeededOrFailed()
|
||||
|
|
|
@ -5,7 +5,7 @@ steps:
|
|||
versionFilePath: .nvmrc
|
||||
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
||||
|
||||
- template: ../distro/download-distro.yml
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
|
@ -82,6 +82,11 @@ steps:
|
|||
- script: pushd $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH) && zip -r -X -y $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH).zip * && popd
|
||||
displayName: Archive build
|
||||
|
||||
- publish: $(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH).zip
|
||||
artifact: unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH).zip
|
||||
artifactName: unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive
|
||||
sbomBuildDropPath: $(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH)
|
||||
sbomPackageName: "VS Code macOS $(VSCODE_ARCH) (unsigned)"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish client archive
|
||||
|
|
|
@ -23,7 +23,7 @@ steps:
|
|||
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../distro/download-distro.yml
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
|
@ -114,7 +114,7 @@ steps:
|
|||
- script: node build/azure-pipelines/distro/mixin-quality
|
||||
displayName: Mixin distro quality
|
||||
|
||||
- template: ../common/install-builtin-extensions.yml
|
||||
- template: ../common/install-builtin-extensions.yml@self
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: |
|
||||
|
@ -156,7 +156,7 @@ steps:
|
|||
displayName: Transpile
|
||||
|
||||
- ${{ if or(eq(parameters.VSCODE_RUN_UNIT_TESTS, true), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
|
||||
- template: product-build-darwin-test.yml
|
||||
- template: product-build-darwin-test.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_RUN_UNIT_TESTS: ${{ parameters.VSCODE_RUN_UNIT_TESTS }}
|
||||
|
@ -176,8 +176,7 @@ steps:
|
|||
APP_ROOT="$(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH)"
|
||||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
||||
APP_PATH="$APP_ROOT/$APP_NAME"
|
||||
ARCHIVE_NAME=$(ls "$(Build.ArtifactStagingDirectory)/cli" | head -n 1)
|
||||
unzip "$(Build.ArtifactStagingDirectory)/cli/$ARCHIVE_NAME" -d "$(Build.ArtifactStagingDirectory)/cli"
|
||||
unzip $(Build.ArtifactStagingDirectory)/cli/*.zip -d $(Build.ArtifactStagingDirectory)/cli
|
||||
CLI_APP_NAME=$(node -p "require(\"$APP_PATH/Contents/Resources/app/product.json\").tunnelApplicationName")
|
||||
APP_NAME=$(node -p "require(\"$APP_PATH/Contents/Resources/app/product.json\").applicationName")
|
||||
mv "$(Build.ArtifactStagingDirectory)/cli/$APP_NAME" "$APP_PATH/Contents/Resources/app/bin/$CLI_APP_NAME"
|
||||
|
@ -212,38 +211,31 @@ steps:
|
|||
condition: and(succeededOrFailed(), notIn(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues'))
|
||||
displayName: Generate artifact prefix
|
||||
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM (client)
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
BuildDropPath: $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
|
||||
PackageName: Visual Studio Code
|
||||
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM (server)
|
||||
inputs:
|
||||
BuildComponentPath: $(Build.SourcesDirectory)/remote
|
||||
BuildDropPath: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
|
||||
PackageName: Visual Studio Code Server
|
||||
|
||||
- publish: $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM (client)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_client_darwin_$(VSCODE_ARCH)
|
||||
|
||||
- publish: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM (server)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_server_darwin_$(VSCODE_ARCH)
|
||||
|
||||
- publish: $(CLIENT_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive
|
||||
condition: and(succeededOrFailed(), ne(variables['CLIENT_PATH'], ''))
|
||||
targetPath: $(CLIENT_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive
|
||||
sbomBuildDropPath: $(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH)
|
||||
sbomPackageName: "VS Code macOS $(VSCODE_ARCH) (unsigned)"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish client archive
|
||||
|
||||
- publish: $(SERVER_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_server_darwin_$(VSCODE_ARCH)_archive-unsigned
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(SERVER_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_server_darwin_$(VSCODE_ARCH)_archive-unsigned
|
||||
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-darwin-$(VSCODE_ARCH)
|
||||
sbomPackageName: "VS Code macOS $(VSCODE_ARCH) Server"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['SERVER_PATH'], ''))
|
||||
displayName: Publish server archive
|
||||
|
||||
- publish: $(WEB_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_web_darwin_$(VSCODE_ARCH)_archive-unsigned
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(WEB_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_web_darwin_$(VSCODE_ARCH)_archive-unsigned
|
||||
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web
|
||||
sbomPackageName: "VS Code macOS $(VSCODE_ARCH) Web"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''))
|
||||
displayName: Publish web server archive
|
||||
|
|
|
@ -12,4 +12,4 @@ steps:
|
|||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
||||
- template: ./distro/download-distro.yml
|
||||
- template: ./distro/download-distro.yml@self
|
||||
|
|
|
@ -22,7 +22,7 @@ steps:
|
|||
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../cli/cli-apply-patches.yml
|
||||
- template: ../cli/cli-apply-patches.yml@self
|
||||
|
||||
- task: Npm@1
|
||||
displayName: Download openssl prebuilt
|
||||
|
@ -79,7 +79,7 @@ steps:
|
|||
mkdir -p $(Build.SourcesDirectory)/.build
|
||||
displayName: Create .build folder for misc dependencies
|
||||
|
||||
- template: ../cli/install-rust-posix.yml
|
||||
- template: ../cli/install-rust-posix.yml@self
|
||||
parameters:
|
||||
targets:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64, true) }}:
|
||||
|
@ -90,7 +90,7 @@ steps:
|
|||
- armv7-unknown-linux-gnueabihf
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64, true) }}:
|
||||
- template: ../cli/cli-compile.yml
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: aarch64-unknown-linux-gnu
|
||||
|
@ -102,7 +102,7 @@ steps:
|
|||
SYSROOT_ARCH: arm64
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX, true) }}:
|
||||
- template: ../cli/cli-compile.yml
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: x86_64-unknown-linux-gnu
|
||||
|
@ -114,7 +114,7 @@ steps:
|
|||
SYSROOT_ARCH: amd64
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true) }}:
|
||||
- template: ../cli/cli-compile.yml
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: armv7-unknown-linux-gnueabihf
|
||||
|
@ -125,20 +125,33 @@ steps:
|
|||
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: ../cli/cli-publish.yml
|
||||
parameters:
|
||||
VSCODE_CLI_ARTIFACT: vscode_cli_linux_armhf_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/vscode_cli_linux_armhf_cli.tar.gz
|
||||
artifactName: vscode_cli_linux_armhf_cli
|
||||
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
|
||||
sbomPackageName: "VS Code Linux armhf CLI"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish vscode_cli_linux_armhf_cli artifact
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX, true) }}:
|
||||
- template: ../cli/cli-publish.yml
|
||||
parameters:
|
||||
VSCODE_CLI_ARTIFACT: vscode_cli_linux_x64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/vscode_cli_linux_x64_cli.tar.gz
|
||||
artifactName: vscode_cli_linux_x64_cli
|
||||
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
|
||||
sbomPackageName: "VS Code Linux x64 CLI"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish vscode_cli_linux_x64_cli artifact
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64, true) }}:
|
||||
- template: ../cli/cli-publish.yml
|
||||
parameters:
|
||||
VSCODE_CLI_ARTIFACT: vscode_cli_linux_arm64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/vscode_cli_linux_arm64_cli.tar.gz
|
||||
artifactName: vscode_cli_linux_arm64_cli
|
||||
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
|
||||
sbomPackageName: "VS Code Linux arm64 CLI"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish vscode_cli_linux_arm64_cli artifact
|
||||
|
|
|
@ -174,7 +174,7 @@ steps:
|
|||
ARCHIVE_PATH=".build/linux/server/legacy-vscode-server-linux-$(VSCODE_ARCH).tar.gz"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)
|
||||
echo "##vso[task.setvariable variable=LEGACY_SERVER_PATH]$ARCHIVE_PATH"
|
||||
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build server
|
||||
|
@ -187,7 +187,7 @@ steps:
|
|||
ARCHIVE_PATH=".build/linux/web/legacy-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=LEGACY_WEB_PATH]$ARCHIVE_PATH"
|
||||
echo "##vso[task.setvariable variable=WEB_PATH]$ARCHIVE_PATH"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build server (web)
|
||||
|
@ -199,24 +199,25 @@ steps:
|
|||
VSCODE_RUN_UNIT_TESTS: false
|
||||
VSCODE_RUN_INTEGRATION_TESTS: ${{ parameters.VSCODE_RUN_INTEGRATION_TESTS }}
|
||||
VSCODE_RUN_SMOKE_TESTS: false
|
||||
${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
PUBLISH_TASK_NAME: 1ES.PublishPipelineArtifact@1
|
||||
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM (server)
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
BuildComponentPath: $(Build.SourcesDirectory)/remote
|
||||
BuildDropPath: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
||||
PackageName: Legacy Visual Studio Code Server
|
||||
|
||||
- publish: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM (server)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_legacy_server_linux_$(VSCODE_ARCH)
|
||||
|
||||
- publish: $(LEGACY_SERVER_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_legacy_server_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
condition: and(succeededOrFailed(), ne(variables['LEGACY_SERVER_PATH'], ''))
|
||||
targetPath: $(SERVER_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_legacy_server_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) Legacy Server"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['SERVER_PATH'], ''))
|
||||
displayName: Publish server archive
|
||||
|
||||
- publish: $(LEGACY_WEB_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_legacy_web_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
condition: and(succeededOrFailed(), ne(variables['LEGACY_WEB_PATH'], ''))
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(WEB_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_legacy_web_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) Legacy Web"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''))
|
||||
displayName: Publish web server archive
|
||||
|
|
|
@ -7,6 +7,9 @@ parameters:
|
|||
type: boolean
|
||||
- name: VSCODE_RUN_SMOKE_TESTS
|
||||
type: boolean
|
||||
- name: PUBLISH_TASK_NAME
|
||||
type: string
|
||||
default: PublishPipelineArtifact@0
|
||||
|
||||
steps:
|
||||
- script: yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
|
||||
|
@ -197,7 +200,7 @@ steps:
|
|||
condition: succeededOrFailed()
|
||||
|
||||
- ${{ if or(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
|
||||
- task: PublishPipelineArtifact@0
|
||||
- task: ${{ parameters.PUBLISH_TASK_NAME }}
|
||||
inputs:
|
||||
targetPath: .build/crashes
|
||||
${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
|
||||
|
@ -206,13 +209,14 @@ steps:
|
|||
artifactName: crash-dump-linux-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
|
||||
${{ else }}:
|
||||
artifactName: crash-dump-linux-$(VSCODE_ARCH)-$(System.JobAttempt)
|
||||
sbomEnabled: false
|
||||
displayName: "Publish Crash Reports"
|
||||
continueOnError: true
|
||||
condition: failed()
|
||||
|
||||
# In order to properly symbolify above crash reports
|
||||
# (if any), we need the compiled native modules too
|
||||
- task: PublishPipelineArtifact@0
|
||||
- task: ${{ parameters.PUBLISH_TASK_NAME }}
|
||||
inputs:
|
||||
targetPath: node_modules
|
||||
${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
|
||||
|
@ -221,11 +225,12 @@ steps:
|
|||
artifactName: node-modules-linux-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
|
||||
${{ else }}:
|
||||
artifactName: node-modules-linux-$(VSCODE_ARCH)-$(System.JobAttempt)
|
||||
sbomEnabled: false
|
||||
displayName: "Publish Node Modules"
|
||||
continueOnError: true
|
||||
condition: failed()
|
||||
|
||||
- task: PublishPipelineArtifact@0
|
||||
- task: ${{ parameters.PUBLISH_TASK_NAME }}
|
||||
inputs:
|
||||
targetPath: .build/logs
|
||||
${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
|
||||
|
@ -234,6 +239,7 @@ steps:
|
|||
artifactName: logs-linux-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
|
||||
${{ else }}:
|
||||
artifactName: logs-linux-$(VSCODE_ARCH)-$(System.JobAttempt)
|
||||
sbomEnabled: false
|
||||
displayName: "Publish Log Files"
|
||||
continueOnError: true
|
||||
condition: succeededOrFailed()
|
||||
|
|
|
@ -25,7 +25,7 @@ steps:
|
|||
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../distro/download-distro.yml
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
|
@ -185,7 +185,7 @@ steps:
|
|||
- script: node build/azure-pipelines/distro/mixin-quality
|
||||
displayName: Mixin distro quality
|
||||
|
||||
- template: ../common/install-builtin-extensions.yml
|
||||
- template: ../common/install-builtin-extensions.yml@self
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: |
|
||||
|
@ -223,7 +223,6 @@ steps:
|
|||
|
||||
- script: |
|
||||
set -e
|
||||
export VSCODE_NODE_GLIBC='-glibc-2.17'
|
||||
yarn 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"
|
||||
|
@ -236,7 +235,6 @@ steps:
|
|||
|
||||
- script: |
|
||||
set -e
|
||||
export VSCODE_NODE_GLIBC='-glibc-2.17'
|
||||
yarn 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"
|
||||
|
@ -254,12 +252,14 @@ steps:
|
|||
displayName: Transpile client and extensions
|
||||
|
||||
- ${{ if or(eq(parameters.VSCODE_RUN_UNIT_TESTS, true), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
|
||||
- template: product-build-linux-test.yml
|
||||
- template: product-build-linux-test.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_RUN_UNIT_TESTS: ${{ parameters.VSCODE_RUN_UNIT_TESTS }}
|
||||
VSCODE_RUN_INTEGRATION_TESTS: ${{ parameters.VSCODE_RUN_INTEGRATION_TESTS }}
|
||||
VSCODE_RUN_SMOKE_TESTS: ${{ parameters.VSCODE_RUN_SMOKE_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')) }}:
|
||||
- script: |
|
||||
|
@ -313,53 +313,60 @@ steps:
|
|||
condition: and(succeededOrFailed(), notIn(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues'))
|
||||
displayName: Generate artifact prefix
|
||||
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM (client)
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
BuildDropPath: $(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||
PackageName: Visual Studio Code
|
||||
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM (server)
|
||||
inputs:
|
||||
BuildComponentPath: $(Build.SourcesDirectory)/remote
|
||||
BuildDropPath: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
|
||||
PackageName: Visual Studio Code Server
|
||||
|
||||
- publish: $(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM (client)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_client_linux_$(VSCODE_ARCH)
|
||||
|
||||
- publish: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM (server)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_server_linux_$(VSCODE_ARCH)
|
||||
|
||||
- publish: $(CLIENT_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_client_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
targetPath: $(CLIENT_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_client_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
sbomBuildDropPath: $(Agent.BuildDirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) (unsigned)"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['CLIENT_PATH'], ''))
|
||||
displayName: Publish client archive
|
||||
|
||||
- publish: $(SERVER_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_server_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(SERVER_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_server_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
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'], ''))
|
||||
displayName: Publish server archive
|
||||
|
||||
- publish: $(WEB_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_web_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(WEB_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_web_linux_$(VSCODE_ARCH)_archive-unsigned
|
||||
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'], ''))
|
||||
displayName: Publish web server archive
|
||||
|
||||
- publish: $(DEB_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_client_linux_$(VSCODE_ARCH)_deb-package
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(DEB_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_client_linux_$(VSCODE_ARCH)_deb-package
|
||||
sbomBuildDropPath: .build/linux/deb
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) DEB"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['DEB_PATH'], ''))
|
||||
displayName: Publish deb package
|
||||
|
||||
- publish: $(RPM_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_client_linux_$(VSCODE_ARCH)_rpm-package
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(RPM_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_client_linux_$(VSCODE_ARCH)_rpm-package
|
||||
sbomBuildDropPath: .build/linux/rpm
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) RPM"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['RPM_PATH'], ''))
|
||||
displayName: Publish rpm package
|
||||
|
||||
- publish: $(SNAP_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)snap-$(VSCODE_ARCH)
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(SNAP_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)snap-$(VSCODE_ARCH)
|
||||
sbomEnabled: false
|
||||
condition: and(succeededOrFailed(), ne(variables['SNAP_PATH'], ''))
|
||||
displayName: Publish snap pre-package
|
||||
|
|
|
@ -46,24 +46,28 @@ steps:
|
|||
*) SNAPCRAFT_TARGET_ARGS="--target-arch $(VSCODE_ARCH)" ;;
|
||||
esac
|
||||
(cd $SNAP_ROOT/code-* && sudo --preserve-env snapcraft snap $SNAPCRAFT_TARGET_ARGS --output "$SNAP_PATH")
|
||||
|
||||
# Export SNAP_PATH
|
||||
echo "##vso[task.setvariable variable=SNAP_PATH]$SNAP_PATH"
|
||||
displayName: Prepare for publish
|
||||
|
||||
- script: mkdir -p $(agent.builddirectory)/vscode-snap-linux-$(VSCODE_ARCH)
|
||||
displayName: Make folder for SBOM
|
||||
- script: |
|
||||
set -e
|
||||
SNAP_ROOT="$(pwd)/.build/linux/snap/$(VSCODE_ARCH)"
|
||||
SNAP_EXTRACTED_PATH=$(find $SNAP_ROOT -maxdepth 1 -type d -name 'code-*')
|
||||
SNAP_PATH=$(find $SNAP_ROOT -maxdepth 1 -type f -name '*.snap')
|
||||
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM
|
||||
# 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]$SNAP_PATH"
|
||||
target:
|
||||
container: host
|
||||
displayName: Find host snap path & prepare for SBOM
|
||||
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
BuildDropPath: $(agent.builddirectory)/vscode-snap-linux-$(VSCODE_ARCH)
|
||||
PackageName: Visual Studio Code Snap
|
||||
|
||||
- publish: $(agent.builddirectory)/vscode-snap-linux-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_client_linux_snap_$(VSCODE_ARCH)
|
||||
|
||||
- publish: $(SNAP_PATH)
|
||||
artifact: vscode_client_linux_$(VSCODE_ARCH)_snap
|
||||
targetPath: $(SNAP_PATH)
|
||||
artifactName: vscode_client_linux_$(VSCODE_ARCH)_snap
|
||||
sbomBuildDropPath: $(SNAP_EXTRACTED_PATH)
|
||||
sbomPackageName: "VS Code Linux $(VSCODE_ARCH) SNAP"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish snap package
|
||||
|
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: product-compile.yml
|
||||
- template: product-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
||||
|
@ -44,7 +44,7 @@ jobs:
|
|||
NPM_ARCH: x64
|
||||
DISPLAY: ":10"
|
||||
steps:
|
||||
- template: linux/product-build-linux.yml
|
||||
- template: linux/product-build-linux.yml@self
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -62,7 +62,7 @@ jobs:
|
|||
NPM_ARCH: x64
|
||||
DISPLAY: ":10"
|
||||
steps:
|
||||
- template: linux/product-build-linux.yml
|
||||
- template: linux/product-build-linux.yml@self
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -80,7 +80,7 @@ jobs:
|
|||
NPM_ARCH: x64
|
||||
DISPLAY: ":10"
|
||||
steps:
|
||||
- template: linux/product-build-linux.yml
|
||||
- template: linux/product-build-linux.yml@self
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -94,7 +94,7 @@ jobs:
|
|||
pool: 1es-oss-ubuntu-20.04-x64
|
||||
timeoutInMinutes: 30
|
||||
steps:
|
||||
- template: cli/test.yml
|
||||
- template: cli/test.yml@self
|
||||
|
||||
- job: Windowsx64UnitTests
|
||||
displayName: Windows (Unit Tests)
|
||||
|
@ -104,7 +104,7 @@ jobs:
|
|||
VSCODE_ARCH: x64
|
||||
NPM_ARCH: x64
|
||||
steps:
|
||||
- template: win32/product-build-win32.yml
|
||||
- template: win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_ARCH: x64
|
||||
|
@ -121,7 +121,7 @@ jobs:
|
|||
VSCODE_ARCH: x64
|
||||
NPM_ARCH: x64
|
||||
steps:
|
||||
- template: win32/product-build-win32.yml
|
||||
- template: win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_ARCH: x64
|
||||
|
@ -138,7 +138,7 @@ jobs:
|
|||
# VSCODE_ARCH: x64
|
||||
# NPM_ARCH: x64
|
||||
# steps:
|
||||
# - template: win32/product-build-win32.yml
|
||||
# - template: win32/product-build-win32.yml@self
|
||||
# parameters:
|
||||
# VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
# VSCODE_ARCH: x64
|
||||
|
@ -154,7 +154,7 @@ jobs:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: oss/product-build-pr-cache-linux.yml
|
||||
- template: oss/product-build-pr-cache-linux.yml@self
|
||||
|
||||
- job: Windowsx64MaintainNodeModulesCache
|
||||
displayName: Windows (Maintain node_modules cache)
|
||||
|
@ -163,7 +163,7 @@ jobs:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: oss/product-build-pr-cache-win32.yml
|
||||
- template: oss/product-build-pr-cache-win32.yml@self
|
||||
|
||||
# - job: macOSUnitTest
|
||||
# displayName: macOS (Unit Tests)
|
||||
|
@ -174,7 +174,7 @@ jobs:
|
|||
# BUILDSECMON_OPT_IN: true
|
||||
# VSCODE_ARCH: x64
|
||||
# steps:
|
||||
# - template: darwin/product-build-darwin.yml
|
||||
# - template: darwin/product-build-darwin.yml@self
|
||||
# parameters:
|
||||
# VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
# VSCODE_RUN_UNIT_TESTS: true
|
||||
|
@ -189,7 +189,7 @@ jobs:
|
|||
# BUILDSECMON_OPT_IN: true
|
||||
# VSCODE_ARCH: x64
|
||||
# steps:
|
||||
# - template: darwin/product-build-darwin.yml
|
||||
# - template: darwin/product-build-darwin.yml@self
|
||||
# parameters:
|
||||
# VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
# VSCODE_RUN_UNIT_TESTS: false
|
||||
|
@ -204,7 +204,7 @@ jobs:
|
|||
# BUILDSECMON_OPT_IN: true
|
||||
# VSCODE_ARCH: x64
|
||||
# steps:
|
||||
# - template: darwin/product-build-darwin.yml
|
||||
# - template: darwin/product-build-darwin.yml@self
|
||||
# parameters:
|
||||
# VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
# VSCODE_RUN_UNIT_TESTS: false
|
||||
|
|
|
@ -156,24 +156,54 @@ variables:
|
|||
name: "$(Date:yyyyMMdd).$(Rev:r) (${{ parameters.VSCODE_QUALITY }})"
|
||||
|
||||
resources:
|
||||
containers:
|
||||
- container: snapcraft
|
||||
image: vscodehub.azurecr.io/vscode-linux-build-agent:snapcraft-x64
|
||||
endpoint: VSCodeHub
|
||||
pipelines:
|
||||
- pipeline: vscode-7pm-kick-off
|
||||
source: 'VS Code 7PM Kick-Off'
|
||||
trigger: true
|
||||
repositories:
|
||||
- repository: 1ESPipelines
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
||||
ref: refs/heads/joao/disable-tsa-linux-arm64
|
||||
|
||||
extends:
|
||||
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
|
||||
parameters:
|
||||
sdl:
|
||||
tsa:
|
||||
enabled: true
|
||||
config:
|
||||
codebaseName: 'devdiv_$(Build.Repository.Name)'
|
||||
serviceTreeID: '79c048b2-322f-4ed5-a1ea-252a1250e4b3'
|
||||
instanceUrl: 'https://devdiv.visualstudio.com/defaultcollection'
|
||||
projectName: 'DevDiv'
|
||||
areaPath: "DevDiv\\VS Code (compliance tracking only)\\Visual Studio Code Client"
|
||||
notificationAliases: ['monacotools@microsoft.com']
|
||||
validateToolOutput: None
|
||||
allTools: true
|
||||
credscan:
|
||||
suppressionsFile: $(Build.SourcesDirectory)/build/azure-pipelines/config/CredScanSuppressions.json
|
||||
sourceAnalysisPool: 1es-windows-2022-x64
|
||||
containers:
|
||||
snapcraft:
|
||||
image: vscodehub.azurecr.io/vscode-linux-build-agent:snapcraft-x64
|
||||
ubuntu-2004-arm64:
|
||||
image: onebranch.azurecr.io/linux/ubuntu-2004-arm64:latest
|
||||
authenticatedContainerRegistries:
|
||||
- registry: onebranch.azurecr.io
|
||||
tenant: AME
|
||||
identity: 1ESPipelineIdentity
|
||||
stages:
|
||||
- stage: Compile
|
||||
jobs:
|
||||
- job: Compile
|
||||
pool: 1es-ubuntu-20.04-x64
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
os: linux
|
||||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: product-compile.yml
|
||||
- template: build/azure-pipelines/product-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
||||
|
@ -182,9 +212,11 @@ stages:
|
|||
jobs:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX, true) }}:
|
||||
- job: CLILinuxX64
|
||||
pool: 1es-ubuntu-20.04-x64
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
os: linux
|
||||
steps:
|
||||
- template: ./linux/cli-build-linux.yml
|
||||
- template: build/azure-pipelines/linux/cli-build-linux.yml@self
|
||||
parameters:
|
||||
VSCODE_CHECK_ONLY: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -192,9 +224,11 @@ stages:
|
|||
|
||||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), or(eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true), eq(parameters.VSCODE_BUILD_LINUX_ARM64, true))) }}:
|
||||
- job: CLILinuxGnuARM
|
||||
pool: 1es-ubuntu-20.04-x64
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
os: linux
|
||||
steps:
|
||||
- template: ./linux/cli-build-linux.yml
|
||||
- template: build/azure-pipelines/linux/cli-build-linux.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_LINUX_ARMHF: ${{ parameters.VSCODE_BUILD_LINUX_ARMHF }}
|
||||
|
@ -202,20 +236,24 @@ stages:
|
|||
|
||||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_ALPINE, true)) }}:
|
||||
- job: CLIAlpineX64
|
||||
pool: 1es-ubuntu-20.04-x64
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
os: linux
|
||||
steps:
|
||||
- template: ./alpine/cli-build-alpine.yml
|
||||
- template: build/azure-pipelines/alpine/cli-build-alpine.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ALPINE: ${{ parameters.VSCODE_BUILD_ALPINE }}
|
||||
|
||||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true)) }}:
|
||||
- job: CLIAlpineARM64
|
||||
pool: 1es-ubuntu-20.04-arm64
|
||||
pool:
|
||||
name: 1es-mariner-2.0-arm64
|
||||
os: linux
|
||||
hostArchitecture: arm64
|
||||
container: ubuntu-2004-arm64
|
||||
steps:
|
||||
- bash: sudo apt update && sudo apt install -y unzip
|
||||
displayName: Install unzip
|
||||
- template: ./alpine/cli-build-alpine.yml
|
||||
- template: build/azure-pipelines/alpine/cli-build-alpine.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_ALPINE_ARM64: ${{ parameters.VSCODE_BUILD_ALPINE_ARM64 }}
|
||||
|
@ -223,9 +261,11 @@ stages:
|
|||
- ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}:
|
||||
- job: CLIMacOSX64
|
||||
pool:
|
||||
vmImage: macOS-11
|
||||
name: Azure Pipelines
|
||||
image: macOS-11
|
||||
os: macOS
|
||||
steps:
|
||||
- template: ./darwin/cli-build-darwin.yml
|
||||
- template: build/azure-pipelines/darwin/cli-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_CHECK_ONLY: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -234,18 +274,22 @@ stages:
|
|||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_MACOS_ARM64, true)) }}:
|
||||
- job: CLIMacOSARM64
|
||||
pool:
|
||||
vmImage: macOS-11
|
||||
name: Azure Pipelines
|
||||
image: macOS-11
|
||||
os: macOS
|
||||
steps:
|
||||
- template: ./darwin/cli-build-darwin.yml
|
||||
- template: build/azure-pipelines/darwin/cli-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_MACOS_ARM64: ${{ parameters.VSCODE_BUILD_MACOS_ARM64 }}
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
|
||||
- job: CLIWindowsX64
|
||||
pool: 1es-windows-2019-x64
|
||||
pool:
|
||||
name: 1es-windows-2019-x64
|
||||
os: windows
|
||||
steps:
|
||||
- template: ./win32/cli-build-win32.yml
|
||||
- template: build/azure-pipelines/win32/cli-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_CHECK_ONLY: ${{ variables.VSCODE_CIBUILD }}
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -253,9 +297,11 @@ stages:
|
|||
|
||||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }}:
|
||||
- job: CLIWindowsARM64
|
||||
pool: 1es-windows-2019-x64
|
||||
pool:
|
||||
name: 1es-windows-2019-x64
|
||||
os: windows
|
||||
steps:
|
||||
- template: ./win32/cli-build-win32.yml
|
||||
- template: build/azure-pipelines/win32/cli-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_BUILD_WIN32_ARM64: ${{ parameters.VSCODE_BUILD_WIN32_ARM64 }}
|
||||
|
@ -265,7 +311,9 @@ stages:
|
|||
dependsOn:
|
||||
- Compile
|
||||
- CompileCLI
|
||||
pool: 1es-windows-2019-x64
|
||||
pool:
|
||||
name: 1es-windows-2019-x64
|
||||
os: windows
|
||||
jobs:
|
||||
- ${{ if eq(variables['VSCODE_CIBUILD'], true) }}:
|
||||
- job: WindowsUnitTests
|
||||
|
@ -274,7 +322,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: win32/product-build-win32.yml
|
||||
- template: build/azure-pipelines/win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_ARCH: x64
|
||||
|
@ -288,7 +336,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: win32/product-build-win32.yml
|
||||
- template: build/azure-pipelines/win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_ARCH: x64
|
||||
|
@ -302,7 +350,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: win32/product-build-win32.yml
|
||||
- template: build/azure-pipelines/win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_ARCH: x64
|
||||
|
@ -317,7 +365,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: win32/product-build-win32.yml
|
||||
- template: build/azure-pipelines/win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_ARCH: x64
|
||||
|
@ -329,7 +377,7 @@ stages:
|
|||
- job: WindowsCLISign
|
||||
timeoutInMinutes: 90
|
||||
steps:
|
||||
- template: win32/product-build-win32-cli-sign.yml
|
||||
- template: build/azure-pipelines/win32/product-build-win32-cli-sign.yml@self
|
||||
parameters:
|
||||
VSCODE_BUILD_WIN32: ${{ parameters.VSCODE_BUILD_WIN32 }}
|
||||
VSCODE_BUILD_WIN32_ARM64: ${{ parameters.VSCODE_BUILD_WIN32_ARM64 }}
|
||||
|
@ -340,7 +388,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: arm64
|
||||
steps:
|
||||
- template: win32/product-build-win32.yml
|
||||
- template: build/azure-pipelines/win32/product-build-win32.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_ARCH: arm64
|
||||
|
@ -354,7 +402,9 @@ stages:
|
|||
dependsOn:
|
||||
- Compile
|
||||
- CompileCLI
|
||||
pool: 1es-ubuntu-20.04-x64
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
os: linux
|
||||
jobs:
|
||||
- ${{ if eq(variables['VSCODE_CIBUILD'], true) }}:
|
||||
- job: Linuxx64UnitTest
|
||||
|
@ -364,7 +414,7 @@ stages:
|
|||
NPM_ARCH: x64
|
||||
DISPLAY: ":10"
|
||||
steps:
|
||||
- template: linux/product-build-linux.yml
|
||||
- template: build/azure-pipelines/linux/product-build-linux.yml@self
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -379,7 +429,7 @@ stages:
|
|||
NPM_ARCH: x64
|
||||
DISPLAY: ":10"
|
||||
steps:
|
||||
- template: linux/product-build-linux.yml
|
||||
- template: build/azure-pipelines/linux/product-build-linux.yml@self
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -394,7 +444,7 @@ stages:
|
|||
NPM_ARCH: x64
|
||||
DISPLAY: ":10"
|
||||
steps:
|
||||
- template: linux/product-build-linux.yml
|
||||
- template: build/azure-pipelines/linux/product-build-linux.yml@self
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -410,7 +460,7 @@ stages:
|
|||
NPM_ARCH: x64
|
||||
DISPLAY: ":10"
|
||||
steps:
|
||||
- template: linux/product-build-linux.yml
|
||||
- template: build/azure-pipelines/linux/product-build-linux.yml@self
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -427,7 +477,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: linux/snap-build-linux.yml
|
||||
- template: build/azure-pipelines/linux/snap-build-linux.yml@self
|
||||
|
||||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true)) }}:
|
||||
- job: LinuxArmhf
|
||||
|
@ -435,7 +485,7 @@ stages:
|
|||
VSCODE_ARCH: armhf
|
||||
NPM_ARCH: arm
|
||||
steps:
|
||||
- template: linux/product-build-linux.yml
|
||||
- template: build/azure-pipelines/linux/product-build-linux.yml@self
|
||||
parameters:
|
||||
VSCODE_ARCH: armhf
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -450,7 +500,7 @@ stages:
|
|||
VSCODE_ARCH: arm64
|
||||
NPM_ARCH: arm64
|
||||
steps:
|
||||
- template: linux/product-build-linux.yml
|
||||
- template: build/azure-pipelines/linux/product-build-linux.yml@self
|
||||
parameters:
|
||||
VSCODE_ARCH: arm64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -463,7 +513,9 @@ stages:
|
|||
- stage: LinuxLegacyServer
|
||||
dependsOn:
|
||||
- Compile
|
||||
pool: 1es-ubuntu-20.04-x64
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
os: linux
|
||||
jobs:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_X64_LEGACY_SERVER, true) }}:
|
||||
- job: Linuxx64LegacyServer
|
||||
|
@ -472,7 +524,7 @@ stages:
|
|||
NPM_ARCH: x64
|
||||
DISPLAY: ":10"
|
||||
steps:
|
||||
- template: linux/product-build-linux-legacy-server.yml
|
||||
- template: build/azure-pipelines/linux/product-build-linux-legacy-server.yml@self
|
||||
parameters:
|
||||
VSCODE_ARCH: x64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -484,7 +536,7 @@ stages:
|
|||
VSCODE_ARCH: armhf
|
||||
NPM_ARCH: arm
|
||||
steps:
|
||||
- template: linux/product-build-linux-legacy-server.yml
|
||||
- template: build/azure-pipelines/linux/product-build-linux-legacy-server.yml@self
|
||||
parameters:
|
||||
VSCODE_ARCH: armhf
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -496,7 +548,7 @@ stages:
|
|||
VSCODE_ARCH: arm64
|
||||
NPM_ARCH: arm64
|
||||
steps:
|
||||
- template: linux/product-build-linux-legacy-server.yml
|
||||
- template: build/azure-pipelines/linux/product-build-linux-legacy-server.yml@self
|
||||
parameters:
|
||||
VSCODE_ARCH: arm64
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
|
@ -507,7 +559,9 @@ stages:
|
|||
dependsOn:
|
||||
- Compile
|
||||
- CompileCLI
|
||||
pool: 1es-ubuntu-20.04-x64
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
os: linux
|
||||
jobs:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE, true) }}:
|
||||
- job: LinuxAlpine
|
||||
|
@ -515,7 +569,7 @@ stages:
|
|||
VSCODE_ARCH: x64
|
||||
NPM_ARCH: x64
|
||||
steps:
|
||||
- template: alpine/product-build-alpine.yml
|
||||
- template: build/azure-pipelines/alpine/product-build-alpine.yml@self
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true) }}:
|
||||
- job: LinuxAlpineArm64
|
||||
|
@ -524,7 +578,7 @@ stages:
|
|||
VSCODE_ARCH: arm64
|
||||
NPM_ARCH: arm64
|
||||
steps:
|
||||
- template: alpine/product-build-alpine.yml
|
||||
- template: build/azure-pipelines/alpine/product-build-alpine.yml@self
|
||||
|
||||
- ${{ if and(eq(parameters.VSCODE_COMPILE_ONLY, false), eq(variables['VSCODE_BUILD_STAGE_MACOS'], true)) }}:
|
||||
- stage: macOS
|
||||
|
@ -532,7 +586,9 @@ stages:
|
|||
- Compile
|
||||
- CompileCLI
|
||||
pool:
|
||||
vmImage: macOS-11
|
||||
name: Azure Pipelines
|
||||
image: macOS-11
|
||||
os: macOS
|
||||
variables:
|
||||
BUILDSECMON_OPT_IN: true
|
||||
jobs:
|
||||
|
@ -543,7 +599,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: darwin/product-build-darwin.yml
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
|
@ -556,7 +612,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: darwin/product-build-darwin.yml
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
|
@ -569,7 +625,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: darwin/product-build-darwin.yml
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
|
@ -583,7 +639,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: darwin/product-build-darwin.yml
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
|
@ -597,7 +653,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: darwin/product-build-darwin.yml
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
|
@ -612,12 +668,12 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: darwin/product-build-darwin-sign.yml
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin-sign.yml@self
|
||||
|
||||
- job: macOSCLISign
|
||||
timeoutInMinutes: 90
|
||||
steps:
|
||||
- template: darwin/product-build-darwin-cli-sign.yml
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin-cli-sign.yml@self
|
||||
parameters:
|
||||
VSCODE_BUILD_MACOS: ${{ parameters.VSCODE_BUILD_MACOS }}
|
||||
VSCODE_BUILD_MACOS_ARM64: ${{ parameters.VSCODE_BUILD_MACOS_ARM64 }}
|
||||
|
@ -628,7 +684,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: arm64
|
||||
steps:
|
||||
- template: darwin/product-build-darwin.yml
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||||
VSCODE_CIBUILD: ${{ variables.VSCODE_CIBUILD }}
|
||||
|
@ -643,7 +699,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: arm64
|
||||
steps:
|
||||
- template: darwin/product-build-darwin-sign.yml
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin-sign.yml@self
|
||||
|
||||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(variables['VSCODE_BUILD_MACOS_UNIVERSAL'], true)) }}:
|
||||
- job: macOSUniversal
|
||||
|
@ -654,7 +710,7 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: universal
|
||||
steps:
|
||||
- template: darwin/product-build-darwin-universal.yml
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin-universal.yml@self
|
||||
|
||||
- job: macOSUniversalSign
|
||||
dependsOn:
|
||||
|
@ -663,25 +719,29 @@ stages:
|
|||
variables:
|
||||
VSCODE_ARCH: universal
|
||||
steps:
|
||||
- template: darwin/product-build-darwin-sign.yml
|
||||
- template: build/azure-pipelines/darwin/product-build-darwin-sign.yml@self
|
||||
|
||||
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_COMPILE_ONLY, false), eq(variables['VSCODE_BUILD_STAGE_WEB'], true)) }}:
|
||||
- stage: Web
|
||||
dependsOn:
|
||||
- Compile
|
||||
pool: 1es-ubuntu-20.04-x64
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
os: linux
|
||||
jobs:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WEB, true) }}:
|
||||
- job: Web
|
||||
variables:
|
||||
VSCODE_ARCH: x64
|
||||
steps:
|
||||
- template: web/product-build-web.yml
|
||||
- template: build/azure-pipelines/web/product-build-web.yml@self
|
||||
|
||||
- ${{ if eq(variables['VSCODE_PUBLISH'], 'true') }}:
|
||||
- stage: Publish
|
||||
dependsOn: []
|
||||
pool: 1es-windows-2019-x64
|
||||
pool:
|
||||
name: 1es-windows-2019-x64
|
||||
os: windows
|
||||
variables:
|
||||
- name: BUILDS_API_URL
|
||||
value: $(System.CollectionUri)$(System.TeamProject)/_apis/build/builds/$(Build.BuildId)/
|
||||
|
@ -690,12 +750,14 @@ stages:
|
|||
timeoutInMinutes: 180
|
||||
displayName: Publish Build
|
||||
steps:
|
||||
- template: product-publish.yml
|
||||
- template: build/azure-pipelines/product-publish.yml@self
|
||||
|
||||
- ${{ if and(parameters.VSCODE_RELEASE, eq(variables['VSCODE_PRIVATE_BUILD'], false)) }}:
|
||||
- stage: ApproveRelease
|
||||
dependsOn: [] # run in parallel to compile stage
|
||||
pool: 1es-ubuntu-20.04-x64
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
os: linux
|
||||
jobs:
|
||||
- deployment: ApproveRelease
|
||||
displayName: "Approve Release"
|
||||
|
@ -714,11 +776,13 @@ stages:
|
|||
- Publish
|
||||
- ${{ if and(parameters.VSCODE_RELEASE, eq(variables['VSCODE_PRIVATE_BUILD'], false)) }}:
|
||||
- ApproveRelease
|
||||
pool: 1es-ubuntu-20.04-x64
|
||||
pool:
|
||||
name: 1es-ubuntu-20.04-x64
|
||||
os: linux
|
||||
jobs:
|
||||
- job: ReleaseBuild
|
||||
displayName: Release Build
|
||||
steps:
|
||||
- template: product-release.yml
|
||||
- template: build/azure-pipelines/product-release.yml@self
|
||||
parameters:
|
||||
VSCODE_RELEASE: ${{ parameters.VSCODE_RELEASE }}
|
||||
|
|
|
@ -10,7 +10,7 @@ steps:
|
|||
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ./distro/download-distro.yml
|
||||
- template: ./distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
|
@ -98,7 +98,7 @@ steps:
|
|||
- script: node build/azure-pipelines/distro/mixin-quality
|
||||
displayName: Mixin distro quality
|
||||
|
||||
- template: common/install-builtin-extensions.yml
|
||||
- template: common/install-builtin-extensions.yml@self
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: yarn npm-run-all -lp core-ci-pr extensions-ci-pr hygiene eslint valid-layers-check vscode-dts-compile-check tsec-compile-check
|
||||
|
@ -146,10 +146,11 @@ steps:
|
|||
- script: tar -cz --ignore-failed-read --exclude='.build/node_modules_cache' --exclude='.build/node_modules_list.txt' --exclude='.build/distro' -f $(Build.ArtifactStagingDirectory)/compilation.tar.gz .build out-* test/integration/browser/out test/smoke/out test/automation/out
|
||||
displayName: Compress compilation artifact
|
||||
|
||||
- task: PublishPipelineArtifact@1
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/compilation.tar.gz
|
||||
artifactName: Compilation
|
||||
sbomEnabled: false
|
||||
displayName: Publish compilation artifact
|
||||
|
||||
- script: yarn download-builtin-extensions-cg
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
trigger: none
|
||||
pr: none
|
||||
|
||||
variables:
|
||||
LinuxContainerImage: "onebranch.azurecr.io/linux/ubuntu-2004:latest"
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: templates
|
||||
type: git
|
||||
name: OneBranch.Pipelines/GovernedTemplates
|
||||
ref: refs/heads/main
|
||||
|
||||
- repository: distro
|
||||
type: github
|
||||
name: microsoft/vscode-distro
|
||||
ref: refs/heads/distro
|
||||
endpoint: Monaco
|
||||
|
||||
extends:
|
||||
template: v2/OneBranch.NonOfficial.CrossPlat.yml@templates
|
||||
parameters:
|
||||
git:
|
||||
fetchDepth: 1
|
||||
lfs: true
|
||||
retryCount: 3
|
||||
|
||||
globalSdl:
|
||||
policheck:
|
||||
break: true
|
||||
credscan:
|
||||
suppressionsFile: $(Build.SourcesDirectory)\build\azure-pipelines\config\CredScanSuppressions.json
|
||||
|
||||
stages:
|
||||
- stage: Compile
|
||||
|
||||
jobs:
|
||||
- job: Compile
|
||||
pool:
|
||||
type: linux
|
||||
|
||||
variables:
|
||||
ob_outputDirectory: '$(Build.SourcesDirectory)'
|
||||
|
||||
steps:
|
||||
- checkout: distro
|
|
@ -101,8 +101,11 @@ steps:
|
|||
displayName: Process artifacts
|
||||
retryCountOnTaskFailure: 3
|
||||
|
||||
- publish: $(Pipeline.Workspace)/artifacts_processed_$(System.StageAttempt)/artifacts_processed_$(System.StageAttempt).txt
|
||||
artifact: artifacts_processed_$(System.StageAttempt)
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Pipeline.Workspace)/artifacts_processed_$(System.StageAttempt)/artifacts_processed_$(System.StageAttempt).txt
|
||||
artifactName: artifacts_processed_$(System.StageAttempt)
|
||||
sbomEnabled: false
|
||||
displayName: Publish the artifacts processed for this stage attempt
|
||||
condition: always()
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ steps:
|
|||
versionFilePath: .nvmrc
|
||||
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
||||
|
||||
- template: ../distro/download-distro.yml
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
|
@ -94,7 +94,7 @@ steps:
|
|||
- script: node build/azure-pipelines/distro/mixin-quality
|
||||
displayName: Mixin distro quality
|
||||
|
||||
- template: ../common/install-builtin-extensions.yml
|
||||
- template: ../common/install-builtin-extensions.yml@self
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
@ -153,17 +153,12 @@ steps:
|
|||
condition: and(succeededOrFailed(), notIn(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues'))
|
||||
displayName: Generate artifact prefix
|
||||
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
BuildDropPath: $(agent.builddirectory)/vscode-web
|
||||
PackageName: Visual Studio Code Web
|
||||
|
||||
- publish: $(agent.builddirectory)/vscode-web/_manifest
|
||||
displayName: Publish SBOM (client)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_web
|
||||
|
||||
- publish: $(WEB_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_web_linux_standalone_archive-unsigned
|
||||
targetPath: $(WEB_PATH)
|
||||
artifactName: $(ARTIFACT_PREFIX)vscode_web_linux_standalone_archive-unsigned
|
||||
sbomBuildDropPath: $(Agent.BuildDirectory)/vscode-web
|
||||
sbomPackageName: "VS Code Web"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''))
|
||||
displayName: Publish web archive
|
||||
|
|
|
@ -19,7 +19,7 @@ steps:
|
|||
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../cli/cli-apply-patches.yml
|
||||
- template: ../cli/cli-apply-patches.yml@self
|
||||
|
||||
- task: Npm@1
|
||||
displayName: Download openssl prebuilt
|
||||
|
@ -35,7 +35,7 @@ steps:
|
|||
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.11.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
|
||||
displayName: Extract openssl prebuilt
|
||||
|
||||
- template: ../cli/install-rust-win32.yml
|
||||
- template: ../cli/install-rust-win32.yml@self
|
||||
parameters:
|
||||
targets:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
|
||||
|
@ -44,7 +44,7 @@ steps:
|
|||
- aarch64-pc-windows-msvc
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
|
||||
- template: ../cli/cli-compile.yml
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: x86_64-pc-windows-msvc
|
||||
|
@ -56,7 +56,7 @@ steps:
|
|||
RUSTFLAGS: "-C target-feature=+crt-static"
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
|
||||
- template: ../cli/cli-compile.yml
|
||||
- template: ../cli/cli-compile.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_CLI_TARGET: aarch64-pc-windows-msvc
|
||||
|
@ -67,14 +67,23 @@ steps:
|
|||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-windows-static/include
|
||||
RUSTFLAGS: "-C target-feature=+crt-static"
|
||||
|
||||
- ${{ if not(parameters.VSCODE_CHECK_ONLY) }}:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
|
||||
- template: ../cli/cli-publish.yml
|
||||
parameters:
|
||||
VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_win32_arm64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/unsigned_vscode_cli_win32_arm64_cli.zip
|
||||
artifactName: unsigned_vscode_cli_win32_arm64_cli
|
||||
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
|
||||
sbomPackageName: "VS Code Windows arm64 CLI (unsigned)"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish unsigned_vscode_cli_win32_arm64_cli artifact
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
|
||||
- template: ../cli/cli-publish.yml
|
||||
parameters:
|
||||
VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_win32_x64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/unsigned_vscode_cli_win32_x64_cli.zip
|
||||
artifactName: unsigned_vscode_cli_win32_x64_cli
|
||||
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
|
||||
sbomPackageName: "VS Code Windows x64 CLI (unsigned)"
|
||||
sbomPackageVersion: $(Build.SourceVersion)
|
||||
displayName: Publish unsigned_vscode_cli_win32_x64_cli artifact
|
||||
|
|
|
@ -44,7 +44,7 @@ steps:
|
|||
workingDirectory: build
|
||||
displayName: Install build dependencies
|
||||
|
||||
- template: ../cli/cli-win32-sign.yml
|
||||
- template: ../cli/cli-win32-sign.yml@self
|
||||
parameters:
|
||||
VSCODE_CLI_ARTIFACTS:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}:
|
||||
|
|
|
@ -9,6 +9,9 @@ parameters:
|
|||
type: boolean
|
||||
- name: VSCODE_RUN_SMOKE_TESTS
|
||||
type: boolean
|
||||
- name: PUBLISH_TASK_NAME
|
||||
type: string
|
||||
default: PublishPipelineArtifact@0
|
||||
|
||||
steps:
|
||||
- powershell: yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
|
||||
|
@ -162,7 +165,7 @@ steps:
|
|||
condition: succeededOrFailed()
|
||||
|
||||
- ${{ if or(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
|
||||
- task: PublishPipelineArtifact@0
|
||||
- task: ${{ parameters.PUBLISH_TASK_NAME }}
|
||||
inputs:
|
||||
targetPath: .build\crashes
|
||||
${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
|
||||
|
@ -171,13 +174,14 @@ steps:
|
|||
artifactName: crash-dump-windows-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
|
||||
${{ else }}:
|
||||
artifactName: crash-dump-windows-$(VSCODE_ARCH)-$(System.JobAttempt)
|
||||
sbomEnabled: false
|
||||
displayName: "Publish Crash Reports"
|
||||
continueOnError: true
|
||||
condition: failed()
|
||||
|
||||
# In order to properly symbolify above crash reports
|
||||
# (if any), we need the compiled native modules too
|
||||
- task: PublishPipelineArtifact@0
|
||||
- task: ${{ parameters.PUBLISH_TASK_NAME }}
|
||||
inputs:
|
||||
targetPath: node_modules
|
||||
${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
|
||||
|
@ -186,11 +190,12 @@ steps:
|
|||
artifactName: node-modules-windows-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
|
||||
${{ else }}:
|
||||
artifactName: node-modules-windows-$(VSCODE_ARCH)-$(System.JobAttempt)
|
||||
sbomEnabled: false
|
||||
displayName: "Publish Node Modules"
|
||||
continueOnError: true
|
||||
condition: failed()
|
||||
|
||||
- task: PublishPipelineArtifact@0
|
||||
- task: ${{ parameters.PUBLISH_TASK_NAME }}
|
||||
inputs:
|
||||
targetPath: .build\logs
|
||||
${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
|
||||
|
@ -199,6 +204,7 @@ steps:
|
|||
artifactName: logs-windows-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
|
||||
${{ else }}:
|
||||
artifactName: logs-windows-$(VSCODE_ARCH)-$(System.JobAttempt)
|
||||
sbomEnabled: false
|
||||
displayName: "Publish Log Files"
|
||||
continueOnError: true
|
||||
condition: succeededOrFailed()
|
||||
|
|
|
@ -30,7 +30,7 @@ steps:
|
|||
addToPath: true
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../distro/download-distro.yml
|
||||
- template: ../distro/download-distro.yml@self
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
|
@ -127,7 +127,7 @@ steps:
|
|||
- powershell: node build/azure-pipelines/distro/mixin-quality
|
||||
displayName: Mixin distro quality
|
||||
|
||||
- template: ../common/install-builtin-extensions.yml
|
||||
- template: ../common/install-builtin-extensions.yml@self
|
||||
|
||||
- ${{ if and(ne(parameters.VSCODE_CIBUILD, true), ne(parameters.VSCODE_QUALITY, 'oss')) }}:
|
||||
- powershell: node build\lib\policies
|
||||
|
@ -180,13 +180,15 @@ steps:
|
|||
condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
|
||||
|
||||
- ${{ if or(eq(parameters.VSCODE_RUN_UNIT_TESTS, true), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
|
||||
- template: product-build-win32-test.yml
|
||||
- template: product-build-win32-test.yml@self
|
||||
parameters:
|
||||
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
|
||||
VSCODE_ARCH: ${{ parameters.VSCODE_ARCH }}
|
||||
VSCODE_RUN_UNIT_TESTS: ${{ parameters.VSCODE_RUN_UNIT_TESTS }}
|
||||
VSCODE_RUN_INTEGRATION_TESTS: ${{ parameters.VSCODE_RUN_INTEGRATION_TESTS }}
|
||||
VSCODE_RUN_SMOKE_TESTS: ${{ parameters.VSCODE_RUN_SMOKE_TESTS }}
|
||||
${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
PUBLISH_TASK_NAME: 1ES.PublishPipelineArtifact@1
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_CIBUILD, true) }}:
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
|
@ -299,50 +301,52 @@ steps:
|
|||
condition: and(succeededOrFailed(), notIn(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues'))
|
||||
displayName: Generate artifact prefix
|
||||
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM (client)
|
||||
- task: 1ES.PublishPipelineArtifact@1
|
||||
inputs:
|
||||
BuildDropPath: $(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)
|
||||
PackageName: Visual Studio Code
|
||||
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
displayName: Generate SBOM (server)
|
||||
inputs:
|
||||
BuildComponentPath: $(Build.SourcesDirectory)/remote
|
||||
BuildDropPath: $(agent.builddirectory)/vscode-server-win32-$(VSCODE_ARCH)
|
||||
PackageName: Visual Studio Code Server
|
||||
condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
|
||||
|
||||
- publish: $(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM (client)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_client_win32_$(VSCODE_ARCH)
|
||||
|
||||
- publish: $(agent.builddirectory)/vscode-server-win32-$(VSCODE_ARCH)/_manifest
|
||||
displayName: Publish SBOM (server)
|
||||
artifact: $(ARTIFACT_PREFIX)sbom_vscode_server_win32_$(VSCODE_ARCH)
|
||||
condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'arm64'))
|
||||
|
||||
- publish: $(CLIENT_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_client_win32_$(VSCODE_ARCH)_archive
|
||||
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
|
||||
|
||||
- publish: $(SERVER_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_server_win32_$(VSCODE_ARCH)_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'], ''), ne(variables['VSCODE_ARCH'], 'arm64'))
|
||||
displayName: Publish server archive
|
||||
|
||||
- publish: $(WEB_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_web_win32_$(VSCODE_ARCH)_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'], ''), ne(variables['VSCODE_ARCH'], 'arm64'))
|
||||
displayName: Publish web server archive
|
||||
|
||||
- publish: $(SYSTEM_SETUP_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_client_win32_$(VSCODE_ARCH)_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
|
||||
|
||||
- publish: $(USER_SETUP_PATH)
|
||||
artifact: $(ARTIFACT_PREFIX)vscode_client_win32_$(VSCODE_ARCH)_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
|
||||
|
|
|
@ -373,7 +373,13 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
|||
);
|
||||
}
|
||||
|
||||
if (platform === 'linux' || platform === 'alpine') {
|
||||
if (platform === 'linux' && process.env['VSCODE_NODE_GLIBC'] === '-glibc-2.17') {
|
||||
result = es.merge(result,
|
||||
gulp.src(`resources/server/bin/helpers/check-requirements-linux-legacy.sh`, { base: '.' })
|
||||
.pipe(rename(`bin/helpers/check-requirements.sh`))
|
||||
.pipe(util.setExecutableBit())
|
||||
);
|
||||
} else if (platform === 'linux' || platform === 'alpine') {
|
||||
result = es.merge(result,
|
||||
gulp.src(`resources/server/bin/helpers/check-requirements-linux.sh`, { base: '.' })
|
||||
.pipe(replace('@@SERVER_APPLICATION_NAME@@', product.serverApplicationName))
|
||||
|
|
|
@ -60,6 +60,10 @@ export interface CellMetadata {
|
|||
* Stores cell metadata.
|
||||
*/
|
||||
metadata?: Partial<nbformat.ICellMetadata> & { vscode?: { languageId?: string } };
|
||||
/**
|
||||
* The code cell's prompt number. Will be null if the cell has not been run.
|
||||
*/
|
||||
execution_count?: number;
|
||||
}
|
||||
|
||||
export function useCustomPropertyInMetadata() {
|
||||
|
|
|
@ -159,6 +159,11 @@ function getNotebookCellMetadata(cell: nbformat.IBaseCell): {
|
|||
// We put this only for VSC to display in diff view.
|
||||
// Else we don't use this.
|
||||
const custom: CellMetadata = {};
|
||||
|
||||
if (cell.cell_type === 'code' && typeof cell['execution_count'] === 'number') {
|
||||
custom.execution_count = cell['execution_count'];
|
||||
}
|
||||
|
||||
if (cell['metadata']) {
|
||||
custom['metadata'] = JSON.parse(JSON.stringify(cell['metadata']));
|
||||
}
|
||||
|
@ -177,6 +182,10 @@ function getNotebookCellMetadata(cell: nbformat.IBaseCell): {
|
|||
// We put this only for VSC to display in diff view.
|
||||
// Else we don't use this.
|
||||
const cellMetadata: CellMetadata = {};
|
||||
if (cell.cell_type === 'code' && typeof cell['execution_count'] === 'number') {
|
||||
cellMetadata.execution_count = cell['execution_count'];
|
||||
}
|
||||
|
||||
if (cell['metadata']) {
|
||||
cellMetadata['metadata'] = JSON.parse(JSON.stringify(cell['metadata']));
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ExtensionContext, NotebookCellKind, NotebookDocument, NotebookDocumentChangeEvent, NotebookEdit, workspace, WorkspaceEdit, type NotebookCell, type NotebookDocumentWillSaveEvent } from 'vscode';
|
||||
import { getCellMetadata, getVSCodeCellLanguageId, removeVSCodeCellLanguageId, setVSCodeCellLanguageId } from './serializers';
|
||||
import { getCellMetadata, getVSCodeCellLanguageId, removeVSCodeCellLanguageId, setVSCodeCellLanguageId, sortObjectPropertiesRecursively } from './serializers';
|
||||
import { CellMetadata, useCustomPropertyInMetadata } from './common';
|
||||
import { getNotebookMetadata } from './notebookSerializer';
|
||||
import type * as nbformat from '@jupyterlab/nbformat';
|
||||
|
@ -53,15 +53,25 @@ function cleanup(notebook: NotebookDocument, promise: PromiseLike<void>) {
|
|||
}
|
||||
}
|
||||
}
|
||||
function trackAndUpdateCellMetadata(notebook: NotebookDocument, cell: NotebookCell, metadata: CellMetadata & { vscode?: { languageId: string } }) {
|
||||
function trackAndUpdateCellMetadata(notebook: NotebookDocument, updates: { cell: NotebookCell; metadata: CellMetadata & { vscode?: { languageId: string } } }[]) {
|
||||
const pendingUpdates = pendingNotebookCellModelUpdates.get(notebook) ?? new Set<Thenable<void>>();
|
||||
pendingNotebookCellModelUpdates.set(notebook, pendingUpdates);
|
||||
const edit = new WorkspaceEdit();
|
||||
updates.forEach(({ cell, metadata }) => {
|
||||
let newMetadata: any = {};
|
||||
if (useCustomPropertyInMetadata()) {
|
||||
edit.set(cell.notebook.uri, [NotebookEdit.updateCellMetadata(cell.index, { ...(cell.metadata), custom: metadata })]);
|
||||
newMetadata = { ...(cell.metadata), custom: metadata };
|
||||
} else {
|
||||
edit.set(cell.notebook.uri, [NotebookEdit.updateCellMetadata(cell.index, { ...cell.metadata, ...metadata })]);
|
||||
newMetadata = { ...cell.metadata, ...metadata };
|
||||
if (!metadata.execution_count && newMetadata.execution_count) {
|
||||
delete newMetadata.execution_count;
|
||||
}
|
||||
if (!metadata.attachments && newMetadata.attachments) {
|
||||
delete newMetadata.attachments;
|
||||
}
|
||||
}
|
||||
edit.set(cell.notebook.uri, [NotebookEdit.updateCellMetadata(cell.index, sortObjectPropertiesRecursively(newMetadata))]);
|
||||
});
|
||||
const promise = workspace.applyEdit(edit).then(noop, noop);
|
||||
pendingUpdates.add(promise);
|
||||
const clean = () => cleanup(notebook, promise);
|
||||
|
@ -78,7 +88,7 @@ function onDidChangeNotebookCells(e: NotebookDocumentChangeEvent) {
|
|||
|
||||
// use the preferred language from document metadata or the first cell language as the notebook preferred cell language
|
||||
const preferredCellLanguage = notebookMetadata.metadata?.language_info?.name;
|
||||
|
||||
const updates: { cell: NotebookCell; metadata: CellMetadata & { vscode?: { languageId: string } } }[] = [];
|
||||
// When we change the language of a cell,
|
||||
// Ensure the metadata in the notebook cell has been updated as well,
|
||||
// Else model will be out of sync with ipynb https://github.com/microsoft/vscode/issues/207968#issuecomment-2002858596
|
||||
|
@ -86,23 +96,33 @@ function onDidChangeNotebookCells(e: NotebookDocumentChangeEvent) {
|
|||
if (!preferredCellLanguage || e.cell.kind !== NotebookCellKind.Code) {
|
||||
return;
|
||||
}
|
||||
const languageIdInMetadata = getVSCodeCellLanguageId(getCellMetadata(e.cell));
|
||||
if (e.cell.document.languageId !== preferredCellLanguage && e.cell.document.languageId !== languageIdInMetadata) {
|
||||
const metadata: CellMetadata = JSON.parse(JSON.stringify(getCellMetadata(e.cell)));
|
||||
const currentMetadata = e.metadata ? getCellMetadata({ metadata: e.metadata }) : getCellMetadata({ cell: e.cell });
|
||||
const languageIdInMetadata = getVSCodeCellLanguageId(currentMetadata);
|
||||
const metadata: CellMetadata = JSON.parse(JSON.stringify(currentMetadata));
|
||||
metadata.metadata = metadata.metadata || {};
|
||||
setVSCodeCellLanguageId(metadata, e.cell.document.languageId);
|
||||
trackAndUpdateCellMetadata(notebook, e.cell, metadata);
|
||||
let metadataUpdated = false;
|
||||
if (e.executionSummary?.executionOrder && typeof e.executionSummary.success === 'boolean' && currentMetadata.execution_count !== e.executionSummary?.executionOrder) {
|
||||
metadata.execution_count = e.executionSummary.executionOrder;
|
||||
metadataUpdated = true;
|
||||
} else if (!e.executionSummary && !e.metadata && e.outputs?.length === 0 && currentMetadata.execution_count) {
|
||||
// Clear all.
|
||||
delete metadata.execution_count;
|
||||
metadataUpdated = true;
|
||||
}
|
||||
|
||||
} else if (e.cell.document.languageId === preferredCellLanguage && languageIdInMetadata) {
|
||||
const metadata: CellMetadata = JSON.parse(JSON.stringify(getCellMetadata(e.cell)));
|
||||
metadata.metadata = metadata.metadata || {};
|
||||
if (e.document?.languageId && e.document?.languageId !== preferredCellLanguage && e.document?.languageId !== languageIdInMetadata) {
|
||||
setVSCodeCellLanguageId(metadata, e.document.languageId);
|
||||
metadataUpdated = true;
|
||||
} else if (e.document?.languageId && e.document.languageId === preferredCellLanguage && languageIdInMetadata) {
|
||||
removeVSCodeCellLanguageId(metadata);
|
||||
trackAndUpdateCellMetadata(notebook, e.cell, metadata);
|
||||
} else if (e.cell.document.languageId === preferredCellLanguage && e.cell.document.languageId === languageIdInMetadata) {
|
||||
const metadata: CellMetadata = JSON.parse(JSON.stringify(getCellMetadata(e.cell)));
|
||||
metadata.metadata = metadata.metadata || {};
|
||||
metadataUpdated = true;
|
||||
} else if (e.document?.languageId && e.document.languageId === preferredCellLanguage && e.document.languageId === languageIdInMetadata) {
|
||||
removeVSCodeCellLanguageId(metadata);
|
||||
trackAndUpdateCellMetadata(notebook, e.cell, metadata);
|
||||
metadataUpdated = true;
|
||||
}
|
||||
|
||||
if (metadataUpdated) {
|
||||
updates.push({ cell: e.cell, metadata });
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -112,7 +132,7 @@ function onDidChangeNotebookCells(e: NotebookDocumentChangeEvent) {
|
|||
change.addedCells.forEach(cell => {
|
||||
// When ever a cell is added, always update the metadata
|
||||
// as metadata is always an empty `{}` in ipynb JSON file
|
||||
const cellMetadata = getCellMetadata(cell);
|
||||
const cellMetadata = getCellMetadata({ cell });
|
||||
|
||||
// Avoid updating the metadata if it's not required.
|
||||
if (cellMetadata.metadata) {
|
||||
|
@ -131,9 +151,13 @@ function onDidChangeNotebookCells(e: NotebookDocumentChangeEvent) {
|
|||
if (isCellIdRequired(notebookMetadata) && !cellMetadata?.id) {
|
||||
metadata.id = generateCellId(e.notebook);
|
||||
}
|
||||
trackAndUpdateCellMetadata(notebook, cell, metadata);
|
||||
updates.push({ cell, metadata });
|
||||
});
|
||||
});
|
||||
|
||||
if (updates.length) {
|
||||
trackAndUpdateCellMetadata(notebook, updates);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -158,7 +182,7 @@ function generateCellId(notebook: NotebookDocument) {
|
|||
let duplicate = false;
|
||||
for (let index = 0; index < notebook.cellCount; index++) {
|
||||
const cell = notebook.cellAt(index);
|
||||
const existingId = getCellMetadata(cell)?.id;
|
||||
const existingId = getCellMetadata({ cell })?.id;
|
||||
if (!existingId) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -54,13 +54,14 @@ export function sortObjectPropertiesRecursively(obj: any): any {
|
|||
return obj;
|
||||
}
|
||||
|
||||
export function getCellMetadata(cell: NotebookCell | NotebookCellData): CellMetadata {
|
||||
export function getCellMetadata(options: { cell: NotebookCell | NotebookCellData } | { metadata?: { [key: string]: any } }): CellMetadata {
|
||||
if ('cell' in options) {
|
||||
const cell = options.cell;
|
||||
if (useCustomPropertyInMetadata()) {
|
||||
const metadata = {
|
||||
const metadata: CellMetadata = {
|
||||
// it contains the cell id, and the cell metadata, along with other nb cell metadata
|
||||
...(cell.metadata?.custom ?? {})
|
||||
};
|
||||
|
||||
// promote the cell attachments to the top level
|
||||
const attachments = cell.metadata?.custom?.attachments ?? cell.metadata?.attachments;
|
||||
if (attachments) {
|
||||
|
@ -74,6 +75,27 @@ export function getCellMetadata(cell: NotebookCell | NotebookCellData): CellMeta
|
|||
};
|
||||
|
||||
return metadata;
|
||||
} else {
|
||||
const cell = options;
|
||||
if (useCustomPropertyInMetadata()) {
|
||||
const metadata: CellMetadata = {
|
||||
// it contains the cell id, and the cell metadata, along with other nb cell metadata
|
||||
...(cell.metadata?.custom ?? {})
|
||||
};
|
||||
// promote the cell attachments to the top level
|
||||
const attachments = cell.metadata?.custom?.attachments ?? cell.metadata?.attachments;
|
||||
if (attachments) {
|
||||
metadata.attachments = attachments;
|
||||
}
|
||||
return metadata;
|
||||
}
|
||||
const metadata = {
|
||||
// it contains the cell id, and the cell metadata, along with other nb cell metadata
|
||||
...(cell.metadata ?? {})
|
||||
};
|
||||
|
||||
return metadata;
|
||||
}
|
||||
}
|
||||
|
||||
export function getVSCodeCellLanguageId(metadata: CellMetadata): string | undefined {
|
||||
|
@ -90,7 +112,7 @@ export function removeVSCodeCellLanguageId(metadata: CellMetadata) {
|
|||
}
|
||||
|
||||
function createCodeCellFromNotebookCell(cell: NotebookCellData, preferredLanguage: string | undefined): nbformat.ICodeCell {
|
||||
const cellMetadata: CellMetadata = JSON.parse(JSON.stringify(getCellMetadata(cell)));
|
||||
const cellMetadata: CellMetadata = JSON.parse(JSON.stringify(getCellMetadata({ cell })));
|
||||
cellMetadata.metadata = cellMetadata.metadata || {}; // This cannot be empty.
|
||||
if (cell.languageId !== preferredLanguage) {
|
||||
setVSCodeCellLanguageId(cellMetadata, cell.languageId);
|
||||
|
@ -113,7 +135,7 @@ function createCodeCellFromNotebookCell(cell: NotebookCellData, preferredLanguag
|
|||
}
|
||||
|
||||
function createRawCellFromNotebookCell(cell: NotebookCellData): nbformat.IRawCell {
|
||||
const cellMetadata = getCellMetadata(cell);
|
||||
const cellMetadata = getCellMetadata({ cell });
|
||||
const rawCell: any = {
|
||||
cell_type: 'raw',
|
||||
source: splitMultilineString(cell.value.replace(/\r\n/g, '\n')),
|
||||
|
@ -364,7 +386,7 @@ function convertOutputMimeToJupyterOutput(mime: string, value: Uint8Array) {
|
|||
}
|
||||
|
||||
export function createMarkdownCellFromNotebookCell(cell: NotebookCellData): nbformat.IMarkdownCell {
|
||||
const cellMetadata = getCellMetadata(cell);
|
||||
const cellMetadata = getCellMetadata({ cell });
|
||||
const markdownCell: any = {
|
||||
cell_type: 'markdown',
|
||||
source: splitMultilineString(cell.value.replace(/\r\n/g, '\n')),
|
||||
|
|
|
@ -330,7 +330,9 @@ import { activate } from '../notebookModelStoreSync';
|
|||
cellChanges: [
|
||||
{
|
||||
cell,
|
||||
document: undefined,
|
||||
document: {
|
||||
languageId: 'javascript'
|
||||
} as any,
|
||||
metadata: undefined,
|
||||
outputs: undefined,
|
||||
executionSummary: undefined
|
||||
|
@ -465,7 +467,9 @@ import { activate } from '../notebookModelStoreSync';
|
|||
cellChanges: [
|
||||
{
|
||||
cell,
|
||||
document: undefined,
|
||||
document: {
|
||||
languageId: 'javascript'
|
||||
} as any,
|
||||
metadata: undefined,
|
||||
outputs: undefined,
|
||||
executionSummary: undefined
|
||||
|
@ -540,7 +544,9 @@ import { activate } from '../notebookModelStoreSync';
|
|||
cellChanges: [
|
||||
{
|
||||
cell,
|
||||
document: undefined,
|
||||
document: {
|
||||
languageId: 'powershell'
|
||||
} as any,
|
||||
metadata: undefined,
|
||||
outputs: undefined,
|
||||
executionSummary: undefined
|
||||
|
|
|
@ -64,7 +64,7 @@ function deepStripProperties(obj: any, props: string[]) {
|
|||
|
||||
const expectedCodeCell = new vscode.NotebookCellData(vscode.NotebookCellKind.Code, 'print(1)', 'python');
|
||||
expectedCodeCell.outputs = [];
|
||||
expectedCodeCell.metadata = useCustomPropertyInMetadata ? { custom: { metadata: {} } } : { metadata: {} };
|
||||
expectedCodeCell.metadata = useCustomPropertyInMetadata ? { custom: { execution_count: 10, metadata: {} } } : { execution_count: 10, metadata: {} };
|
||||
expectedCodeCell.executionSummary = { executionOrder: 10 };
|
||||
|
||||
const expectedMarkdownCell = new vscode.NotebookCellData(vscode.NotebookCellKind.Markup, '# HEAD', 'markdown');
|
||||
|
@ -105,7 +105,7 @@ function deepStripProperties(obj: any, props: string[]) {
|
|||
}
|
||||
};
|
||||
|
||||
const cellMetadata = getCellMetadata(markdownCell);
|
||||
const cellMetadata = getCellMetadata({ cell: markdownCell });
|
||||
assert.deepStrictEqual(cellMetadata, {
|
||||
id: '123',
|
||||
metadata: {
|
||||
|
|
|
@ -9,24 +9,4 @@ esac
|
|||
|
||||
ROOT="$(dirname "$(dirname "$(readlink -f "$0")")")"
|
||||
|
||||
# Do not remove this check.
|
||||
# Provides a way to skip the server requirements check from
|
||||
# outside the install flow. A system process can create this
|
||||
# file before the server is downloaded and installed.
|
||||
skip_check=0
|
||||
if [ -f "/tmp/vscode-skip-server-requirements-check" ]; then
|
||||
echo "!!! WARNING: Skipping server pre-requisite check !!!"
|
||||
echo "!!! Server stability is not guaranteed. Proceed at your own risk. !!!"
|
||||
skip_check=1
|
||||
fi
|
||||
|
||||
# Check platform requirements
|
||||
if [ "$(echo "$@" | grep -c -- "--skip-requirements-check")" -eq 0 ] && [ $skip_check -eq 0 ]; then
|
||||
$ROOT/bin/helpers/check-requirements.sh
|
||||
exit_code=$?
|
||||
if [ $exit_code -ne 0 ]; then
|
||||
exit $exit_code
|
||||
fi
|
||||
fi
|
||||
|
||||
"$ROOT/node" ${INSPECT:-} "$ROOT/out/server-main.js" "$@"
|
||||
|
|
9
resources/server/bin/helpers/check-requirements-linux-legacy.sh
Executable file
9
resources/server/bin/helpers/check-requirements-linux-legacy.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env sh
|
||||
#
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
echo "!!! WARNING: Using legacy server, please check https://aka.ms/vscode-remote/faq/old-linux for additional information !!!"
|
||||
exit 0
|
|
@ -761,6 +761,141 @@ suite('`Full` Auto Indent On Type - TypeScript/JavaScript', () => {
|
|||
});
|
||||
});
|
||||
|
||||
test.skip('issue #43244: indent after equal sign is detected', () => {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/43244
|
||||
// issue: Should indent after an equal sign is detected followed by whitespace characters.
|
||||
// This should be outdented when a semi-colon is detected indicating the end of the assignment.
|
||||
|
||||
const model = createTextModel([
|
||||
'const array ='
|
||||
].join('\n'), languageId, {});
|
||||
disposables.add(model);
|
||||
|
||||
withTestCodeEditor(model, { autoIndent: "full" }, (editor, viewModel, instantiationService) => {
|
||||
registerLanguage(instantiationService, languageId, Language.TypeScript, disposables);
|
||||
editor.setSelection(new Selection(1, 14, 1, 14));
|
||||
viewModel.type("\n", 'keyboard');
|
||||
assert.strictEqual(model.getValue(), [
|
||||
'const array =',
|
||||
' '
|
||||
].join('\n'));
|
||||
});
|
||||
});
|
||||
|
||||
test.skip('issue #43244: indent after dot detected after object/array signifying a method call', () => {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/43244
|
||||
// issue: When a dot is written, we should detect that this is a method call and indent accordingly
|
||||
|
||||
const model = createTextModel([
|
||||
'const array = [1, 2, 3];',
|
||||
'array.'
|
||||
].join('\n'), languageId, {});
|
||||
disposables.add(model);
|
||||
|
||||
withTestCodeEditor(model, { autoIndent: "full" }, (editor, viewModel, instantiationService) => {
|
||||
registerLanguage(instantiationService, languageId, Language.TypeScript, disposables);
|
||||
editor.setSelection(new Selection(2, 7, 2, 7));
|
||||
viewModel.type("\n", 'keyboard');
|
||||
assert.strictEqual(model.getValue(), [
|
||||
'const array = [1, 2, 3];',
|
||||
'array.',
|
||||
' '
|
||||
].join('\n'));
|
||||
});
|
||||
});
|
||||
|
||||
test.skip('issue #43244: indent after dot detected on a subsequent line after object/array signifying a method call', () => {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/43244
|
||||
// issue: When a dot is written, we should detect that this is a method call and indent accordingly
|
||||
|
||||
const model = createTextModel([
|
||||
'const array = [1, 2, 3]',
|
||||
].join('\n'), languageId, {});
|
||||
disposables.add(model);
|
||||
|
||||
withTestCodeEditor(model, { autoIndent: "full" }, (editor, viewModel, instantiationService) => {
|
||||
registerLanguage(instantiationService, languageId, Language.TypeScript, disposables);
|
||||
editor.setSelection(new Selection(2, 7, 2, 7));
|
||||
viewModel.type("\n", 'keyboard');
|
||||
viewModel.type(".");
|
||||
assert.strictEqual(model.getValue(), [
|
||||
'const array = [1, 2, 3]',
|
||||
' .'
|
||||
].join('\n'));
|
||||
});
|
||||
});
|
||||
|
||||
test.skip('issue #43244: keep indentation when methods called on object/array', () => {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/43244
|
||||
// Currently passes, but should pass with all the tests above too
|
||||
|
||||
const model = createTextModel([
|
||||
'const array = [1, 2, 3]',
|
||||
' .filter(() => true)'
|
||||
].join('\n'), languageId, {});
|
||||
disposables.add(model);
|
||||
|
||||
withTestCodeEditor(model, { autoIndent: "full" }, (editor, viewModel, instantiationService) => {
|
||||
registerLanguage(instantiationService, languageId, Language.TypeScript, disposables);
|
||||
editor.setSelection(new Selection(2, 24, 2, 24));
|
||||
viewModel.type("\n", 'keyboard');
|
||||
assert.strictEqual(model.getValue(), [
|
||||
'const array = [1, 2, 3]',
|
||||
' .filter(() => true)',
|
||||
' '
|
||||
].join('\n'));
|
||||
});
|
||||
});
|
||||
|
||||
test.skip('issue #43244: outdent when a semi-color is detected indicating the end of the assignment', () => {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/43244
|
||||
|
||||
const model = createTextModel([
|
||||
'const array = [1, 2, 3]',
|
||||
' .filter(() => true);'
|
||||
].join('\n'), languageId, {});
|
||||
disposables.add(model);
|
||||
|
||||
withTestCodeEditor(model, { autoIndent: "full" }, (editor, viewModel, instantiationService) => {
|
||||
registerLanguage(instantiationService, languageId, Language.TypeScript, disposables);
|
||||
editor.setSelection(new Selection(2, 25, 2, 25));
|
||||
viewModel.type("\n", 'keyboard');
|
||||
assert.strictEqual(model.getValue(), [
|
||||
'const array = [1, 2, 3]',
|
||||
' .filter(() => true);',
|
||||
''
|
||||
].join('\n'));
|
||||
});
|
||||
});
|
||||
|
||||
test.skip('issue #43244: indent when lambda arrow function is detected, outdent when end is reached', () => {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/43244
|
||||
|
||||
const model = createTextModel([
|
||||
'const array = [1, 2, 3, 4, 5];',
|
||||
'array.map(v =>)'
|
||||
].join('\n'), languageId, {});
|
||||
disposables.add(model);
|
||||
|
||||
withTestCodeEditor(model, { autoIndent: "full" }, (editor, viewModel, instantiationService) => {
|
||||
registerLanguage(instantiationService, languageId, Language.TypeScript, disposables);
|
||||
editor.setSelection(new Selection(2, 15, 2, 15));
|
||||
viewModel.type("\n", 'keyboard');
|
||||
assert.strictEqual(model.getValue(), [
|
||||
'const array = [1, 2, 3, 4, 5];',
|
||||
'array.map(v =>',
|
||||
' ',
|
||||
')'
|
||||
].join('\n'));
|
||||
});
|
||||
});
|
||||
|
||||
// Add tests for:
|
||||
// https://github.com/microsoft/vscode/issues/88638
|
||||
// https://github.com/microsoft/vscode/issues/63388
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
export const javascriptIndentationRules = {
|
||||
decreaseIndentPattern: /^((?!.*?\/\*).*\*\/)?\s*[\}\]].*$/,
|
||||
decreaseIndentPattern: /^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/,
|
||||
increaseIndentPattern: /^((?!\/\/).)*(\{([^}"'`]*|(\t|[ ])*\/\/.*)|\([^)"'`]*|\[[^\]"'`]*)$/,
|
||||
// e.g. * ...| or */| or *-----*/|
|
||||
unIndentedLinePattern: /^(\t|[ ])*[ ]\*[^/]*\*\/\s*$|^(\t|[ ])*[ ]\*\/\s*$|^(\t|[ ])*[ ]\*([ ]([^\*]|\*(?!\/))*)?$/,
|
||||
|
|
|
@ -309,4 +309,20 @@ suite('Auto-Reindentation - TypeScript/JavaScript', () => {
|
|||
const editOperations = getReindentEditOperations(model, languageConfigurationService, 1, model.getLineCount());
|
||||
assert.deepStrictEqual(editOperations.length, 0);
|
||||
});
|
||||
|
||||
test.skip('Issue 43244: incorrect indentation when signature of function call spans several lines', () => {
|
||||
|
||||
// issue: https://github.com/microsoft/vscode/issues/43244
|
||||
|
||||
const fileContents = [
|
||||
'function callSomeOtherFunction(one: number, two: number) { }',
|
||||
'function someFunction() {',
|
||||
' callSomeOtherFunction(4,',
|
||||
' 5)',
|
||||
'}',
|
||||
].join('\n');
|
||||
const model = disposables.add(instantiateTextModel(instantiationService, fileContents, languageId, options));
|
||||
const editOperations = getReindentEditOperations(model, languageConfigurationService, 1, model.getLineCount());
|
||||
assert.deepStrictEqual(editOperations.length, 0);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -819,13 +819,14 @@ export class HistoryService extends Disposable implements IHistoryService {
|
|||
this.editorHelper.clearOnEditorDispose(this.history.pop()!, this.editorHistoryListeners);
|
||||
}
|
||||
|
||||
// React to editor input disposing if this is a typed editor
|
||||
if (isEditorInput(historyInput)) {
|
||||
this.editorHelper.onEditorDispose(historyInput, () => this.updateHistoryOnEditorDispose(historyInput), this.editorHistoryListeners);
|
||||
// React to editor input disposing
|
||||
if (isEditorInput(editor)) {
|
||||
this.editorHelper.onEditorDispose(editor, () => this.updateHistoryOnEditorDispose(historyInput), this.editorHistoryListeners);
|
||||
}
|
||||
}
|
||||
|
||||
private updateHistoryOnEditorDispose(editor: EditorInput): void {
|
||||
private updateHistoryOnEditorDispose(editor: EditorInput | IResourceEditorInput): void {
|
||||
if (isEditorInput(editor)) {
|
||||
|
||||
// Any non side-by-side editor input gets removed directly on dispose
|
||||
if (!isSideBySideEditorInput(editor)) {
|
||||
|
@ -849,6 +850,13 @@ export class HistoryService extends Disposable implements IHistoryService {
|
|||
// side-by-side editor input is in the history stack
|
||||
this.replaceInHistory(editor, ...resourceInputs);
|
||||
}
|
||||
} else {
|
||||
|
||||
// Remove any editor that should not be included in history
|
||||
if (!this.includeInHistory(editor)) {
|
||||
this.removeFromHistory(editor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private includeInHistory(editor: EditorInput | IResourceEditorInput): boolean {
|
||||
|
@ -1019,7 +1027,10 @@ export class HistoryService extends Disposable implements IHistoryService {
|
|||
// We check on resource and `editorId` (from `override`)
|
||||
// to figure out if the editor has been already added.
|
||||
for (const editor of storedEditorHistory) {
|
||||
if (!handledEditors.has(`${editor.resource.toString()}/${editor.options?.override}`)) {
|
||||
if (
|
||||
!handledEditors.has(`${editor.resource.toString()}/${editor.options?.override}`) &&
|
||||
this.includeInHistory(editor)
|
||||
) {
|
||||
this.addToHistory(editor, false /* at the end */);
|
||||
}
|
||||
}
|
||||
|
@ -1162,6 +1173,10 @@ export class HistoryService extends Disposable implements IHistoryService {
|
|||
stack.disposable.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
for (const [, listener] of this.editorHistoryListeners) {
|
||||
listener.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue