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

fix(macros/LiveSampleLink): add fallback to prebuilt samples #9738

Merged
merged 2 commits into from
Sep 29, 2023
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
4 changes: 2 additions & 2 deletions .github/workflows/prod-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ jobs:
# secure production but this is an exception and default
# is not insecure.
BUILD_LIVE_SAMPLES_BASE_URL: https://live.mdnplay.dev
BUILD_LEGACY_LIVE_SAMPLES_BASE_URL: https://live-samples.mdn.mozilla.net
BUILD_LEGACY_LIVE_SAMPLES_BASE_URL: https://live.mdnplay.dev

# Sign key for code samples
BUILD_SAMPLE_SIGN_KEY: ${{ secrets.SAMPLE_SIGN_KEY }}
Expand Down Expand Up @@ -350,7 +350,7 @@ jobs:
--memory=2GB \
--timeout=60s \
--set-env-vars="ORIGIN_MAIN=developer.mozilla.org" \
--set-env-vars="ORIGIN_LIVE_SAMPLES=live-samples.mdn.mozilla.net" \
--set-env-vars="ORIGIN_LIVE_SAMPLES=live.mdnplay.dev" \
--set-env-vars="ORIGIN_PLAY=mdnplay.dev" \
--set-env-vars="SOURCE_CONTENT=https://storage.googleapis.com/${{ vars.GCP_BUCKET_NAME }}/main/" \
--set-env-vars="SOURCE_API=https://api.developer.mozilla.org/" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ jobs:
# secure production but this is an exception and default
# is not insecure.
BUILD_LIVE_SAMPLES_BASE_URL: https://live.mdnyalp.dev
BUILD_LEGACY_LIVE_SAMPLES_BASE_URL: https://live-samples.mdn.allizom.net
BUILD_LEGACY_LIVE_SAMPLES_BASE_URL: https://live.mdnyalp.dev

# Sign key for code samples
BUILD_SAMPLE_SIGN_KEY: ${{ secrets.SAMPLE_SIGN_KEY }}
Expand Down
4 changes: 3 additions & 1 deletion kumascript/macros/LiveSampleLink.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
// $1 - The link label
//
// See also : EmbedLiveSample
//
// We pass env.url as $1 to LiveSampleURL to enforce fallback to prebuild samples.
%>
<a href="<%= await template('LiveSampleURL', [$0]) %>"><%=$1%></a>
<a href="<%= await template('LiveSampleURL', [$0, env.url]) %>"><%=$1%></a>