diff --git a/build/.cachesalt b/build/.cachesalt deleted file mode 100644 index 56a6051ca2b02b04ef92d5150c9ef600403cb1de..0000000000000000000000000000000000000000 --- a/build/.cachesalt +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/build/azure-pipelines/compile.yml b/build/azure-pipelines/compile.yml new file mode 100644 index 0000000000000000000000000000000000000000..a6b7f79a8a55b28087ee3dc935c750692319d8f4 --- /dev/null +++ b/build/azure-pipelines/compile.yml @@ -0,0 +1,78 @@ +steps: +- task: AzureKeyVault@1 + displayName: 'Azure Key Vault: Get Secrets' + inputs: + azureSubscription: 'vscode-builds-subscription' + KeyVaultName: vscode + +- task: NodeTool@0 + inputs: + versionSpec: "10.15.1" + +- 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" + displayName: Prepare tooling + +- script: | + set -e + git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git" + git fetch distro + git merge $(node -p "require('./package.json').distro") + displayName: Merge distro + +# - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 +# inputs: +# keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' +# targetfolder: '**/node_modules, !**/node_modules/**/node_modules' +# vstsFeed: '$(ArtifactFeed)' + +- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 + inputs: + versionSpec: "1.10.1" + +- script: 'yarn --frozen-lockfile' + displayName: Install Dependencies + condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) + +# - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 +# inputs: +# keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' +# targetfolder: '**/node_modules, !**/node_modules/**/node_modules' +# vstsFeed: '$(ArtifactFeed)' +# condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) + +- script: 'yarn gulp mixin' + displayName: Mix in quality + +- script: 'yarn gulp hygiene' + displayName: Run hygiene checks + +- script: 'yarn monaco-compile-check' + displayName: Run Monaco compilation checks + +- script: | + set -e + cd $BUILD_STAGINGDIRECTORY + git clone https://github.com/microsoft/vscode-telemetry-extractor.git + cd vscode-telemetry-extractor + git checkout 3b04aba5bfdfcca1a5426cd2c51a90d18740d0bc + npm i + npm run setup-extension-repos + node ./out/cli-extract.js --sourceDir $BUILD_SOURCESDIRECTORY --excludedDirPattern extensions --outputDir . --applyEndpoints --includeIsMeasurement --patchWebsiteEvents + node ./out/cli-extract-extensions.js --sourceDir ./src/telemetry-sources --outputDir . --applyEndpoints --includeIsMeasurement + mkdir -p $BUILD_SOURCESDIRECTORY/.build/telemetry + mv declarations-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-core.json + mv declarations-extensions-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-extensions.json + displayName: Extract Telemetry + +- script: 'VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" ./build/azure-pipelines/linux/build.sh' + displayName: Build \ 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 2fcc73f632d6f5bfc6ae6e37b574410710652848..14d3acdf422d4329158ce36178f5bdf472d57e59 100644 --- a/build/azure-pipelines/darwin/product-build-darwin.yml +++ b/build/azure-pipelines/darwin/product-build-darwin.yml @@ -1,23 +1,4 @@ steps: -- script: | - mkdir -p .build - echo -n $BUILD_SOURCEVERSION > .build/commit - displayName: Prepare cache flag - -- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 - inputs: - keyfile: '.build/commit' - targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-web-min' - vstsFeed: 'npm-vscode' - platformIndependent: true - alias: 'Compilation' - -- script: | - set -e - exit 1 - displayName: Check RestoreCache - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) - - task: NodeTool@0 inputs: versionSpec: "10.15.1" @@ -56,19 +37,19 @@ steps: - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 inputs: - keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, quality/*/package.json, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' + keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' targetfolder: '**/node_modules, !**/node_modules/**/node_modules' vstsFeed: 'npm-vscode' - script: | set -e - CHILD_CONCURRENCY=1 yarn --frozen-lockfile + yarn --frozen-lockfile displayName: Install dependencies condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 inputs: - keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, quality/*/package.json, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' + keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' targetfolder: '**/node_modules, !**/node_modules/**/node_modules' vstsFeed: 'npm-vscode' condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) @@ -79,25 +60,41 @@ steps: displayName: Run postinstall scripts condition: and(succeeded(), eq(variables['CacheRestored'], 'true')) +- script: | + set -e + yarn gulp mixin + displayName: Mix in quality + +- script: | + set -e + yarn gulp hygiene + yarn monaco-compile-check + displayName: Run hygiene checks + condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) + - script: | set -e node build/azure-pipelines/common/installDistroDependencies.js node build/azure-pipelines/common/installDistroDependencies.js remote - displayName: Install distro dependencies + node build/lib/builtInExtensions.js + displayName: Install distro dependencies and extensions - script: | set -e - yarn gulp mixin - displayName: Mix in quality + ./build/azure-pipelines/common/extract-telemetry.sh + displayName: Extract Telemetry - script: | set -e + yarn gulp compile-build + yarn gulp compile-extensions-build-legacy + yarn gulp compile-extensions-build VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ - yarn gulp vscode-darwin-min-ci + yarn gulp vscode-darwin-ci VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ - yarn gulp vscode-reh-darwin-min-ci + yarn gulp vscode-reh-darwin-ci VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ - yarn gulp vscode-web-darwin-min-ci + yarn gulp vscode-web-darwin-ci AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \ yarn gulp upload-vscode-sourcemaps displayName: Build diff --git a/build/azure-pipelines/linux/multiarch/alpine/build.sh b/build/azure-pipelines/linux/build-alpine.sh similarity index 100% rename from build/azure-pipelines/linux/multiarch/alpine/build.sh rename to build/azure-pipelines/linux/build-alpine.sh diff --git a/build/azure-pipelines/linux/multiarch/alpine/prebuild.sh b/build/azure-pipelines/linux/build-arm.sh similarity index 100% rename from build/azure-pipelines/linux/multiarch/alpine/prebuild.sh rename to build/azure-pipelines/linux/build-arm.sh diff --git a/build/azure-pipelines/linux/multiarch/alpine/publish.sh b/build/azure-pipelines/linux/prebuild-alpine.sh similarity index 100% rename from build/azure-pipelines/linux/multiarch/alpine/publish.sh rename to build/azure-pipelines/linux/prebuild-alpine.sh diff --git a/build/azure-pipelines/linux/multiarch/armhf/build.sh b/build/azure-pipelines/linux/prebuild-arm.sh similarity index 100% rename from build/azure-pipelines/linux/multiarch/armhf/build.sh rename to build/azure-pipelines/linux/prebuild-arm.sh diff --git a/build/azure-pipelines/linux/product-build-linux-alpine.yml b/build/azure-pipelines/linux/product-build-linux-alpine.yml new file mode 100644 index 0000000000000000000000000000000000000000..76eb8a660dadc97c51cba50a81cf01920b538cf4 --- /dev/null +++ b/build/azure-pipelines/linux/product-build-linux-alpine.yml @@ -0,0 +1,108 @@ +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:alpine' + 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" + displayName: Prepare tooling + +- script: | + set -e + git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git" + git fetch distro + git merge $(node -p "require('./package.json').distro") + displayName: Merge distro + +- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 + inputs: + keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' + targetfolder: '**/node_modules, !**/node_modules/**/node_modules' + vstsFeed: 'npm-vscode' + +- script: | + set -e + yarn --frozen-lockfile + displayName: Install dependencies + condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) + +- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 + inputs: + keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' + targetfolder: '**/node_modules, !**/node_modules/**/node_modules' + vstsFeed: 'npm-vscode' + condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) + +- script: | + set -e + yarn postinstall + displayName: Run postinstall scripts + condition: and(succeeded(), eq(variables['CacheRestored'], 'true')) + +- script: | + set -e + yarn gulp mixin + displayName: Mix in quality + +- script: | + set -e + yarn gulp hygiene + yarn monaco-compile-check + displayName: Run hygiene checks + condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) + +- script: | + set -e + ./build/azure-pipelines/linux/prebuild-alpine.sh + displayName: Prepare build + +- script: | + set -e + yarn gulp compile-build + yarn gulp compile-extensions-build-legacy + yarn gulp compile-extensions-build + ./build/azure-pipelines/linux/build-alpine.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-alpine.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-multiarch.yml b/build/azure-pipelines/linux/product-build-linux-arm.yml similarity index 67% rename from build/azure-pipelines/linux/product-build-linux-multiarch.yml rename to build/azure-pipelines/linux/product-build-linux-arm.yml index fb255944c0465eaa576067ef51401b2ea7356936..a77751644d0c46579152d492a73f4f15776f9264 100644 --- a/build/azure-pipelines/linux/product-build-linux-multiarch.yml +++ b/build/azure-pipelines/linux/product-build-linux-arm.yml @@ -1,23 +1,4 @@ steps: -- script: | - mkdir -p .build - echo -n $BUILD_SOURCEVERSION > .build/commit - displayName: Prepare cache flag - -- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 - inputs: - keyfile: '.build/commit' - targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-web-min' - vstsFeed: 'npm-vscode' - platformIndependent: true - alias: 'Compilation' - -- script: | - set -e - exit 1 - displayName: Check RestoreCache - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) - - task: NodeTool@0 inputs: versionSpec: "10.15.1" @@ -38,7 +19,7 @@ steps: azureSubscriptionEndpoint: 'vscode-builds-subscription' azureContainerRegistry: vscodehub.azurecr.io command: 'Run an image' - imageName: 'vscode-linux-build-agent:$(VSCODE_ARCH)' + imageName: 'vscode-linux-build-agent:armhf' containerCommand: uname - script: | @@ -65,19 +46,19 @@ steps: - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 inputs: - keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, quality/*/package.json, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' + keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' targetfolder: '**/node_modules, !**/node_modules/**/node_modules' vstsFeed: 'npm-vscode' - script: | set -e - CHILD_CONCURRENCY=1 yarn --frozen-lockfile + yarn --frozen-lockfile displayName: Install dependencies condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 inputs: - keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, quality/*/package.json, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' + keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' targetfolder: '**/node_modules, !**/node_modules/**/node_modules' vstsFeed: 'npm-vscode' condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) @@ -95,12 +76,22 @@ steps: - script: | set -e - ./build/azure-pipelines/linux/multiarch/$(VSCODE_ARCH)/prebuild.sh + yarn gulp hygiene + yarn monaco-compile-check + displayName: Run hygiene checks + condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) + +- script: | + set -e + ./build/azure-pipelines/linux/prebuild-arm.sh displayName: Prebuild - script: | set -e - ./build/azure-pipelines/linux/multiarch/$(VSCODE_ARCH)/build.sh + yarn gulp compile-build + yarn gulp compile-extensions-build-legacy + yarn gulp compile-extensions-build + ./build/azure-pipelines/linux/build-arm.sh displayName: Build - script: | @@ -109,7 +100,7 @@ steps: 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/multiarch/$(VSCODE_ARCH)/publish.sh + ./build/azure-pipelines/linux/publish-arm.sh displayName: Publish - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 diff --git a/build/azure-pipelines/linux/product-build-linux.yml b/build/azure-pipelines/linux/product-build-linux.yml index 369c8abc7d0624e2cb7c43b7408c7269d1458de4..0ccfcc6e852f3e0c26af5fae60e763a60effe97b 100644 --- a/build/azure-pipelines/linux/product-build-linux.yml +++ b/build/azure-pipelines/linux/product-build-linux.yml @@ -1,23 +1,4 @@ steps: -- script: | - mkdir -p .build - echo -n $BUILD_SOURCEVERSION > .build/commit - displayName: Prepare cache flag - -- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 - inputs: - keyfile: '.build/commit' - targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-web-min' - vstsFeed: 'npm-vscode' - platformIndependent: true - alias: 'Compilation' - -- script: | - set -e - exit 1 - displayName: Check RestoreCache - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) - - task: NodeTool@0 inputs: versionSpec: "10.15.1" @@ -57,19 +38,19 @@ steps: - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 inputs: - keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, quality/*/package.json, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' + keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' targetfolder: '**/node_modules, !**/node_modules/**/node_modules' vstsFeed: 'npm-vscode' - script: | set -e - CHILD_CONCURRENCY=1 yarn --frozen-lockfile + yarn --frozen-lockfile displayName: Install dependencies condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 inputs: - keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, quality/*/package.json, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' + keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' targetfolder: '**/node_modules, !**/node_modules/**/node_modules' vstsFeed: 'npm-vscode' condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) @@ -80,19 +61,35 @@ steps: displayName: Run postinstall scripts condition: and(succeeded(), eq(variables['CacheRestored'], 'true')) +- script: | + set -e + yarn gulp mixin + displayName: Mix in quality + +- script: | + set -e + yarn gulp hygiene + yarn monaco-compile-check + displayName: Run hygiene checks + condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) + - script: | set -e node build/azure-pipelines/common/installDistroDependencies.js node build/azure-pipelines/common/installDistroDependencies.js remote - displayName: Install distro dependencies + node build/lib/builtInExtensions.js + displayName: Install distro dependencies and extensions - script: | set -e - yarn gulp mixin - displayName: Mix in quality + ./build/azure-pipelines/common/extract-telemetry.sh + displayName: Extract Telemetry - script: | set -e + yarn gulp compile-build + yarn gulp compile-extensions-build-legacy + yarn gulp compile-extensions-build VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ yarn gulp vscode-linux-$VSCODE_ARCH-min-ci VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ @@ -122,12 +119,12 @@ steps: ./build/azure-pipelines/linux/publish.sh displayName: Publish +- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 + displayName: 'Component Detection' + continueOnError: true + - task: PublishPipelineArtifact@0 displayName: 'Publish Pipeline Artifact' inputs: artifactName: snap-$(VSCODE_ARCH) targetPath: .build/linux/snap-tarball - -- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 - displayName: 'Component Detection' - continueOnError: true diff --git a/build/azure-pipelines/linux/multiarch/armhf/prebuild.sh b/build/azure-pipelines/linux/publish-alpine.sh similarity index 100% rename from build/azure-pipelines/linux/multiarch/armhf/prebuild.sh rename to build/azure-pipelines/linux/publish-alpine.sh diff --git a/build/azure-pipelines/linux/multiarch/armhf/publish.sh b/build/azure-pipelines/linux/publish-arm.sh similarity index 100% rename from build/azure-pipelines/linux/multiarch/armhf/publish.sh rename to build/azure-pipelines/linux/publish-arm.sh diff --git a/build/azure-pipelines/product-build.yml b/build/azure-pipelines/product-build.yml index ddaabdcdc724b62c06e17a010d6919caafc092dc..aca968c646da3da02b7afb30bbb876ae33e3cb2f 100644 --- a/build/azure-pipelines/product-build.yml +++ b/build/azure-pipelines/product-build.yml @@ -7,54 +7,45 @@ resources: image: snapcore/snapcraft:stable jobs: -- job: Compile - pool: - vmImage: 'Ubuntu-16.04' - variables: - VSCODE_ARCH: x64 - container: vscode-x64 - steps: - - template: product-compile.yml +# - job: Compile +# pool: +# vmImage: 'Ubuntu-16.04' +# steps: +# - template: compile.yml - job: Windows - condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_WIN32'], 'true')) + condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32'], 'true')) timeoutInMinutes: 120 pool: vmImage: VS2017-Win2016 variables: VSCODE_ARCH: x64 - dependsOn: - - Compile steps: - template: win32/product-build-win32.yml - job: Windows32 - condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_WIN32_32BIT'], 'true')) + condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32_32BIT'], 'true')) timeoutInMinutes: 120 pool: vmImage: VS2017-Win2016 variables: VSCODE_ARCH: ia32 - dependsOn: - - Compile steps: - template: win32/product-build-win32.yml - job: Linux - condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX'], 'true')) + condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX'], 'true')) timeoutInMinutes: 120 pool: vmImage: 'Ubuntu-16.04' variables: VSCODE_ARCH: x64 container: vscode-x64 - dependsOn: - - Compile steps: - template: linux/product-build-linux.yml - job: LinuxSnap - condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX'], 'true')) + condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX'], 'true')) timeoutInMinutes: 120 pool: vmImage: 'Ubuntu-16.04' @@ -66,41 +57,35 @@ jobs: - template: linux/snap-build-linux.yml - job: LinuxArmhf - condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true'), ne(variables['VSCODE_QUALITY'], 'stable')) + condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true'), ne(variables['VSCODE_QUALITY'], 'stable')) timeoutInMinutes: 120 pool: vmImage: 'Ubuntu-16.04' variables: VSCODE_ARCH: armhf - dependsOn: - - Compile steps: - - template: linux/product-build-linux-multiarch.yml + - template: linux/product-build-linux-arm.yml - job: LinuxAlpine - condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ALPINE'], 'true'), ne(variables['VSCODE_QUALITY'], 'stable')) + condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ALPINE'], 'true'), ne(variables['VSCODE_QUALITY'], 'stable')) timeoutInMinutes: 120 pool: vmImage: 'Ubuntu-16.04' variables: VSCODE_ARCH: alpine - dependsOn: - - Compile steps: - - template: linux/product-build-linux-multiarch.yml + - template: linux/product-build-linux-alpine.yml - job: macOS - condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_MACOS'], 'true')) + condition: and(succeeded(), eq(variables['VSCODE_BUILD_MACOS'], 'true')) timeoutInMinutes: 120 pool: vmImage: macOS 10.13 - dependsOn: - - Compile steps: - template: darwin/product-build-darwin.yml - job: Release - condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), or(eq(variables['VSCODE_RELEASE'], 'true'), and(or(eq(variables['VSCODE_QUALITY'], 'insider'), eq(variables['VSCODE_QUALITY'], 'exploration')), eq(variables['Build.Reason'], 'Schedule')))) + condition: and(succeeded(), or(eq(variables['VSCODE_RELEASE'], 'true'), and(or(eq(variables['VSCODE_QUALITY'], 'insider'), eq(variables['VSCODE_QUALITY'], 'exploration')), eq(variables['Build.Reason'], 'Schedule')))) pool: vmImage: 'Ubuntu-16.04' dependsOn: @@ -117,7 +102,7 @@ jobs: - job: Mooncake pool: vmImage: 'Ubuntu-16.04' - condition: and(succeededOrFailed(), eq(variables['VSCODE_COMPILE_ONLY'], 'false')) + condition: true dependsOn: - Windows - Windows32 diff --git a/build/azure-pipelines/product-compile.yml b/build/azure-pipelines/product-compile.yml deleted file mode 100644 index a894140f52dd9d7ef21df29b4c139dc4dab3d692..0000000000000000000000000000000000000000 --- a/build/azure-pipelines/product-compile.yml +++ /dev/null @@ -1,121 +0,0 @@ -steps: -- script: | - mkdir -p .build - echo -n $BUILD_SOURCEVERSION > .build/commit - displayName: Prepare cache flag - -- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 - inputs: - keyfile: '.build/commit' - targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-web-min' - vstsFeed: 'npm-vscode' - platformIndependent: true - alias: 'Compilation' - -- task: NodeTool@0 - inputs: - versionSpec: "10.15.1" - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) - -- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - inputs: - versionSpec: "1.10.1" - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) - -- task: AzureKeyVault@1 - displayName: 'Azure Key Vault: Get Secrets' - inputs: - azureSubscription: 'vscode-builds-subscription' - KeyVaultName: vscode - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) - -- script: | - set -e - export npm_config_arch="$(VSCODE_ARCH)" - - 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" - displayName: Prepare tooling - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) - -- script: | - set -e - git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git" - git fetch distro - git merge $(node -p "require('./package.json').distro") - displayName: Merge distro - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) - -- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 - inputs: - keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, quality/*/package.json, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' - targetfolder: '**/node_modules, !**/node_modules/**/node_modules' - vstsFeed: 'npm-vscode' - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) - -- script: | - set -e - CHILD_CONCURRENCY=1 yarn --frozen-lockfile - displayName: Install dependencies - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), ne(variables['CacheRestored'], 'true')) - -- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 - inputs: - keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, quality/*/package.json, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' - targetfolder: '**/node_modules, !**/node_modules/**/node_modules' - vstsFeed: 'npm-vscode' - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), ne(variables['CacheRestored'], 'true')) - -- script: | - set -e - yarn postinstall - displayName: Run postinstall scripts - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), eq(variables['CacheRestored'], 'true')) - -- script: | - set -e - node build/azure-pipelines/common/installDistroDependencies.js - node build/azure-pipelines/common/installDistroDependencies.js remote - displayName: Install distro dependencies - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) - -- script: | - set -e - yarn gulp hygiene - yarn monaco-compile-check - displayName: Run hygiene checks - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), eq(variables['VSCODE_STEP_ON_IT'], 'false')) - -- script: | - set - - ./build/azure-pipelines/common/extract-telemetry.sh - displayName: Extract Telemetry - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) - -- script: | - set -e - yarn gulp compile-build - yarn gulp compile-extensions-build-legacy - yarn gulp compile-extensions-build - yarn gulp minify-vscode - yarn gulp minify-vscode-reh - yarn gulp minify-vscode-web - displayName: Compile - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) - -- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 - inputs: - keyfile: '.build/commit' - targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-web-min' - vstsFeed: 'npm-vscode' - platformIndependent: true - alias: 'Compilation' - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) \ 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 0aba8e8c3ce44fbe50bd182b082ffee6af21310f..27d2e8ba15d445988ea8bd6da92772393a9fd0f0 100644 --- a/build/azure-pipelines/win32/product-build-win32.yml +++ b/build/azure-pipelines/win32/product-build-win32.yml @@ -1,23 +1,4 @@ steps: -- powershell: | - mkdir .build -ea 0 - "$env:BUILD_SOURCEVERSION" | Out-File -Encoding ascii -NoNewLine .build\commit - displayName: Prepare cache flag - -- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 - inputs: - keyfile: '.build/commit' - targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-web-min' - vstsFeed: 'npm-vscode' - platformIndependent: true - alias: 'Compilation' - -- powershell: | - $ErrorActionPreference = "Stop" - exit 1 - displayName: Check RestoreCache - condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true')) - - task: NodeTool@0 inputs: versionSpec: "10.15.1" @@ -59,7 +40,7 @@ steps: - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 inputs: - keyfile: 'build/.cachesalt, .build/arch, .yarnrc, remote/.yarnrc, quality/*/package.json, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' + keyfile: '.build/arch, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' targetfolder: '**/node_modules, !**/node_modules/**/node_modules' vstsFeed: 'npm-vscode' @@ -74,7 +55,7 @@ steps: - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 inputs: - keyfile: 'build/.cachesalt, .build/arch, .yarnrc, remote/.yarnrc, quality/*/package.json, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' + keyfile: '.build/arch, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' targetfolder: '**/node_modules, !**/node_modules/**/node_modules' vstsFeed: 'npm-vscode' condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) @@ -86,23 +67,51 @@ steps: displayName: Run postinstall scripts condition: and(succeeded(), eq(variables['CacheRestored'], 'true')) +- powershell: | + . build/azure-pipelines/win32/exec.ps1 + $ErrorActionPreference = "Stop" + exec { yarn gulp mixin } + displayName: Mix in quality + +- powershell: | + . build/azure-pipelines/win32/exec.ps1 + $ErrorActionPreference = "Stop" + exec { yarn gulp hygiene } + exec { yarn monaco-compile-check } + displayName: Run hygiene checks + condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) + - powershell: | . build/azure-pipelines/win32/exec.ps1 $ErrorActionPreference = "Stop" exec { node build/azure-pipelines/common/installDistroDependencies.js } exec { node build/azure-pipelines/common/installDistroDependencies.js remote } - displayName: Install distro dependencies + exec { node build/lib/builtInExtensions.js } + displayName: Install distro dependencies and extensions - powershell: | . build/azure-pipelines/win32/exec.ps1 $ErrorActionPreference = "Stop" - exec { yarn gulp mixin } - displayName: Mix in quality + cd $env:BUILD_STAGINGDIRECTORY + exec { git clone https://github.com/microsoft/vscode-telemetry-extractor.git } + cd vscode-telemetry-extractor + exec { git checkout f538e3157c84d1bd0b239dfc5ebccac226006d58 } + exec { npm i } + exec { npm run setup-extension-repos } + exec { node .\out\cli-extract.js --sourceDir $env:BUILD_SOURCESDIRECTORY --excludedDirPattern extensions --outputDir . --applyEndpoints --includeIsMeasurement --patchWebsiteEvents } + exec { node .\out\cli-extract-extensions.js --sourceDir .\src\telemetry-sources --outputDir . --applyEndpoints --includeIsMeasurement } + mkdir $env:BUILD_SOURCESDIRECTORY\.build\telemetry -ea 0 + mv declarations-resolved.json $env:BUILD_SOURCESDIRECTORY\.build\telemetry\telemetry-core.json + mv declarations-extensions-resolved.json $env:BUILD_SOURCESDIRECTORY\.build\telemetry\telemetry-extensions.json + displayName: Extract Telemetry - powershell: | . build/azure-pipelines/win32/exec.ps1 $ErrorActionPreference = "Stop" $env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" + exec { yarn gulp compile-build } + exec { yarn gulp compile-extensions-build-legacy } + exec { yarn gulp compile-extensions-build } exec { yarn gulp "vscode-win32-$env:VSCODE_ARCH-min-ci" } exec { yarn gulp "vscode-reh-win32-$env:VSCODE_ARCH-min-ci" } exec { yarn gulp "vscode-web-win32-$env:VSCODE_ARCH-min-ci" } diff --git a/build/gulpfile.compile.js b/build/gulpfile.compile.js index 21aa7896558272450c02e69ff8fb07282bfc9947..a32936ef4b292be5595d8f14e75f3813fabdadee 100644 --- a/build/gulpfile.compile.js +++ b/build/gulpfile.compile.js @@ -5,12 +5,10 @@ 'use strict'; -const gulp = require('gulp'); const util = require('./lib/util'); const task = require('./lib/task'); const compilation = require('./lib/compilation'); // Full compile, including nls and inline sources in sourcemaps, for build const compileBuildTask = task.define('compile-build', task.series(util.rimraf('out-build'), compilation.compileTask('src', 'out-build', true))); -gulp.task(compileBuildTask); exports.compileBuildTask = compileBuildTask; \ No newline at end of file diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 2475b3b6c45eff08a89f84735f04c62ca7ac6933..2846595f6057512a43690f964e878f79e7cb6b10 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -104,7 +104,6 @@ const optimizeVSCodeTask = task.define('optimize-vscode', task.series( bundleInfo: undefined }) )); -gulp.task(optimizeVSCodeTask); const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${commit}`; const minifyVSCodeTask = task.define('minify-vscode', task.series( @@ -118,7 +117,6 @@ const minifyVSCodeTask = task.define('minify-vscode', task.series( }, common.minifyTask('out-vscode', `${sourceMappingURLBase}/core`) )); -gulp.task(minifyVSCodeTask); // Package @@ -309,22 +307,13 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op const telemetry = gulp.src('.build/telemetry/**', { base: '.build/telemetry', dot: true }); - const dependenciesSrc = _.flatten(productionDependencies.map(d => path.relative(root, d.path)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`])); + const depsSrc = [ + ..._.flatten(productionDependencies.map(d => path.relative(root, d.path)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`])), + // @ts-ignore JSON checking: dependencies is optional + ..._.flatten(Object.keys(product.dependencies || {}).map(d => [`node_modules/${d}/**`, `!node_modules/${d}/**/{test,tests}/**`])) + ]; - // Collect distro dependencies, if any - if (quality) { - const qualityPackagePath = path.join(root, 'quality', quality, 'package.json'); - - if (fs.existsSync(qualityPackagePath)) { - const pkg = JSON.parse(fs.readFileSync(qualityPackagePath, 'utf8')); - - // @ts-ignore JSON checking: dependencies is optional - const distroDependencies = _.flatten(Object.keys(pkg.dependencies || {}).map(d => [`node_modules/${d}/**`, `!node_modules/${d}/**/{test,tests}/**`])); - dependenciesSrc.push(...distroDependencies); - } - } - - const deps = gulp.src(dependenciesSrc, { base: '.', dot: true }) + const deps = gulp.src(depsSrc, { base: '.', dot: true }) .pipe(filter(['**', '!**/package-lock.json'])) .pipe(util.cleanNodeModules(path.join(__dirname, '.nativeignore'))) .pipe(createAsar(path.join(process.cwd(), 'node_modules'), ['**/*.node', '**/vscode-ripgrep/bin/*', '**/node-pty/build/Release/*'], 'app/node_modules.asar')); @@ -449,6 +438,7 @@ BUILD_TARGETS.forEach(buildTarget => { const destinationFolderName = `VSCode${dashed(platform)}${dashed(arch)}`; const vscodeTaskCI = task.define(`vscode${dashed(platform)}${dashed(arch)}${dashed(minified)}-ci`, task.series( + minified ? minifyVSCodeTask : optimizeVSCodeTask, util.rimraf(path.join(buildRoot, destinationFolderName)), packageTask(platform, arch, sourceFolderName, destinationFolderName, opts) )); @@ -457,7 +447,6 @@ BUILD_TARGETS.forEach(buildTarget => { const vscodeTask = task.define(`vscode${dashed(platform)}${dashed(arch)}${dashed(minified)}`, task.series( compileBuildTask, compileExtensionsBuildTask, - minified ? minifyVSCodeTask : optimizeVSCodeTask, vscodeTaskCI )); gulp.task(vscodeTask); diff --git a/package.json b/package.json index df3df6ff757133dfa6f77b4574fd491573e12818..38463fe255f637c4beecc678f3bba51121892f77 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "65898cd4327756aaf3f5e65f02d0e1edee2db1a9", + "distro": "232f54dd8c50f5bdf086c2c557a42954a41170bd", "author": { "name": "Microsoft Corporation" }, @@ -156,4 +156,4 @@ "windows-mutex": "0.2.1", "windows-process-tree": "0.2.3" } -} \ No newline at end of file +} diff --git a/src/vs/workbench/services/keybinding/browser/keybindingService.ts b/src/vs/workbench/services/keybinding/browser/keybindingService.ts index ed247dae97a3de777605b02398e9a5e129489fa9..1a165e03627ea03d2df2be339ff931d68d5c3af1 100644 --- a/src/vs/workbench/services/keybinding/browser/keybindingService.ts +++ b/src/vs/workbench/services/keybinding/browser/keybindingService.ts @@ -532,7 +532,7 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService { mightProducePrintableCharacter(event: IKeyboardEvent): boolean { if (event.ctrlKey || event.metaKey || event.altKey) { - // ignore ctrl/cmd/alt-combination but not shift-combinatios + // ignore ctrl/cmd-combination but not shift/alt-combinatios return false; } const code = ScanCodeUtils.toEnum(event.code); diff --git a/src/vs/workbench/services/textfile/test/textFileService.io.test.ts b/src/vs/workbench/services/textfile/test/textFileService.io.test.ts index 8d4e1a407d1010479bcae807f9d6a364304c9627..3337c56b2a24530e7ad6196a84ecd2878124fea1 100644 --- a/src/vs/workbench/services/textfile/test/textFileService.io.test.ts +++ b/src/vs/workbench/services/textfile/test/textFileService.io.test.ts @@ -247,10 +247,7 @@ suite('Files - TextFileService i/o', () => { } test('write - use encoding (cp1252)', async () => { - const filePath = join(testDir, 'some_cp1252.txt'); - const contents = await readFile(filePath, 'utf8'); - const eol = /\r\n/.test(contents) ? '\r\n' : '\n'; - await testEncodingKeepsData(URI.file(filePath), 'cp1252', ['ObjectCount = LoadObjects("Öffentlicher Ordner");', '', 'Private = "Persönliche Information"', ''].join(eol)); + await testEncodingKeepsData(URI.file(join(testDir, 'some_cp1252.txt')), 'cp1252', ['ObjectCount = LoadObjects("Öffentlicher Ordner");', '', 'Private = "Persönliche Information"', ''].join(isWindows ? '\r\n' : '\n')); }); test('write - use encoding (shiftjis)', async () => {