Skip to content

Commit

Permalink
Merge from vscode 81d7885 (microsoft#5949)
Browse files Browse the repository at this point in the history
* Merge from vscode 81d7885

* Fix vs unit tests and hygiene issue

* Fix strict null check issue
  • Loading branch information
chlafreniere authored Jun 11, 2019
1 parent ff38bc8 commit d15a3fc
Show file tree
Hide file tree
Showing 926 changed files with 19,436 additions and 11,290 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ out-vscode-reh/
out-vscode-reh-min/
out-vscode-reh-pkg/
**/node_modules
src/vs/server
resources/server
build/node_modules
coverage/
test_data/
test-results/
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,4 @@
]
}
]
}
}
2 changes: 1 addition & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
disturl "https://atom.io/download/electron"
target "3.1.8"
target "4.2.3"
runtime "electron"
1 change: 0 additions & 1 deletion CODE_OF_CONDUCT.md

This file was deleted.

4 changes: 4 additions & 0 deletions build/.nativeignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# cleanup rules for native node modules, .gitignore style

nan/**
*/node_modules/nan/**

fsevents/binding.gyp
fsevents/fsevents.cc
fsevents/build/**
Expand Down Expand Up @@ -83,6 +86,7 @@ node-pty/binding.gyp
node-pty/build/**
node-pty/src/**
node-pty/tools/**
node-pty/deps/**
!node-pty/build/Release/*.exe
!node-pty/build/Release/*.dll
!node-pty/build/Release/*.node
Expand Down
20 changes: 0 additions & 20 deletions build/azure-pipelines/common/installDistro.ts

This file was deleted.

38 changes: 38 additions & 0 deletions build/azure-pipelines/common/installDistroDependencies.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as cp from 'child_process';
import * as path from 'path';
import * as fs from 'fs';

function yarnInstall(packageName: string, cwd: string): void {
console.log(`yarn add --no-lockfile ${packageName}`, cwd);
cp.execSync(`yarn add --no-lockfile ${packageName}`, { cwd, stdio: 'inherit' });
}

/**
* Install additional dependencies listed on each quality `package.json` file.
*/
function main() {
const quality = process.env['VSCODE_QUALITY'];

if (!quality) {
throw new Error('Missing VSCODE_QUALITY, can\'t install distro');
}

const rootPath = path.dirname(path.dirname(path.dirname(__dirname)));
const qualityPath = path.join(rootPath, 'quality', quality);
const packagePath = path.join(qualityPath, 'package.json');
const pkg = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
const dependencies = pkg.dependencies || {} as { [name: string]: string; };

Object.keys(dependencies).forEach(name => {
const url = dependencies[name];
const cwd = process.argv.length < 3 ? process.cwd() : path.join(process.cwd(), process.argv[2]);
yarnInstall(url, cwd);
});
}

main();
3 changes: 1 addition & 2 deletions build/azure-pipelines/common/symbols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export interface IVersionAccessor extends IApplicationAccessor {
enum Platform {
WIN_32 = 'win32-ia32',
WIN_64 = 'win32-x64',
LINUX_32 = 'linux-ia32',
LINUX_64 = 'linux-x64',
MAC_OS = 'darwin-x64'
}
Expand Down Expand Up @@ -191,7 +190,7 @@ if (process.platform === 'darwin') {
} else if (process.platform === 'win32') {
platform = is64 ? Platform.WIN_64 : Platform.WIN_32;
} else {
platform = is64 ? Platform.LINUX_64 : Platform.LINUX_32;
platform = Platform.LINUX_64;
}

// Create version and upload symbols in HockeyApp
Expand Down
3 changes: 2 additions & 1 deletion build/azure-pipelines/darwin/product-build-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ steps:
yarn gulp mixin
yarn gulp hygiene
yarn monaco-compile-check
node build/azure-pipelines/common/installDistro.js
node build/azure-pipelines/common/installDistroDependencies.js
node build/azure-pipelines/common/installDistroDependencies.js remote
node build/lib/builtInExtensions.js
displayName: Prepare build

Expand Down
3 changes: 3 additions & 0 deletions build/azure-pipelines/linux/build-arm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -e
echo 'noop'
3 changes: 3 additions & 0 deletions build/azure-pipelines/linux/prebuild-arm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -e
echo 'noop'
65 changes: 65 additions & 0 deletions build/azure-pipelines/linux/product-build-linux-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "10.15.1"

- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs:
versionSpec: "1.10.1"

- task: AzureKeyVault@1
displayName: 'Azure Key Vault: Get Secrets'
inputs:
azureSubscription: 'vscode-builds-subscription'
KeyVaultName: vscode

- task: Docker@1
displayName: 'Pull image'
inputs:
azureSubscriptionEndpoint: 'vscode-builds-subscription'
azureContainerRegistry: vscodehub.azurecr.io
command: 'Run an image'
imageName: 'vscode-linux-build-agent:armhf'
containerCommand: uname

- script: |
set -e
cat << EOF > ~/.netrc
machine monacotools.visualstudio.com
password $(devops-pat)
machine github.com
login vscode
password $(github-distro-mixin-password)
EOF
git config user.email "vscode@microsoft.com"
git config user.name "VSCode"
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
git fetch distro
git merge $(node -p "require('./package.json').distro")
CHILD_CONCURRENCY=1 yarn
yarn gulp mixin
yarn gulp hygiene
yarn monaco-compile-check
./build/azure-pipelines/linux/prebuild-arm.sh
displayName: Prepare build

- script: |
set -e
./build/azure-pipelines/linux/build-arm.sh
displayName: Build

- script: |
set -e
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
VSCODE_HOCKEYAPP_TOKEN="$(vscode-hockeyapp-token)" \
./build/azure-pipelines/linux/publish-arm.sh
displayName: Publish

- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
continueOnError: true
6 changes: 2 additions & 4 deletions build/azure-pipelines/linux/product-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ steps:
- script: |
set -e
export npm_config_arch="$(VSCODE_ARCH)"
if [[ "$(VSCODE_ARCH)" == "ia32" ]]; then
export PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig"
fi
cat << EOF > ~/.netrc
machine monacotools.visualstudio.com
Expand All @@ -38,7 +35,8 @@ steps:
yarn gulp mixin
yarn gulp hygiene
yarn monaco-compile-check
node build/azure-pipelines/common/installDistro.js
node build/azure-pipelines/common/installDistroDependencies.js
node build/azure-pipelines/common/installDistroDependencies.js remote
node build/lib/builtInExtensions.js
displayName: Prepare build

Expand Down
3 changes: 3 additions & 0 deletions build/azure-pipelines/linux/publish-arm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -e
echo 'noop'
6 changes: 2 additions & 4 deletions build/azure-pipelines/linux/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ ROOT="$REPO/.."

# Publish tarball
PLATFORM_LINUX="linux-$VSCODE_ARCH"
[[ "$VSCODE_ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64"
[[ "$VSCODE_ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64"
BUILDNAME="VSCode-$PLATFORM_LINUX"
BUILD="$ROOT/$BUILDNAME"
BUILD_VERSION="$(date +%s)"
Expand Down Expand Up @@ -39,7 +37,7 @@ node build/azure-pipelines/common/symbols.js "$VSCODE_MIXIN_PASSWORD" "$VSCODE_H
# Publish DEB
yarn gulp "vscode-linux-$VSCODE_ARCH-build-deb"
PLATFORM_DEB="linux-deb-$VSCODE_ARCH"
[[ "$VSCODE_ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64"
DEB_ARCH="amd64"
DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)"
DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME"

Expand All @@ -48,7 +46,7 @@ node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_DEB" p
# Publish RPM
yarn gulp "vscode-linux-$VSCODE_ARCH-build-rpm"
PLATFORM_RPM="linux-rpm-$VSCODE_ARCH"
[[ "$VSCODE_ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64"
RPM_ARCH="x86_64"
RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)"
RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME"

Expand Down
14 changes: 5 additions & 9 deletions build/azure-pipelines/product-build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
resources:
containers:
- container: vscode-x64
endpoint: VSCodeHub
image: vscodehub.azurecr.io/vscode-linux-build-agent:x64
- container: vscode-ia32
endpoint: VSCodeHub
image: vscodehub.azurecr.io/vscode-linux-build-agent:ia32
- container: snapcraft
image: snapcore/snapcraft

Expand Down Expand Up @@ -49,15 +46,14 @@ jobs:
steps:
- template: linux/snap-build-linux.yml

- job: Linux32
condition: eq(variables['VSCODE_BUILD_LINUX_32BIT'], 'true')
- job: LinuxArmhf
condition: eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true')
pool:
vmImage: 'Ubuntu-16.04'
variables:
VSCODE_ARCH: ia32
container: vscode-ia32
VSCODE_ARCH: armhf
steps:
- template: linux/product-build-linux.yml
- template: linux/product-build-linux-arm.yml

- job: macOS
condition: eq(variables['VSCODE_BUILD_MACOS'], 'true')
Expand All @@ -75,7 +71,7 @@ jobs:
- Windows32
- Linux
- LinuxSnap
- Linux32
- LinuxArmhf
- macOS
steps:
- template: sync-mooncake.yml
3 changes: 2 additions & 1 deletion build/azure-pipelines/win32/product-build-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ steps:
exec { yarn gulp mixin }
exec { yarn gulp hygiene }
exec { yarn monaco-compile-check }
exec { node build/azure-pipelines/common/installDistro.js }
exec { node build/azure-pipelines/common/installDistroDependencies.js }
exec { node build/azure-pipelines/common/installDistroDependencies.js remote }
exec { node build/lib/builtInExtensions.js }
displayName: Prepare build

Expand Down
Loading

0 comments on commit d15a3fc

Please sign in to comment.