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

BUG: Fix broken preview path for release #2278

Merged
merged 4 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ stage("Build and Publish") {

sh label:"Build HTML", script:"""set -ex
conda activate ${ENV_NAME}
./static/build_html.sh ${env.BRANCH_NAME} ${JOB_NAME}
./static/build_html.sh ${env.BRANCH_NAME} ${JOB_NAME} ${REPO_NAME}
AnirudhDagar marked this conversation as resolved.
Show resolved Hide resolved
"""

sh label:"Build PDF", script:"""set -ex
Expand Down
4 changes: 2 additions & 2 deletions static/build_html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ set -e
# Read arguments
BRANCH_NAME=$1
JOB_NAME=$2
REPO_NAME=$3
AnirudhDagar marked this conversation as resolved.
Show resolved Hide resolved

STABLE_BASE_PATH="https://d2l.ai"
PREVIEW_BASE_PATH="http://preview.d2l.ai/$JOB_NAME"
PREVIEW_BASE_PATH_RELEASE="${PREVIEW_BASE_PATH/release/master}"
alternate_base="http://preview.d2l.ai/$REPO_NAME/master"
AnirudhDagar marked this conversation as resolved.
Show resolved Hide resolved

# Generate Headers
if [[ "$BRANCH_NAME" == "release" ]]; then
echo "Use release headers"
alternate_text="Preview Version"
AnirudhDagar marked this conversation as resolved.
Show resolved Hide resolved
alternate_base=$PREVIEW_BASE_PATH_RELEASE
current_base=$STABLE_BASE_PATH
else
echo "Use ${JOB_NAME} headers"
Expand Down