From 4eef854ab476207dbbaadfff561fb4e9e6f8294e Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt Date: Mon, 10 May 2021 16:54:10 -0700 Subject: [PATCH] Revert "Move bing settings to its own stage (#123504)" (#123523) This reverts commit 62c975588654ee8e195d88598b434f10391ea762. --- .../darwin/product-build-darwin.yml | 8 +++ build/azure-pipelines/linux/product-bing.yml | 70 ------------------- build/azure-pipelines/product-build.yml | 13 ---- build/gulpfile.vscode.js | 12 ++-- 4 files changed, 14 insertions(+), 89 deletions(-) delete mode 100644 build/azure-pipelines/linux/product-bing.yml diff --git a/build/azure-pipelines/darwin/product-build-darwin.yml b/build/azure-pipelines/darwin/product-build-darwin.yml index 268f78ee3ea..566eeb80522 100644 --- a/build/azure-pipelines/darwin/product-build-darwin.yml +++ b/build/azure-pipelines/darwin/product-build-darwin.yml @@ -303,3 +303,11 @@ steps: artifact: vscode_web_darwin_$(VSCODE_ARCH)_archive-unsigned displayName: Publish web server archive condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), ne(variables['VSCODE_PUBLISH'], 'false')) + + - script: | + AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \ + VSCODE_ARCH="$(VSCODE_ARCH)" \ + yarn gulp upload-vscode-configuration + displayName: Upload configuration (for Bing settings search) + condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), ne(variables['VSCODE_PUBLISH'], 'false')) + continueOnError: true diff --git a/build/azure-pipelines/linux/product-bing.yml b/build/azure-pipelines/linux/product-bing.yml deleted file mode 100644 index 5cd99ff248d..00000000000 --- a/build/azure-pipelines/linux/product-bing.yml +++ /dev/null @@ -1,70 +0,0 @@ -# This stage only runs on linux -steps: - - task: NodeTool@0 - inputs: - versionSpec: "14.x" - - - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - inputs: - versionSpec: "1.x" - - - task: AzureKeyVault@1 - displayName: "Azure Key Vault: Get Secrets" - inputs: - azureSubscription: "vscode-builds-subscription" - KeyVaultName: vscode - - - script: | - set -e - cat << EOF > ~/.netrc - machine github.com - login vscode - password $(github-distro-mixin-password) - EOF - - git config user.email "vscode@microsoft.com" - git config user.name "VSCode" - displayName: Prepare tooling - - - script: | - set -e - git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro") - displayName: Merge distro - - - script: | - mkdir -p .build - node build/azure-pipelines/common/computeNodeModulesCacheKey.js $VSCODE_ARCH $ENABLE_TERRAPIN > .build/yarnlockhash - displayName: Prepare yarn cache flags - - # We should always pull from the cache since we are using the same agent as the Linux stage. - - task: Cache@2 - inputs: - key: 'nodeModules | $(Agent.OS) | .build/yarnlockhash' - path: .build/node_modules_cache - cacheHitVar: NODE_MODULES_RESTORED - displayName: Restore node_modules cache - - - script: | - set -e - tar -xzf .build/node_modules_cache/cache.tgz - condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true')) - displayName: Extract node_modules cache - - - download: current - artifact: vscode_client_linux_x64_archive-unsigned - displayName: Download x64 Linux build - - - script: | - ARTIFACT_PATH="$(Pipeline.Workspace)/vscode_client_linux_x64_archive-unsigned" - cd $ARTIFACT_PATH - ZIP_NAME=$(ls) - tar -xvf $ZIP_NAME - displayName: Unzip asset archive - - - script: | - yarn gulp upload-vscode-configuration - displayName: Upload configuration (for Bing settings search) - env: - AZURE_STORAGE_ACCESS_KEY: $(ticino-storage-key) - VSCODE_ARCH: x64 - continueOnError: true diff --git a/build/azure-pipelines/product-build.yml b/build/azure-pipelines/product-build.yml index 6a875fd7fc1..2c475b9dedd 100644 --- a/build/azure-pipelines/product-build.yml +++ b/build/azure-pipelines/product-build.yml @@ -241,19 +241,6 @@ stages: steps: - template: web/product-build-web.yml - - ${{ if ne(variables['VSCODE_PUBLISH'], 'false') }}: - - stage: BingSettingsSearch - displayName: Upload Configuration for Bing - dependsOn: - - Linux - pool: - vmImage: "Ubuntu-18.04" - jobs: - - job: BingSettingsSearchJob - displayName: Upload Configuration for Bing - steps: - - template: linux/product-bing.yml - - ${{ if and(eq(parameters.VSCODE_COMPILE_ONLY, false), eq(variables['VSCODE_BUILD_STAGE_MACOS'], true)) }}: - stage: macOS dependsOn: diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 50153eedcb1..3eeba69d258 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -467,12 +467,12 @@ gulp.task('vscode-translations-import', function () { })); }); -// This task is run in the Bing stage and only picks up the Linux asset +// This task is only run for the MacOS build const generateVSCodeConfigurationTask = task.define('generate-vscode-configuration', () => { return new Promise((resolve, reject) => { - const buildDir = process.env['PIPELINE_WORKSPACE']; + const buildDir = process.env['AGENT_BUILDDIRECTORY']; if (!buildDir) { - return reject(new Error('$PIPELINE_WORKSPACE not set')); + return reject(new Error('$AGENT_BUILDDIRECTORY not set')); } if (process.env.VSCODE_QUALITY !== 'insider' && process.env.VSCODE_QUALITY !== 'stable') { @@ -482,9 +482,9 @@ const generateVSCodeConfigurationTask = task.define('generate-vscode-configurati const userDataDir = path.join(os.tmpdir(), 'tmpuserdata'); const extensionsDir = path.join(os.tmpdir(), 'tmpextdir'); const arch = process.env['VSCODE_ARCH']; - const appRoot = path.join(buildDir, 'vscode_client_linux_x64_archive-unsigned', `VSCode-linux-${arch}`); - const appName = process.env.VSCODE_QUALITY === 'insider' ? 'code-insiders' : 'code'; - const appPath = path.join(appRoot, 'bin', appName); + const appRoot = path.join(buildDir, `VSCode-darwin-${arch}`); + const appName = process.env.VSCODE_QUALITY === 'insider' ? 'Visual\\ Studio\\ Code\\ -\\ Insiders.app' : 'Visual\\ Studio\\ Code.app'; + const appPath = path.join(appRoot, appName, 'Contents', 'Resources', 'app', 'bin', 'code'); const codeProc = cp.exec( `${appPath} --export-default-configuration='${allConfigDetailsPath}' --wait --user-data-dir='${userDataDir}' --extensions-dir='${extensionsDir}'`, (err, stdout, stderr) => {