diff --git a/build/azure-pipelines/common/installDistro.ts b/build/azure-pipelines/common/installDistro.ts deleted file mode 100644 index 57fcadb8d3f..00000000000 --- a/build/azure-pipelines/common/installDistro.ts +++ /dev/null @@ -1,20 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as cp from 'child_process'; -import * as path from 'path'; - -function yarnInstall(packageName: string): void { - cp.execSync(`yarn add --no-lockfile ${packageName}`); - cp.execSync(`yarn add --no-lockfile ${packageName}`, { cwd: path.join( process.cwd(), 'remote') }); -} - -const product = require('../../../product.json'); -const dependencies = product.dependencies || {} as { [name: string]: string; }; - -Object.keys(dependencies).forEach(name => { - const url = dependencies[name]; - yarnInstall(url); -}); \ No newline at end of file diff --git a/build/azure-pipelines/common/installDistroDependencies.ts b/build/azure-pipelines/common/installDistroDependencies.ts new file mode 100644 index 00000000000..a0dd3a295db --- /dev/null +++ b/build/azure-pipelines/common/installDistroDependencies.ts @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. 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(); \ No newline at end of file diff --git a/build/azure-pipelines/darwin/product-build-darwin.yml b/build/azure-pipelines/darwin/product-build-darwin.yml index 5d6ec8c2cff..f136f2b4496 100644 --- a/build/azure-pipelines/darwin/product-build-darwin.yml +++ b/build/azure-pipelines/darwin/product-build-darwin.yml @@ -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 diff --git a/build/azure-pipelines/linux/build-arm.sh b/build/azure-pipelines/linux/build-arm.sh new file mode 100755 index 00000000000..4f01bc9a7e5 --- /dev/null +++ b/build/azure-pipelines/linux/build-arm.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -e +echo 'noop' \ No newline at end of file diff --git a/build/azure-pipelines/linux/prebuild-arm.sh b/build/azure-pipelines/linux/prebuild-arm.sh new file mode 100755 index 00000000000..4f01bc9a7e5 --- /dev/null +++ b/build/azure-pipelines/linux/prebuild-arm.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -e +echo 'noop' \ No newline at end of file diff --git a/build/azure-pipelines/linux/product-build-linux-arm.yml b/build/azure-pipelines/linux/product-build-linux-arm.yml new file mode 100644 index 00000000000..55350cce295 --- /dev/null +++ b/build/azure-pipelines/linux/product-build-linux-arm.yml @@ -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 \ No newline at end of file diff --git a/build/azure-pipelines/linux/product-build-linux.yml b/build/azure-pipelines/linux/product-build-linux.yml index f727e30d252..5ea5de8ade1 100644 --- a/build/azure-pipelines/linux/product-build-linux.yml +++ b/build/azure-pipelines/linux/product-build-linux.yml @@ -38,7 +38,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 diff --git a/build/azure-pipelines/linux/publish-arm.sh b/build/azure-pipelines/linux/publish-arm.sh new file mode 100755 index 00000000000..4f01bc9a7e5 --- /dev/null +++ b/build/azure-pipelines/linux/publish-arm.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -e +echo 'noop' \ No newline at end of file diff --git a/build/azure-pipelines/product-build.yml b/build/azure-pipelines/product-build.yml index c8bedfbffc0..8b013cb9211 100644 --- a/build/azure-pipelines/product-build.yml +++ b/build/azure-pipelines/product-build.yml @@ -1,11 +1,11 @@ resources: containers: - container: vscode-x64 - endpoint: VSCodeHub image: vscodehub.azurecr.io/vscode-linux-build-agent:x64 - - container: vscode-ia32 endpoint: VSCodeHub + - container: vscode-ia32 image: vscodehub.azurecr.io/vscode-linux-build-agent:ia32 + endpoint: VSCodeHub - container: snapcraft image: snapcore/snapcraft @@ -59,6 +59,15 @@ jobs: steps: - template: linux/product-build-linux.yml +- job: LinuxArmhf + condition: eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true') + pool: + vmImage: 'Ubuntu-16.04' + variables: + VSCODE_ARCH: armhf + steps: + - template: linux/product-build-linux-arm.yml + - job: macOS condition: eq(variables['VSCODE_BUILD_MACOS'], 'true') pool: @@ -76,6 +85,7 @@ jobs: - Linux - LinuxSnap - Linux32 + - LinuxArmhf - macOS steps: - template: sync-mooncake.yml \ No newline at end of file diff --git a/build/azure-pipelines/win32/product-build-win32.yml b/build/azure-pipelines/win32/product-build-win32.yml index 8a6a6abb658..339bdde1b9c 100644 --- a/build/azure-pipelines/win32/product-build-win32.yml +++ b/build/azure-pipelines/win32/product-build-win32.yml @@ -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 diff --git a/build/gulpfile.mixin.js b/build/gulpfile.mixin.js index 690cc874899..0f9b1d990f3 100644 --- a/build/gulpfile.mixin.js +++ b/build/gulpfile.mixin.js @@ -27,7 +27,8 @@ gulp.task('mixin', function () { fancyLog(ansiColors.blue('[mixin]'), `Mixing in sources:`); return vfs .src(`quality/${quality}/**`, { base: `quality/${quality}` }) - .pipe(filter(function (f) { return !f.isDirectory(); })) + .pipe(filter(f => !f.isDirectory())) + .pipe(filter(['**', '!**/package.json'])) .pipe(productJsonFilter) .pipe(buffer()) .pipe(json(o => Object.assign({}, require('../product.json'), o))) diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js index d7361082a89..8e2c4223bf0 100644 --- a/build/gulpfile.reh.js +++ b/build/gulpfile.reh.js @@ -13,4 +13,4 @@ gulp.task('vscode-reh-win32-ia32-min', noop); gulp.task('vscode-reh-win32-x64-min', noop); gulp.task('vscode-reh-darwin-min', noop); gulp.task('vscode-reh-linux-x64-min', noop); -gulp.task('vscode-reh-linux-arm-min', noop); +gulp.task('vscode-reh-linux-armhf-min', noop); diff --git a/package.json b/package.json index 0b4535c8260..5af9466a1ae 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.36.0", - "distro": "de0264486d700ff59c0acbe0e76f271f078027d8", + "distro": "5813bb8f127b63e9ad582178d9164f1153611f7a", "author": { "name": "Microsoft Corporation" }, @@ -155,4 +155,4 @@ "windows-mutex": "0.2.1", "windows-process-tree": "0.2.3" } -} +} \ No newline at end of file