-
Notifications
You must be signed in to change notification settings - Fork 30
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
Conversation
These env vars are credentials to authenticate to S3. If they're unset, we can't possibly upload to S3. So we shouldn't try to.
We can't authenticate to PackageCloud without an API key, so don't try to.
The bucket is optional, but Atom uses it. So we will check for this too, just in case https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html
So when they are not available they become an empty string https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#runtime-expression-syntax ![image](https://user-images.githubusercontent.com/16418197/90320648-80b06e00-df08-11ea-9b50-d4a7fffbae74.png)
This reverts commit b5d6cb9.
Co-authored-by: Amin Yahyaabadi <[email protected]>
Workaround for Azure issue: https://bit.ly/2CK8itc
There was a problem hiding this 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
andpackage-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 viaenv:
block)
- To me, lowercase indicates that we are able to use this within the
- I was planning on using
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
andupload-crash-reports
- Can be one commit, or separate commits for
- Update the .yml
- can be one commit, or separate commits for
nighty-release
andrelease-branch-build
- can be one commit, or separate commits for
- Change the JavaScript to know to skip uploading
Using |
Commenting for the historical record: We went with this PR as a re-vamped version of #66. |
Issue or RFC Endorsed by Atom's Maintainers
#1 (comment)
Description of the Change
script/vsts/upload-artifacts.js
script/vsts/upload-crash-reports.js
.deb
,.rpm
) to PackageCloud.io if API key isn't set, inscript/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