Revert "Move bing settings to its own stage (#123504)" (#123523)

This reverts commit 62c9755886.
This commit is contained in:
Tyler James Leonhardt 2021-05-10 16:54:10 -07:00 committed by GitHub
parent ae998a9261
commit 4eef854ab4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 89 deletions

View file

@ -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

View file

@ -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

View file

@ -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:

View file

@ -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) => {