diff --git a/script/vsts/get-release-version.js b/script/vsts/get-release-version.js index 1195da4c456..5ddf3659bd6 100644 --- a/script/vsts/get-release-version.js +++ b/script/vsts/get-release-version.js @@ -4,8 +4,9 @@ const request = require('request-promise-native'); const repositoryRootPath = path.resolve(__dirname, '..', '..'); const appMetadata = require(path.join(repositoryRootPath, 'package.json')); -const REPO_OWNER = process.env.REPO_OWNER; -const NIGHTLY_RELEASE_REPO = process.env.NIGHTLY_RELEASE_REPO; +const REPO_OWNER = process.env.REPO_OWNER || 'atom'; +const NIGHTLY_RELEASE_REPO = + process.env.NIGHTLY_RELEASE_REPO || 'atom-nightly-releases'; const yargs = require('yargs'); const argv = yargs diff --git a/script/vsts/lib/release-notes.js b/script/vsts/lib/release-notes.js index 5cf139fe905..1901e9a16d1 100644 --- a/script/vsts/lib/release-notes.js +++ b/script/vsts/lib/release-notes.js @@ -3,9 +3,10 @@ const octokit = require('@octokit/rest')(); const changelog = require('pr-changelog'); const childProcess = require('child_process'); -const REPO_OWNER = process.env.REPO_OWNER; -const MAIN_REPO = process.env.MAIN_REPO; -const NIGHTLY_RELEASE_REPO = process.env.NIGHTLY_RELEASE_REPO; +const REPO_OWNER = process.env.REPO_OWNER || 'atom'; +const MAIN_REPO = process.env.MAIN_REPO || 'atom'; +const NIGHTLY_RELEASE_REPO = + process.env.NIGHTLY_RELEASE_REPO || 'atom-nightly-releases'; module.exports.getRelease = async function(releaseVersion, githubToken) { if (githubToken) { diff --git a/script/vsts/nightly-release.yml b/script/vsts/nightly-release.yml index 3d8a70efb30..4e19f593cea 100644 --- a/script/vsts/nightly-release.yml +++ b/script/vsts/nightly-release.yml @@ -3,17 +3,11 @@ jobs: pool: vmImage: 'ubuntu-latest' steps: - # This has to be done separately because VSTS inexplicably - # exits the script block after `npm ci` completes. - script: | cd script/vsts npm ci - displayName: npm ci - - script: node script/vsts/get-release-version.js --nightly + node get-release-version.js --nightly name: Version - env: - REPO_OWNER: $(REPO_OWNER) - NIGHTLY_RELEASE_REPO: $(NIGHTLY_RELEASE_REPO) # Import OS-specific build definitions - template: platforms/windows.yml @@ -27,7 +21,7 @@ jobs: dependsOn: - GetReleaseVersion - - Windows + - Windows_RendererTests - Linux - macOS_tests @@ -37,8 +31,6 @@ jobs: steps: - template: platforms/templates/preparation.yml - #This has to be done separately because VSTS inexplicably - #exits the script block after `npm ci` completes. - script: | cd script/vsts npm ci @@ -59,9 +51,6 @@ jobs: ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET) ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET) PACKAGE_CLOUD_API_KEY: $(PACKAGE_CLOUD_API_KEY) - REPO_OWNER: $(REPO_OWNER) - MAIN_REPO: $(MAIN_REPO) - NIGHTLY_RELEASE_REPO: $(NIGHTLY_RELEASE_REPO) displayName: Create Nightly Release - job: bump_dependencies displayName: Bump Dependencies diff --git a/script/vsts/platforms/linux.yml b/script/vsts/platforms/linux.yml index 975af51a757..c6995819a8f 100644 --- a/script/vsts/platforms/linux.yml +++ b/script/vsts/platforms/linux.yml @@ -5,7 +5,6 @@ jobs: variables: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] pool: - # This image is used to host the Docker container that runs the build vmImage: ubuntu-16.04 steps: diff --git a/script/vsts/platforms/windows.yml b/script/vsts/platforms/windows.yml index 98af05ad7e3..4613b934d7b 100644 --- a/script/vsts/platforms/windows.yml +++ b/script/vsts/platforms/windows.yml @@ -1,5 +1,6 @@ jobs: - - job: Windows + - job: Windows_build + displayName: Windows build dependsOn: GetReleaseVersion timeoutInMinutes: 180 strategy: @@ -71,7 +72,8 @@ jobs: condition: and(succeeded(), eq(variables['IsReleaseBranch'], 'true')) - job: Windows_RendererTests - dependsOn: Windows + displayName: Windows + dependsOn: Windows_build timeoutInMinutes: 180 strategy: maxParallel: 2 diff --git a/script/vsts/pull-requests.yml b/script/vsts/pull-requests.yml index de26a721d59..b92de1622de 100644 --- a/script/vsts/pull-requests.yml +++ b/script/vsts/pull-requests.yml @@ -5,17 +5,11 @@ jobs: pool: vmImage: 'ubuntu-latest' steps: - # This has to be done separately because VSTS inexplicably - # exits the script block after `npm ci` completes. - script: | cd script/vsts npm ci - displayName: npm ci - - script: node script/vsts/get-release-version.js + node get-release-version.js name: Version - env: - REPO_OWNER: $(REPO_OWNER) - NIGHTLY_RELEASE_REPO: $(NIGHTLY_RELEASE_REPO) # Import OS-specific build definitions - template: platforms/windows.yml diff --git a/script/vsts/release-branch-build.yml b/script/vsts/release-branch-build.yml index ccaf5d55ebb..24b1e44b99d 100644 --- a/script/vsts/release-branch-build.yml +++ b/script/vsts/release-branch-build.yml @@ -9,17 +9,11 @@ jobs: pool: vmImage: 'ubuntu-latest' steps: - # This has to be done separately because VSTS inexplicably - # exits the script block after `npm ci` completes. - script: | cd script/vsts npm ci - displayName: npm ci - - script: node script/vsts/get-release-version.js + node get-release-version.js name: Version - env: - REPO_OWNER: $(REPO_OWNER) - NIGHTLY_RELEASE_REPO: $(NIGHTLY_RELEASE_REPO) # Import OS-specific build definitions. - template: platforms/windows.yml @@ -32,7 +26,7 @@ jobs: dependsOn: - GetReleaseVersion - - Windows + - Windows_RendererTests - Linux - macOS_tests @@ -42,8 +36,6 @@ jobs: IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] steps: - # This has to be done separately because VSTS inexplicably - # exits the script block after `npm ci` completes. - script: | cd script/vsts npm ci @@ -66,9 +58,6 @@ jobs: ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET) ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET) PACKAGE_CLOUD_API_KEY: $(PACKAGE_CLOUD_API_KEY) - REPO_OWNER: $(REPO_OWNER) - MAIN_REPO: $(MAIN_REPO) - NIGHTLY_RELEASE_REPO: $(NIGHTLY_RELEASE_REPO) displayName: Create Draft Release condition: and(succeeded(), eq(variables['Atom.AutoDraftRelease'], 'true'), eq(variables['IsReleaseBranch'], 'true')) @@ -79,8 +68,5 @@ jobs: ATOM_RELEASES_S3_KEY: $(ATOM_RELEASES_S3_KEY) ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET) ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET) - REPO_OWNER: $(REPO_OWNER) - MAIN_REPO: $(MAIN_REPO) - NIGHTLY_RELEASE_REPO: $(NIGHTLY_RELEASE_REPO) displayName: Upload CI Artifacts to S3 condition: and(succeeded(), eq(variables['IsSignedZipBranch'], 'true')) diff --git a/script/vsts/upload-artifacts.js b/script/vsts/upload-artifacts.js index 08a3e2d13ec..ed7530921e6 100644 --- a/script/vsts/upload-artifacts.js +++ b/script/vsts/upload-artifacts.js @@ -12,9 +12,10 @@ const uploadLinuxPackages = require('./lib/upload-linux-packages'); const CONFIG = require('../config'); -const REPO_OWNER = process.env.REPO_OWNER; -const MAIN_REPO = process.env.MAIN_REPO; -const NIGHTLY_RELEASE_REPO = process.env.NIGHTLY_RELEASE_REPO; +const REPO_OWNER = process.env.REPO_OWNER || 'atom'; +const MAIN_REPO = process.env.MAIN_REPO || 'atom'; +const NIGHTLY_RELEASE_REPO = + process.env.NIGHTLY_RELEASE_REPO || 'atom-nightly-releases'; const yargs = require('yargs'); const argv = yargs