-
Notifications
You must be signed in to change notification settings - Fork 25
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: Move static builds to d2l.dev bucket #3898
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think I pictured this as:
bucket-path: s3://d2l.dev/pr-previews/BrightspaceUI/core/pr-${{ github.event.number }}
But I guess it doesn't really matter, as long as there are no collisions in what people choose 🤔
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.
If we did do
org/repo
, we could actually add a special thing torepo_settings
so someone could do:and under the hood it would setup the
d2ldev
piece. But that doesn't work with the "main" site piece.Just spit-balling here - what are your thoughts on this:
d2l.dev/pr-previews
pr-previews/main/<org>/<repo>/
for the main site that doesn't expirepr-previews/prs/<org>/<repo>/pr-<#>
for the PR sitespr-previews/prs
repo-settings
(need to confirm this doesn't blow up):pr_previews: true
and set it for thembrightspace-ui-core.d2l.dev
, they can set it up ind2l.dev
. But they don't actually have to set up anything ind2l.dev
if they're fine withhttps://pr-previews.d2l.dev/prs/BrightspaceUI/core/pr-${{ github.event.number }}/
andhttps://pr-previews.d2l.dev/main/BrightspaceUI/core/
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.
I'm open to that, except that I think the phrase "PR preview" doesn't apply any more to the "main" static builds.
What about calling them all
repo-demos
orcode-demos
?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.
Yeah good with either of those! Or even
demos
could work, if we want to try to make the default urls as easy to remember as possible (maybe not useful with url autocomplete lol)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.
Okay I might be back to being against this, mostly because of how the URLs would work:
demos
(I also like the prefixstatic
)prs/
piece: https://demos.d2l.dev/BrightspaceUI/core/pr-1234/prs
orpr-.+
)I don't like that folder restriction, but maybe it's fine...
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.
Wouldn't the
pr
andmain
need to be at the beginning to be able to set the retention properly, since we can't use wildcards in the prefix? Like https://demos.d2l.dev/main/BrightspaceUI/core/ (or I think we could get away with https://demos.d2l.dev/BrightspaceUI/core/) and https://demos.d2l.dev/prs/BrightspaceUI/core/I guess we could map it in some way with the routes, but this way maybe alleviates your concern cause there's no folder name they need to avoid. They publish their main site to
d2ldev/demos/<org>/<repo>
and their PR sites tod2ldev/demos/prs/<org>/<repo>/<whatever-they-want-really>-<pr_num>
. And the lifecycle prefix is "/demos/prs/"?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.
Yeah the prefix would need to be there in the bucket, but like you said the routing doesn't need to match the bucket.
I like keeping the main demo link clean as https://demos.d2l.dev/BrightspaceUI/core/. You're right that sticking the
prs
prefix into the URL works, though it's a bit buried there...We could also just do a completely different route and serve the
prs/
bucket up at https://pr-previews.d2l.dev/BrightspaceUI/core/. That might be an anti-pattern though,d2l.dev
is generally set up so the bucket prefix matches the subdomain.So then - why not just two separate bucket prefixes? Keep
pr-previews
as it currently is, and just add one fordemos
? Is there any benefit to trying to merge them into one, apart from their content being similar? Keepingpr-previews
clearly separate might also make the expiration rule more obvious.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.
Alright I thought on it a bit, I can get behind https://demos.d2l.dev/prs/BrightspaceUI/core/ - the URL for these aren't too important anyway, since you're only going to be visiting them as links from PRs. And for that same reason, having a whole subdomain dedicated to them isn't too useful.
Any other thoughts before I go configure that in d2l.dev?
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.
I'm good with either of your last two comments - going with https://demos.d2l.dev/prs/BrightspaceUI/core/, or just making two bucket prefixes to keep things clear, since we could still wrap that in
repo-settings
behind a single command. I was trying to think of two buckets prefixes that worked nicely together lol...demo
anddemo-prs
?pr-preview
andrepo-preview
?preview
andpr-preview
?