From 1c23aae6a750dc4e6eea287a6c6a81c30bb00099 Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Fri, 31 Aug 2018 15:01:27 -0400 Subject: [PATCH 1/8] Changing phase to job and updating queue to pool --- script/vsts/nightly-release.yml | 15 +++++++++++---- script/vsts/platforms/linux.yml | 8 ++++---- script/vsts/platforms/macos.yml | 8 ++++---- script/vsts/platforms/windows.yml | 8 ++++---- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/script/vsts/nightly-release.yml b/script/vsts/nightly-release.yml index ef68ef335..9a9c97caf 100644 --- a/script/vsts/nightly-release.yml +++ b/script/vsts/nightly-release.yml @@ -1,6 +1,6 @@ -phases: +jobs: -- phase: GetReleaseVersion +- job: GetReleaseVersion steps: # This has to be done separately because VSTS inexplicably # exits the script block after `npm install` completes. @@ -16,8 +16,9 @@ phases: - template: platforms/macos.yml - template: platforms/linux.yml -- phase: Release - queue: Hosted # Need this for Python 2.7 +- job: Release + pool: + vmImage: vs2017-win2016 dependsOn: - GetReleaseVersion @@ -29,6 +30,12 @@ phases: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] steps: + # Need this for Python 2.7 + - task: UsePythonVersion@0 + displayName: 'Use Python 2.7.x' + inputs: + versionSpec: 2.7.x + - task: NodeTool@0 inputs: versionSpec: 8.9.3 diff --git a/script/vsts/platforms/linux.yml b/script/vsts/platforms/linux.yml index 51e7e5001..c62427771 100644 --- a/script/vsts/platforms/linux.yml +++ b/script/vsts/platforms/linux.yml @@ -1,10 +1,10 @@ -phases: -- phase: Linux +jobs: +- job: Linux dependsOn: GetReleaseVersion variables: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] - queue: - name: Hosted Ubuntu 1604 + pool: + vmImage: ubuntu-16.04 timeoutInMinutes: 180 steps: diff --git a/script/vsts/platforms/macos.yml b/script/vsts/platforms/macos.yml index e7443860e..1cf24fd32 100644 --- a/script/vsts/platforms/macos.yml +++ b/script/vsts/platforms/macos.yml @@ -1,12 +1,12 @@ -phases: -- phase: macOS +jobs: +- job: macOS dependsOn: GetReleaseVersion variables: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ] IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] - queue: - name: Hosted macOS Preview + pool: + vmImage: macos-10.13 timeoutInMinutes: 180 steps: diff --git a/script/vsts/platforms/windows.yml b/script/vsts/platforms/windows.yml index aba06b2a3..3b323f859 100644 --- a/script/vsts/platforms/windows.yml +++ b/script/vsts/platforms/windows.yml @@ -1,12 +1,12 @@ -phases: -- phase: Windows +jobs: +- job: Windows dependsOn: GetReleaseVersion variables: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ] IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] - queue: - name: Hosted + pool: + vmImage: vs2017-win2016 timeoutInMinutes: 180 parallel: 2 matrix: From c8c50580bf629dea07e3a7a0d4039f8995da9720 Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Fri, 31 Aug 2018 15:13:57 -0400 Subject: [PATCH 2/8] Fix strategy and timeout Changing the matrix to match new strategy schema. and moving timoutInMinutes up. --- script/vsts/platforms/linux.yml | 3 ++- script/vsts/platforms/macos.yml | 5 +++-- script/vsts/platforms/windows.yml | 20 +++++++++++--------- script/vsts/pull-requests.yml | 4 ++-- script/vsts/release-branch-build.yml | 18 ++++++++++++------ 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/script/vsts/platforms/linux.yml b/script/vsts/platforms/linux.yml index c62427771..e1f3c2157 100644 --- a/script/vsts/platforms/linux.yml +++ b/script/vsts/platforms/linux.yml @@ -1,11 +1,12 @@ jobs: - job: Linux dependsOn: GetReleaseVersion + timeoutInMinutes: 180 + variables: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] pool: vmImage: ubuntu-16.04 - timeoutInMinutes: 180 steps: - task: NodeTool@0 diff --git a/script/vsts/platforms/macos.yml b/script/vsts/platforms/macos.yml index 1cf24fd32..bb20c8a4b 100644 --- a/script/vsts/platforms/macos.yml +++ b/script/vsts/platforms/macos.yml @@ -1,14 +1,15 @@ jobs: - job: macOS dependsOn: GetReleaseVersion + timeoutInMinutes: 180 + variables: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ] IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] pool: vmImage: macos-10.13 - timeoutInMinutes: 180 - + steps: - task: NodeTool@0 inputs: diff --git a/script/vsts/platforms/windows.yml b/script/vsts/platforms/windows.yml index 3b323f859..0ca92c17b 100644 --- a/script/vsts/platforms/windows.yml +++ b/script/vsts/platforms/windows.yml @@ -1,21 +1,23 @@ jobs: - job: Windows dependsOn: GetReleaseVersion - variables: - ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] - IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ] - IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] - pool: - vmImage: vs2017-win2016 - timeoutInMinutes: 180 - parallel: 2 + timeoutInMinutes: 180 + strategy: + maxParallel: 2 matrix: x64: buildArch: x64 # TODO: x86 is currently not supported on VSTS # x86: # buildArch: x86 - + pool: + vmImage: vs2017-win2016 + + variables: + ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] + IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ] + IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] + steps: - task: NodeTool@0 inputs: diff --git a/script/vsts/pull-requests.yml b/script/vsts/pull-requests.yml index 8f17bacff..c9de472ca 100644 --- a/script/vsts/pull-requests.yml +++ b/script/vsts/pull-requests.yml @@ -1,8 +1,8 @@ trigger: none # No CI builds, only PR builds -phases: +jobs: -- phase: GetReleaseVersion +- job: GetReleaseVersion steps: # This has to be done separately because VSTS inexplicably # exits the script block after `npm install` completes. diff --git a/script/vsts/release-branch-build.yml b/script/vsts/release-branch-build.yml index cbbf73ffb..0ebb9a73c 100644 --- a/script/vsts/release-branch-build.yml +++ b/script/vsts/release-branch-build.yml @@ -2,9 +2,9 @@ trigger: - master - 1.* # VSTS only supports wildcards at the end -phases: +jobs: -- phase: GetReleaseVersion +- job: GetReleaseVersion steps: # This has to be done separately because VSTS inexplicably # exits the script block after `npm install` completes. @@ -20,9 +20,10 @@ phases: - template: platforms/macos.yml - template: platforms/linux.yml -- phase: UploadArtifacts - queue: Hosted # Need this for Python 2.7 - +- job: UploadArtifacts + pool: + vmImage: vs2017-win2016 + dependsOn: - GetReleaseVersion - Windows @@ -34,7 +35,12 @@ phases: IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ] IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] - steps: + steps: + - task: UsePythonVersion@0 + displayName: 'Use Python 2.7.x' + inputs: + versionSpec: 2.7.x + - task: NodeTool@0 inputs: versionSpec: 8.9.3 From bc14ba5e048a7f2d83fbe3a5504e5d26de57ba3f Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Fri, 31 Aug 2018 15:34:20 -0400 Subject: [PATCH 3/8] Added explicit python version Updated Windows job to specify python version --- script/vsts/platforms/windows.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/vsts/platforms/windows.yml b/script/vsts/platforms/windows.yml index 0ca92c17b..5c917a15e 100644 --- a/script/vsts/platforms/windows.yml +++ b/script/vsts/platforms/windows.yml @@ -12,13 +12,18 @@ jobs: # buildArch: x86 pool: vmImage: vs2017-win2016 - + variables: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ] IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] steps: + - task: UsePythonVersion@0 + displayName: 'Use Python 2.7.x' + inputs: + versionSpec: 2.7.x + - task: NodeTool@0 inputs: versionSpec: 8.9.3 From e058eddc4977fbfb9f1e4db41f9094611b6a5b95 Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Fri, 31 Aug 2018 15:38:12 -0400 Subject: [PATCH 4/8] Updated status badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ee936527d..8a6376fbd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![Atom](https://cloud.githubusercontent.com/assets/72919/2874231/3af1db48-d3dd-11e3-98dc-6066f8bc766f.png) -[![Build status](https://github.visualstudio.com/Atom/_apis/build/status/Atom%20Production%20Branches?branch=master)](https://github.visualstudio.com/Atom/_build/latest?definitionId=32&branch=master) [![Linux Build Status](https://travis-ci.org/atom/atom.svg?branch=master)](https://travis-ci.org/atom/atom) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/1tkktwh654w07eim?svg=true)](https://ci.appveyor.com/project/Atom/atom) +[![Build status](https://github.visualstudio.com/Atom/_apis/build/status/Atom%20Production%20Branches?branchName=master)](https://github.visualstudio.com/Atom/_build/latest?definitionId=32&branchName=master) [![Linux Build Status](https://travis-ci.org/atom/atom.svg?branch=master)](https://travis-ci.org/atom/atom) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/1tkktwh654w07eim?svg=true)](https://ci.appveyor.com/project/Atom/atom) [![Dependency Status](https://david-dm.org/atom/atom.svg)](https://david-dm.org/atom/atom) [![Join the Atom Community on Slack](https://atom-slack.herokuapp.com/badge.svg)](https://atom-slack.herokuapp.com) From 27690cb71b3c2ac7832e46f1192d4588abff9e3c Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Fri, 31 Aug 2018 15:50:00 -0400 Subject: [PATCH 5/8] Rolling back to vs2015 image For some reason the vs2017 image can't build with python 2.7 and gyp properly. --- script/vsts/nightly-release.yml | 8 +------- script/vsts/platforms/windows.yml | 7 +------ script/vsts/release-branch-build.yml | 9 ++------- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/script/vsts/nightly-release.yml b/script/vsts/nightly-release.yml index 9a9c97caf..e480720cd 100644 --- a/script/vsts/nightly-release.yml +++ b/script/vsts/nightly-release.yml @@ -18,7 +18,7 @@ jobs: - job: Release pool: - vmImage: vs2017-win2016 + vmImage: vs2015-server2012r2 # needed for Python 2.7 and gyp dependsOn: - GetReleaseVersion @@ -30,12 +30,6 @@ jobs: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] steps: - # Need this for Python 2.7 - - task: UsePythonVersion@0 - displayName: 'Use Python 2.7.x' - inputs: - versionSpec: 2.7.x - - task: NodeTool@0 inputs: versionSpec: 8.9.3 diff --git a/script/vsts/platforms/windows.yml b/script/vsts/platforms/windows.yml index 5c917a15e..af5c9f6ee 100644 --- a/script/vsts/platforms/windows.yml +++ b/script/vsts/platforms/windows.yml @@ -11,7 +11,7 @@ jobs: # x86: # buildArch: x86 pool: - vmImage: vs2017-win2016 + vmImage: vs2015-server2012r2 # needed for python 2.7 and gyp variables: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] @@ -19,11 +19,6 @@ jobs: IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] steps: - - task: UsePythonVersion@0 - displayName: 'Use Python 2.7.x' - inputs: - versionSpec: 2.7.x - - task: NodeTool@0 inputs: versionSpec: 8.9.3 diff --git a/script/vsts/release-branch-build.yml b/script/vsts/release-branch-build.yml index 0ebb9a73c..3465e0d52 100644 --- a/script/vsts/release-branch-build.yml +++ b/script/vsts/release-branch-build.yml @@ -22,8 +22,8 @@ jobs: - job: UploadArtifacts pool: - vmImage: vs2017-win2016 - + vmImage: vs2015-server2012r2 # needed for python 2.7 and gyp + dependsOn: - GetReleaseVersion - Windows @@ -36,11 +36,6 @@ jobs: IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] steps: - - task: UsePythonVersion@0 - displayName: 'Use Python 2.7.x' - inputs: - versionSpec: 2.7.x - - task: NodeTool@0 inputs: versionSpec: 8.9.3 From 3a7101138881fa84c48ae32941f30adac88f9f68 Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Fri, 31 Aug 2018 15:58:42 -0400 Subject: [PATCH 6/8] fixing vmImage name --- script/vsts/nightly-release.yml | 2 +- script/vsts/platforms/windows.yml | 2 +- script/vsts/release-branch-build.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/script/vsts/nightly-release.yml b/script/vsts/nightly-release.yml index e480720cd..cff7b77ca 100644 --- a/script/vsts/nightly-release.yml +++ b/script/vsts/nightly-release.yml @@ -18,7 +18,7 @@ jobs: - job: Release pool: - vmImage: vs2015-server2012r2 # needed for Python 2.7 and gyp + vmImage: vs2015-win2012r2 # needed for Python 2.7 and gyp dependsOn: - GetReleaseVersion diff --git a/script/vsts/platforms/windows.yml b/script/vsts/platforms/windows.yml index af5c9f6ee..9c6373e54 100644 --- a/script/vsts/platforms/windows.yml +++ b/script/vsts/platforms/windows.yml @@ -11,7 +11,7 @@ jobs: # x86: # buildArch: x86 pool: - vmImage: vs2015-server2012r2 # needed for python 2.7 and gyp + vmImage: vs2015-win2012r2 # needed for python 2.7 and gyp variables: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] diff --git a/script/vsts/release-branch-build.yml b/script/vsts/release-branch-build.yml index 3465e0d52..a88986111 100644 --- a/script/vsts/release-branch-build.yml +++ b/script/vsts/release-branch-build.yml @@ -22,7 +22,7 @@ jobs: - job: UploadArtifacts pool: - vmImage: vs2015-server2012r2 # needed for python 2.7 and gyp + vmImage: vs2015-win2012r2 # needed for python 2.7 and gyp dependsOn: - GetReleaseVersion From 6ff5ea5250e8e650a1b9fb90298ef3164fd481fb Mon Sep 17 00:00:00 2001 From: David Wilson Date: Thu, 6 Sep 2018 08:08:25 -0700 Subject: [PATCH 7/8] Don't upload build artifacts in PR builds --- script/vsts/platforms/linux.yml | 5 ++++- script/vsts/platforms/macos.yml | 5 ++++- script/vsts/platforms/windows.yml | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/script/vsts/platforms/linux.yml b/script/vsts/platforms/linux.yml index e1f3c2157..44ba0cf49 100644 --- a/script/vsts/platforms/linux.yml +++ b/script/vsts/platforms/linux.yml @@ -2,7 +2,7 @@ jobs: - job: Linux dependsOn: GetReleaseVersion timeoutInMinutes: 180 - + variables: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] pool: @@ -48,6 +48,7 @@ jobs: ArtifactName: atom.x86_64.rpm ArtifactType: Container displayName: Upload atom.x84_64.rpm + condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true')) - task: PublishBuildArtifacts@1 inputs: @@ -55,6 +56,7 @@ jobs: ArtifactName: atom-amd64.deb ArtifactType: Container displayName: Upload atom-amd64.deb + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) - task: PublishBuildArtifacts@1 inputs: @@ -62,3 +64,4 @@ jobs: ArtifactName: atom-amd64.tar.gz ArtifactType: Container displayName: Upload atom-amd64.tar.gz + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) diff --git a/script/vsts/platforms/macos.yml b/script/vsts/platforms/macos.yml index bb20c8a4b..55eb3b387 100644 --- a/script/vsts/platforms/macos.yml +++ b/script/vsts/platforms/macos.yml @@ -9,7 +9,7 @@ jobs: IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] pool: vmImage: macos-10.13 - + steps: - task: NodeTool@0 inputs: @@ -57,6 +57,7 @@ jobs: ArtifactName: atom-mac.zip ArtifactType: Container displayName: Upload atom-mac.zip + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) - task: PublishBuildArtifacts@1 inputs: @@ -64,6 +65,7 @@ jobs: ArtifactName: atom-mac-symbols.zip ArtifactType: Container displayName: Upload atom-mac-symbols.zip + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) - task: PublishBuildArtifacts@1 inputs: @@ -71,3 +73,4 @@ jobs: ArtifactName: atom-api.json ArtifactType: Container displayName: Upload atom-api.json + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) diff --git a/script/vsts/platforms/windows.yml b/script/vsts/platforms/windows.yml index 9c6373e54..3cd23bea7 100644 --- a/script/vsts/platforms/windows.yml +++ b/script/vsts/platforms/windows.yml @@ -17,7 +17,7 @@ jobs: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ] IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] - + steps: - task: NodeTool@0 inputs: @@ -69,6 +69,7 @@ jobs: ArtifactName: atom-x64-windows.zip ArtifactType: Container displayName: Upload atom-x64-windows.zip + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) - task: PublishBuildArtifacts@1 inputs: From a4a94c2361da7c2a654daa2a996c411b7add4515 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Thu, 6 Sep 2018 10:46:30 -0700 Subject: [PATCH 8/8] Fix bad condition on artifact upload task in linux.yml --- script/vsts/platforms/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/vsts/platforms/linux.yml b/script/vsts/platforms/linux.yml index 44ba0cf49..ea2f67db0 100644 --- a/script/vsts/platforms/linux.yml +++ b/script/vsts/platforms/linux.yml @@ -48,7 +48,7 @@ jobs: ArtifactName: atom.x86_64.rpm ArtifactType: Container displayName: Upload atom.x84_64.rpm - condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true')) + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) - task: PublishBuildArtifacts@1 inputs: