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: option to skip upload #99

Merged
merged 13 commits into from
Aug 22, 2020
Merged

CI: option to skip upload #99

merged 13 commits into from
Aug 22, 2020

Conversation

aminya
Copy link
Member

@aminya aminya commented Aug 21, 2020

Issue or RFC Endorsed by Atom's Maintainers

#1 (comment)

Description of the Change

  • Skip uploading build artifacts to Amazon S3 if no credentials are set, in script/vsts/upload-artifacts.js
    • Similarly, skip uploading crash reports to Amazon S3 if credentials aren't set, in script/vsts/upload-crash-reports.js
  • Skip uploading Linux packages (.deb, .rpm) to PackageCloud.io if API key isn't set, in script/vsts/upload-artifacts.js

This is to stop these uploads from being attempted with misconfigured/blank credentials or upload destinations. Such misconfigured uploads error out and cause our CI to fail at the last step, after all tests have passed.

Alternate Designs

None.

Possible Drawbacks

None

Verification Process

CI is showing that these changes are working. See this comment for details: #66 (comment)

Release Notes

N/A

Copy link
Member

@DeeDeeG DeeDeeG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously this design is the one we've settled on. 👍

I have some low-stakes comments for my preferences for this.

Variable syntax and names (yml):

  • I think this syntax is nicer: $[variables.SOME_VAR] (rather than $[ variables['SOME_VAR'] ])
  • I like making the intermediate var name significantly different, so when you glance at the file you can easily notice they are different. Also helps with using Cltrl + F to find only the intermediate var or only the real var.
    • I was planning on using s3-key, s3-secret and package-cloud-key.
      • To me, lowercase indicates that we are able to use this within the yml, but not scripts (at least not before the additional step of passing via env: block)

Not as important, but I like a clean commit history:

  • This can be reduced to 2-4 commits.
    • Change the JavaScript to know to skip uploading
      • Can be one commit, or separate commits for upload-artifacts and upload-crash-reports
    • Update the .yml
      • can be one commit, or separate commits for nighty-release and release-branch-build

@aminya
Copy link
Member Author

aminya commented Aug 22, 2020

  • I like making the intermediate var name significantly different, so when you glance at the file you can easily notice they are different.

Using _ before a variable is a convention that is used a lot for the intermediate variables and the variables that are not exported. https://stackoverflow.com/questions/6903022/why-do-we-use-in-variable-names

@aminya aminya merged commit 1958ff4 into master Aug 22, 2020
@DeeDeeG
Copy link
Member

DeeDeeG commented Aug 24, 2020

Commenting for the historical record:

We went with this PR as a re-vamped version of #66.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants