Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Faster GetReleaseVersion and Release/Upload Artifacts jobs #68

Merged
merged 4 commits into from
Jul 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions script/vsts/nightly-release.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
jobs:
- job: GetReleaseVersion
pool:
vmImage: 'windows-latest'
vmImage: 'ubuntu-latest'
steps:
# This has to be done separately because VSTS inexplicably
# exits the script block after `npm install` completes.
# exits the script block after `npm ci` completes.
- script: |
cd script\vsts
npm install
displayName: npm install
- script: node script\vsts\get-release-version.js --nightly
cd script/vsts
npm ci
displayName: npm ci
- script: node script/vsts/get-release-version.js --nightly
name: Version
env:
REPO_OWNER: $(REPO_OWNER)
Expand All @@ -23,7 +23,7 @@ jobs:

- job: Release
pool:
vmImage: vs2017-win2016
vmImage: 'ubuntu-latest'

dependsOn:
- GetReleaseVersion
Expand All @@ -38,11 +38,11 @@ jobs:
- template: platforms/templates/preparation.yml

#This has to be done separately because VSTS inexplicably
#exits the script block after `npm install` completes.
#exits the script block after `npm ci` completes.
- script: |
cd script\vsts
npm install
displayName: npm install
cd script/vsts
npm ci
displayName: npm ci

- task: DownloadBuildArtifacts@0
inputs:
Expand All @@ -51,7 +51,7 @@ jobs:
displayName: Download Release Artifacts

- script: |
node $(Build.SourcesDirectory)\script\vsts\upload-artifacts.js --create-github-release --assets-path "$(System.ArtifactsDirectory)" --linux-repo-name "atom"
node $(Build.SourcesDirectory)/script/vsts/upload-artifacts.js --create-github-release --assets-path "$(System.ArtifactsDirectory)" --linux-repo-name "atom"
env:
GITHUB_TOKEN: $(GITHUB_TOKEN)
ATOM_RELEASE_VERSION: $(ReleaseVersion)
Expand All @@ -77,8 +77,8 @@ jobs:

- script: |
cd script/lib
npm install
displayName: npm install
npm ci
displayName: npm ci
- script: |
cd script/lib/update-dependency
node index.js
Expand Down
12 changes: 6 additions & 6 deletions script/vsts/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ trigger: none # No CI builds, only PR builds
jobs:
- job: GetReleaseVersion
pool:
vmImage: 'windows-latest'
vmImage: 'ubuntu-latest'
steps:
# This has to be done separately because VSTS inexplicably
# exits the script block after `npm install` completes.
# exits the script block after `npm ci` completes.
- script: |
cd script\vsts
npm install
displayName: npm install
- script: node script\vsts\get-release-version.js
cd script/vsts
npm ci
displayName: npm ci
- script: node script/vsts/get-release-version.js
name: Version
env:
REPO_OWNER: $(REPO_OWNER)
Expand Down
28 changes: 13 additions & 15 deletions script/vsts/release-branch-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ pr: none # no PR triggers
jobs:
- job: GetReleaseVersion
pool:
vmImage: 'windows-latest'
vmImage: 'ubuntu-latest'
steps:
# This has to be done separately because VSTS inexplicably
# exits the script block after `npm install` completes.
# exits the script block after `npm ci` completes.
- script: |
cd script\vsts
npm install
displayName: npm install
- script: node script\vsts\get-release-version.js
cd script/vsts
npm ci
displayName: npm ci
- script: node script/vsts/get-release-version.js
name: Version
env:
REPO_OWNER: $(REPO_OWNER)
Expand All @@ -28,7 +28,7 @@ jobs:

- job: UploadArtifacts
pool:
vmImage: vs2017-win2016
vmImage: 'ubuntu-latest'

dependsOn:
- GetReleaseVersion
Expand All @@ -42,16 +42,14 @@ jobs:
IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ]

steps:
- template: platforms/templates/preparation.yml

# This has to be done separately because VSTS inexplicably
# exits the script block after `npm install` completes.
# exits the script block after `npm ci` completes.
- script: |
cd script\vsts
npm install
cd script/vsts
npm ci
env:
GITHUB_TOKEN: $(GITHUB_TOKEN)
displayName: npm install
displayName: npm ci

- task: DownloadBuildArtifacts@0
inputs:
Expand All @@ -60,7 +58,7 @@ jobs:
displayName: Download Release Artifacts

- script: |
node $(Build.SourcesDirectory)\script\vsts\upload-artifacts.js --create-github-release --assets-path "$(System.ArtifactsDirectory)" --linux-repo-name "atom-staging"
node $(Build.SourcesDirectory)/script/vsts/upload-artifacts.js --create-github-release --assets-path "$(System.ArtifactsDirectory)" --linux-repo-name "atom-staging"
env:
GITHUB_TOKEN: $(GITHUB_TOKEN)
ATOM_RELEASE_VERSION: $(ReleaseVersion)
Expand All @@ -75,7 +73,7 @@ jobs:
condition: and(succeeded(), eq(variables['Atom.AutoDraftRelease'], 'true'), eq(variables['IsReleaseBranch'], 'true'))

- script: |
node $(Build.SourcesDirectory)\script\vsts\upload-artifacts.js --assets-path "$(System.ArtifactsDirectory)" --s3-path "vsts-artifacts/$(Build.BuildId)/"
node $(Build.SourcesDirectory)/script/vsts/upload-artifacts.js --assets-path "$(System.ArtifactsDirectory)" --s3-path "vsts-artifacts/$(Build.BuildId)/"
env:
ATOM_RELEASE_VERSION: $(ReleaseVersion)
ATOM_RELEASES_S3_KEY: $(ATOM_RELEASES_S3_KEY)
Expand Down