Skip to content

Commit

Permalink
Merge branch 'release/2.6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Aug 18, 2023
2 parents 8f87bb8 + 3c4cad4 commit 336ccd9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,6 @@ spec:
type: object
required:
- name
- host
properties:
name:
type: string
Expand Down
10 changes: 8 additions & 2 deletions workshop-images/base-environment/opt/eduk8s/bin/rebuild-content
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ fi

ytt -f /opt/eduk8s/etc/templates/workshop-variables.yaml "${YTT_ARGS[@]}" -o json >$HOME/.local/share/workshop/workshop-variables.json

# Bail out if workshop instructions are disabled.

if [ x"$ENABLE_WORKSHOP" != x"true" ]; then
exit 0
fi

# Bail out if not using the Hugo renderer for instructions.

if [ x"$WORKSHOP_RENDERER" != x"local" ]; then
Expand All @@ -48,6 +54,8 @@ if [ -f $WORKSHOP_DIR/workshop.yaml -o -f $WORKSHOP_DIR/modules.yaml ]; then
exit 0
fi

# Generate Hugo configuration.

YTT_ARGS=()

YTT_ARGS+=(-f $HOME/.local/share/workshop/workshop-variables.json --file-mark workshop-variables.json:type=data)
Expand All @@ -56,8 +64,6 @@ if [ -f $WORKSHOP_DIR/config.yaml ]; then
YTT_ARGS+=(-f $WORKSHOP_DIR/config.yaml --file-mark config.yaml:path=workshop-configuration.yaml --file-mark config.yaml:type=data)
fi

# Generate Hugo configuration.

ytt -f /opt/eduk8s/etc/templates/hugo-configuration.yaml "${YTT_ARGS[@]}" >$HOME/.local/share/workshop/hugo-configuration.yaml

# Run Hugo to generate static HTML files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
# should be forced to be run earlier so WORKSHOP_DIR environment variable is
# visible to slides configuration.

if [ x"$ENABLE_WORKSHOP" != x"true" ]; then
return
fi

WORKSHOP_PORT=10082

export WORKSHOP_PORT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const WORKSHOP_PORT = process.env.WORKSHOP_PORT
const WORKSHOP_RENDERER = process.env.WORKSHOP_RENDERER
const LOCAL_RENDERER_TYPE = process.env.LOCAL_RENDERER_TYPE

const WORKSHOP_DIR = process.env.WORKSHOP_DIR
const WORKSHOP_DIR = process.env.WORKSHOP_DIR || "/opt/workshop"
const SLIDES_DIR = process.env.SLIDES_DIR
const FILES_DIR = process.env.FILES_DIR
const UPLOADS_DIR = process.env.UPLOADS_DIR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ for (let key in process.env)

let workshop_file = process.env.WORKSHOP_FILE || "workshop.yaml"

let workshop_dir = process.env.WORKSHOP_DIR
let workshop_dir = process.env.WORKSHOP_DIR || "/opt/workshop"

if (workshop_dir && fs.existsSync(path.join(workshop_dir, "content"))) {
config.workshop_dir = workshop_dir
Expand Down

0 comments on commit 336ccd9

Please sign in to comment.