Merge pull request 'fix: webapp-entrypoint.sh CI path bypasses contracts.env sourcing without documentation (#422)' (#491) from fix/issue-422 into master

This commit is contained in:
johba 2026-03-06 09:03:38 +01:00
commit 524a6a66d9

View file

@ -3,12 +3,26 @@ set -euo pipefail
if [[ "${CI:-}" == "true" ]]; then
# ── CI path ────────────────────────────────────────────────────────
# NOTE: this block is NOT executed by the .woodpecker/e2e.yml pipeline.
# Woodpecker runs the webapp image as a service with a `commands:` block,
# which replaces the Docker ENTRYPOINT entirely — dumb-init and this script
# are bypassed. The e2e.yml commands block sources contracts.env and starts
# `npm run dev` inline (see .woodpecker/e2e.yml, webapp service, ~line 129).
#
# This path fires only for manual invocations, e.g.:
# docker run -e CI=true \
# -e VITE_KRAIKEN_ADDRESS=0x... \
# -e VITE_STAKE_ADDRESS=0x... \
# webapp-ci
#
# VITE_KRAIKEN_ADDRESS and VITE_STAKE_ADDRESS must be supplied by the caller;
# they are not derived from contracts.env here.
cd /app/web-app
echo "[webapp-ci] Starting Web App..."
: "${VITE_KRAIKEN_ADDRESS:?VITE_KRAIKEN_ADDRESS is required}"
: "${VITE_STAKE_ADDRESS:?VITE_STAKE_ADDRESS is required}"
: "${VITE_KRAIKEN_ADDRESS:?VITE_KRAIKEN_ADDRESS must be supplied by the caller (not sourced from contracts.env in this path)}"
: "${VITE_STAKE_ADDRESS:?VITE_STAKE_ADDRESS must be supplied by the caller (not sourced from contracts.env in this path)}"
# Disable Vue DevTools in CI to avoid path resolution issues
export CI=true