Skip to content

Commit 0199653

Browse files
authored
Merge pull request #78 from atom-ide-community/fix-miscellaneous-CI-issues
2 parents 616cd3a + cfd4a0b commit 0199653

File tree

8 files changed

+20
-47
lines changed

8 files changed

+20
-47
lines changed

script/vsts/get-release-version.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ const request = require('request-promise-native');
44
const repositoryRootPath = path.resolve(__dirname, '..', '..');
55
const appMetadata = require(path.join(repositoryRootPath, 'package.json'));
66

7-
const REPO_OWNER = process.env.REPO_OWNER;
8-
const NIGHTLY_RELEASE_REPO = process.env.NIGHTLY_RELEASE_REPO;
7+
const REPO_OWNER = process.env.REPO_OWNER || 'atom';
8+
const NIGHTLY_RELEASE_REPO =
9+
process.env.NIGHTLY_RELEASE_REPO || 'atom-nightly-releases';
910

1011
const yargs = require('yargs');
1112
const argv = yargs

script/vsts/lib/release-notes.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ const octokit = require('@octokit/rest')();
33
const changelog = require('pr-changelog');
44
const childProcess = require('child_process');
55

6-
const REPO_OWNER = process.env.REPO_OWNER;
7-
const MAIN_REPO = process.env.MAIN_REPO;
8-
const NIGHTLY_RELEASE_REPO = process.env.NIGHTLY_RELEASE_REPO;
6+
const REPO_OWNER = process.env.REPO_OWNER || 'atom';
7+
const MAIN_REPO = process.env.MAIN_REPO || 'atom';
8+
const NIGHTLY_RELEASE_REPO =
9+
process.env.NIGHTLY_RELEASE_REPO || 'atom-nightly-releases';
910

1011
module.exports.getRelease = async function(releaseVersion, githubToken) {
1112
if (githubToken) {

script/vsts/nightly-release.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,11 @@ jobs:
33
pool:
44
vmImage: 'ubuntu-latest'
55
steps:
6-
# This has to be done separately because VSTS inexplicably
7-
# exits the script block after `npm ci` completes.
86
- script: |
97
cd script/vsts
108
npm ci
11-
displayName: npm ci
12-
- script: node script/vsts/get-release-version.js --nightly
9+
node get-release-version.js --nightly
1310
name: Version
14-
env:
15-
REPO_OWNER: $(REPO_OWNER)
16-
NIGHTLY_RELEASE_REPO: $(NIGHTLY_RELEASE_REPO)
1711
1812
# Import OS-specific build definitions
1913
- template: platforms/windows.yml
@@ -27,7 +21,7 @@ jobs:
2721

2822
dependsOn:
2923
- GetReleaseVersion
30-
- Windows
24+
- Windows_RendererTests
3125
- Linux
3226
- macOS_tests
3327

@@ -37,8 +31,6 @@ jobs:
3731
steps:
3832
- template: platforms/templates/preparation.yml
3933

40-
#This has to be done separately because VSTS inexplicably
41-
#exits the script block after `npm ci` completes.
4234
- script: |
4335
cd script/vsts
4436
npm ci
@@ -59,9 +51,6 @@ jobs:
5951
ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET)
6052
ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET)
6153
PACKAGE_CLOUD_API_KEY: $(PACKAGE_CLOUD_API_KEY)
62-
REPO_OWNER: $(REPO_OWNER)
63-
MAIN_REPO: $(MAIN_REPO)
64-
NIGHTLY_RELEASE_REPO: $(NIGHTLY_RELEASE_REPO)
6554
displayName: Create Nightly Release
6655
- job: bump_dependencies
6756
displayName: Bump Dependencies

script/vsts/platforms/linux.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ jobs:
55
variables:
66
ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ]
77
pool:
8-
# This image is used to host the Docker container that runs the build
98
vmImage: ubuntu-16.04
109

1110
steps:

script/vsts/platforms/windows.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
jobs:
2-
- job: Windows
2+
- job: Windows_build
3+
displayName: Windows build
34
dependsOn: GetReleaseVersion
45
timeoutInMinutes: 180
56
strategy:
@@ -71,7 +72,8 @@ jobs:
7172
condition: and(succeeded(), eq(variables['IsReleaseBranch'], 'true'))
7273

7374
- job: Windows_RendererTests
74-
dependsOn: Windows
75+
displayName: Windows
76+
dependsOn: Windows_build
7577
timeoutInMinutes: 180
7678
strategy:
7779
maxParallel: 2

script/vsts/pull-requests.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,11 @@ jobs:
55
pool:
66
vmImage: 'ubuntu-latest'
77
steps:
8-
# This has to be done separately because VSTS inexplicably
9-
# exits the script block after `npm ci` completes.
108
- script: |
119
cd script/vsts
1210
npm ci
13-
displayName: npm ci
14-
- script: node script/vsts/get-release-version.js
11+
node get-release-version.js
1512
name: Version
16-
env:
17-
REPO_OWNER: $(REPO_OWNER)
18-
NIGHTLY_RELEASE_REPO: $(NIGHTLY_RELEASE_REPO)
1913
2014
# Import OS-specific build definitions
2115
- template: platforms/windows.yml

script/vsts/release-branch-build.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,11 @@ jobs:
99
pool:
1010
vmImage: 'ubuntu-latest'
1111
steps:
12-
# This has to be done separately because VSTS inexplicably
13-
# exits the script block after `npm ci` completes.
1412
- script: |
1513
cd script/vsts
1614
npm ci
17-
displayName: npm ci
18-
- script: node script/vsts/get-release-version.js
15+
node get-release-version.js
1916
name: Version
20-
env:
21-
REPO_OWNER: $(REPO_OWNER)
22-
NIGHTLY_RELEASE_REPO: $(NIGHTLY_RELEASE_REPO)
2317
2418
# Import OS-specific build definitions.
2519
- template: platforms/windows.yml
@@ -32,7 +26,7 @@ jobs:
3226

3327
dependsOn:
3428
- GetReleaseVersion
35-
- Windows
29+
- Windows_RendererTests
3630
- Linux
3731
- macOS_tests
3832

@@ -42,8 +36,6 @@ jobs:
4236
IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ]
4337

4438
steps:
45-
# This has to be done separately because VSTS inexplicably
46-
# exits the script block after `npm ci` completes.
4739
- script: |
4840
cd script/vsts
4941
npm ci
@@ -66,9 +58,6 @@ jobs:
6658
ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET)
6759
ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET)
6860
PACKAGE_CLOUD_API_KEY: $(PACKAGE_CLOUD_API_KEY)
69-
REPO_OWNER: $(REPO_OWNER)
70-
MAIN_REPO: $(MAIN_REPO)
71-
NIGHTLY_RELEASE_REPO: $(NIGHTLY_RELEASE_REPO)
7261
displayName: Create Draft Release
7362
condition: and(succeeded(), eq(variables['Atom.AutoDraftRelease'], 'true'), eq(variables['IsReleaseBranch'], 'true'))
7463
@@ -79,8 +68,5 @@ jobs:
7968
ATOM_RELEASES_S3_KEY: $(ATOM_RELEASES_S3_KEY)
8069
ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET)
8170
ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET)
82-
REPO_OWNER: $(REPO_OWNER)
83-
MAIN_REPO: $(MAIN_REPO)
84-
NIGHTLY_RELEASE_REPO: $(NIGHTLY_RELEASE_REPO)
8571
displayName: Upload CI Artifacts to S3
8672
condition: and(succeeded(), eq(variables['IsSignedZipBranch'], 'true'))

script/vsts/upload-artifacts.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ const uploadLinuxPackages = require('./lib/upload-linux-packages');
1212

1313
const CONFIG = require('../config');
1414

15-
const REPO_OWNER = process.env.REPO_OWNER;
16-
const MAIN_REPO = process.env.MAIN_REPO;
17-
const NIGHTLY_RELEASE_REPO = process.env.NIGHTLY_RELEASE_REPO;
15+
const REPO_OWNER = process.env.REPO_OWNER || 'atom';
16+
const MAIN_REPO = process.env.MAIN_REPO || 'atom';
17+
const NIGHTLY_RELEASE_REPO =
18+
process.env.NIGHTLY_RELEASE_REPO || 'atom-nightly-releases';
1819

1920
const yargs = require('yargs');
2021
const argv = yargs

0 commit comments

Comments
 (0)