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

Add upload to s3 workflow #831

Merged
merged 9 commits into from
Mar 5, 2020

Conversation

austenLacy
Copy link
Contributor

We are moving to use AWS CloudFront backed by S3 as our CDN moving forward. This automates the upload of the various rollbar.js distributions to S3.

Copy link
Contributor

@waltjones waltjones left a comment

Choose a reason for hiding this comment

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

@austenLacy, Looks good. Thank you for your help on this!

@austenLacy austenLacy merged commit 0983c33 into master Mar 5, 2020
@austenLacy austenLacy deleted the austen/ch62549/add-upload-to-s3-workflow branch March 5, 2020 19:25
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: 'dist'
DEST_DIR: rollbarjs/$GITHUB_REF # GITHUB_REF is the tag of the release
Copy link
Contributor

Choose a reason for hiding this comment

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

Now we use rollbar.js/2.2.8/ (for ex) in the cloudflare URL. What's expected with this in combination with cloudfront?

I guess will be /rollbarjs/v2.2.8 since we do tags with v as prefix no?

Copy link
Contributor

Choose a reason for hiding this comment

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

It ends up being /rollbarjs/refs/tags/v2.2.8:
https://cdn.rollbar.com/rollbarjs/refs/tags/v2.14.10/rollbar.min.js

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, there is no way to simplify that schema I guess?

Copy link
Contributor

Choose a reason for hiding this comment

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

We're using jakejarvis/s3-sync-action as is, and it uses $GITHUB_REF as is. With a fork and some custom code we could do better.

I thought the same thing when I first saw it, but also noted that the cdnjs URLs had a similar issue by containing /ajax/libs/. https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.14.4/rollbar.min.js

So we could do better, but are not worse off than what we had.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 💯

mudetroit pushed a commit that referenced this pull request Mar 14, 2024
* test out workflow

* add missing subdir in github workflows

* test out workflow with tag

* only run workflow when a release is published and use the tag as the path in s3 with the release

* ping action version

* use pinned version and revert back to only on publish

* use correct rollbarjs prefix

* test with prefix again just to make sure

* verified prefix works and change workflow job name to be more descriptive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants