@@ -305,75 +305,6 @@ jobs:
305305 docker load -i goreleaser-dist/nextgen-image.tar
306306 docker image inspect -f '{{.Os}}/{{.Architecture}}' "$(cat goreleaser-dist/nextgen-image.tag)" | grep -q '^linux/amd64$'
307307
308- - name : Smoke test CLI-style local runtime image
309- run : |
310- set -euo pipefail
311- IMAGE="$(cat goreleaser-dist/nextgen-image.tag)"
312- DATA_DIR="$RUNNER_TEMP/nextgen-dev-data"
313- RUNTIME_DIR="$RUNNER_TEMP/nextgen-dev-runtime"
314- HOST_UID="$(id -u)"
315- HOST_GID="$(id -g)"
316- PASSWD_FILE="$RUNTIME_DIR/container-passwd"
317- GROUP_FILE="$RUNTIME_DIR/container-group"
318- mkdir -p "$DATA_DIR" "$RUNTIME_DIR"
319- # Mirror `zitadel start`: run the container as the host user so
320- # bind-mounted state stays editable, and provide passwd/group entries
321- # because embedded Postgres initdb refuses unknown numeric users.
322- {
323- echo "root:x:0:0:root:/root:/bin/sh"
324- echo "nonroot:x:65532:65532:nonroot:/nonexistent:/usr/sbin/nologin"
325- echo "zitadel-local:x:${HOST_UID}:${HOST_GID}:Zitadel local user:/tmp:/usr/sbin/nologin"
326- } > "$PASSWD_FILE"
327- {
328- echo "root:x:0:"
329- echo "nonroot:x:65532:"
330- echo "zitadel-local:x:${HOST_GID}:"
331- } > "$GROUP_FILE"
332- CONTAINER="$(
333- docker run -d \
334- -p 127.0.0.1:18080:8080 \
335- -v "$DATA_DIR:/var/lib/zitadel/nextgen-data" \
336- -v "$PASSWD_FILE:/etc/passwd:ro" \
337- -v "$GROUP_FILE:/etc/group:ro" \
338- --user "${HOST_UID}:${HOST_GID}" \
339- -e NEXTGEN_SERVER_ADDRESS=:8080 \
340- -e NEXTGEN_SERVER_DATA_DIR=/var/lib/zitadel/nextgen-data \
341- "$IMAGE"
342- )"
343- cleanup() {
344- docker rm -f "$CONTAINER" >/dev/null 2>&1 || true
345- }
346- diagnose() {
347- docker logs "$CONTAINER" || true
348- }
349- trap cleanup EXIT
350-
351- ready=0
352- for _ in $(seq 1 120); do
353- if curl -fsS http://localhost:18080/healthz >/dev/null; then
354- ready=1
355- break
356- fi
357- sleep 1
358- done
359- if [ "$ready" -ne 1 ]; then
360- echo "::error::timed out waiting for zero-config /healthz"
361- diagnose
362- exit 1
363- fi
364- test -f "$DATA_DIR/server-encryption-key"
365- if ! curl -fsS -o /dev/null -w "%{http_code}\n" http://localhost:18080/ui/console/ | grep -q '^200$'; then
366- echo "::error::zero-config /ui/console/ did not return 200"
367- diagnose
368- exit 1
369- fi
370- if ! curl -fsS -o /dev/null -w "%{http_code}\n" http://localhost:18080/ui/login/ | grep -q '^200$'; then
371- echo "::error::zero-config /ui/login/ did not return 200"
372- diagnose
373- exit 1
374- fi
375- echo "CLI-style local runtime image smoke test passed"
376-
377308 - name : Prepare quick-start compose stack
378309 run : |
379310 mkdir -p nextgen_quickstart
@@ -400,8 +331,9 @@ jobs:
400331 - name : Start stack and verify HTTP endpoints
401332 run : |
402333 set -euo pipefail
403- # Separate from the CLI-style smoke above: this keeps the documented
404- # compose fallback valid for operators/manual quick-start usage.
334+ # Separate from the customer local setup journey: this keeps the
335+ # documented compose fallback valid for operators/manual quick-start
336+ # usage.
405337 COMPOSE=(docker compose -f nextgen_quickstart/docker-compose.yaml --env-file nextgen_quickstart/.env)
406338 "${COMPOSE[@]}" up -d --wait
407339 ready=0
@@ -682,32 +614,11 @@ jobs:
682614 test -f goreleaser-dist/nextgen-image.tag
683615 docker load -i goreleaser-dist/nextgen-image.tar
684616 docker image inspect -f '{{.Os}}/{{.Architecture}}' "$(cat goreleaser-dist/nextgen-image.tag)" | grep -q '^linux/amd64$'
685-
686- - name : Start backend stack
687- run : |
688- mkdir -p "$RUNNER_TEMP/nextgen-journey"
689- cp docs/operations/docker-compose.yaml "$RUNNER_TEMP/nextgen-journey/docker-compose.yaml"
690- IMAGE="$(cat goreleaser-dist/nextgen-image.tag)"
691- {
692- echo "NEXTGEN_IMAGE=${IMAGE}"
693- echo "NEXTGEN_PORT=8080"
694- } > "$RUNNER_TEMP/nextgen-journey/.env"
695- docker compose -f "$RUNNER_TEMP/nextgen-journey/docker-compose.yaml" --env-file "$RUNNER_TEMP/nextgen-journey/.env" up -d --wait
696- for _ in $(seq 1 90); do
697- if curl -fsS http://localhost:8080/healthz >/dev/null; then
698- exit 0
699- fi
700- sleep 1
701- done
702- echo "::error::timed out waiting for backend /healthz"
703- docker compose -f "$RUNNER_TEMP/nextgen-journey/docker-compose.yaml" --env-file "$RUNNER_TEMP/nextgen-journey/.env" logs nextgen
704- exit 1
617+ echo "ZITADEL_LOCAL_IMAGE=$(cat goreleaser-dist/nextgen-image.tag)" >> "$GITHUB_ENV"
705618
706619 - name : Prepare fresh Next.js app
707620 id : prepare-app
708621 env :
709- JOURNEY_BACKEND_URL : http://localhost:8080
710- JOURNEY_CREATE_NEXT_APP_VERSION : 16.2.4
711622 JOURNEY_REGISTRY_URL : http://127.0.0.1:4873
712623 JOURNEY_WORK_DIR : ${{ runner.temp }}/zitadel-cli-journey
713624 run : node apps/cli-journey-e2e/scripts/prepare-next-app.mjs
@@ -735,17 +646,32 @@ jobs:
735646 - name : Collect diagnostics
736647 if : failure()
737648 run : |
738- docker compose -f "$RUNNER_TEMP/nextgen-journey/docker-compose.yaml" --env-file "$RUNNER_TEMP/nextgen-journey/.env" logs > "$RUNNER_TEMP/backend-compose.log" 2>&1 || true
739649 DIAG_DIR="$RUNNER_TEMP/consumer-journey-diagnostics"
650+ APP_DIR="$RUNNER_TEMP/zitadel-cli-journey/myapp"
740651 mkdir -p "$DIAG_DIR/generated-app"
741- cp "$RUNNER_TEMP/backend-compose.log" "$DIAG_DIR/" 2>/dev/null || true
652+ if [ -d "$APP_DIR" ]; then
653+ (
654+ cd "$APP_DIR"
655+ npm_config_registry=http://127.0.0.1:4873 \
656+ npm_config_yes=true \
657+ npm_config_audit=false \
658+ npm_config_fund=false \
659+ npx --yes @zitadel/cli@alpha logs --tail 400 --non-interactive --json \
660+ > "$DIAG_DIR/logs.json" 2> "$DIAG_DIR/logs.stderr.log"
661+ ) || true
662+ fi
742663 cp "$RUNNER_TEMP/next-app.log" "$DIAG_DIR/" 2>/dev/null || true
743664 cp "$RUNNER_TEMP/verdaccio.log" "$DIAG_DIR/" 2>/dev/null || true
665+ cp "$RUNNER_TEMP/zitadel-cli-journey/doctor.json" "$DIAG_DIR/" 2>/dev/null || true
666+ cp "$RUNNER_TEMP/zitadel-cli-journey/doctor.stderr.log" "$DIAG_DIR/" 2>/dev/null || true
667+ cp "$RUNNER_TEMP/zitadel-cli-journey/start.json" "$DIAG_DIR/" 2>/dev/null || true
668+ cp "$RUNNER_TEMP/zitadel-cli-journey/start.stderr.log" "$DIAG_DIR/" 2>/dev/null || true
744669 cp "$RUNNER_TEMP/zitadel-cli-journey/setup.json" "$DIAG_DIR/" 2>/dev/null || true
745670 cp "$RUNNER_TEMP/zitadel-cli-journey/setup.stderr.log" "$DIAG_DIR/" 2>/dev/null || true
746671 cp "$RUNNER_TEMP/zitadel-cli-journey/metadata.json" "$DIAG_DIR/" 2>/dev/null || true
747- cp "$RUNNER_TEMP/zitadel-cli-journey/myapp/package.json" "$DIAG_DIR/generated-app/" 2>/dev/null || true
748- cp "$RUNNER_TEMP/zitadel-cli-journey/myapp/package-lock.json" "$DIAG_DIR/generated-app/" 2>/dev/null || true
672+ cp "$APP_DIR/.zitadel/local/runtime.json" "$DIAG_DIR/runtime.json" 2>/dev/null || true
673+ cp "$APP_DIR/package.json" "$DIAG_DIR/generated-app/" 2>/dev/null || true
674+ cp "$APP_DIR/package-lock.json" "$DIAG_DIR/generated-app/" 2>/dev/null || true
749675
750676 - name : Upload consumer journey diagnostics
751677 if : failure()
@@ -763,7 +689,15 @@ jobs:
763689 if : always()
764690 run : |
765691 if [ -n "${NEXT_APP_PID:-}" ]; then kill "$NEXT_APP_PID" 2>/dev/null || true; fi
766- if [ -n "${VERDACCIO_PID:-}" ]; then kill "$VERDACCIO_PID" 2>/dev/null || true; fi
767- if [ -f "$RUNNER_TEMP/nextgen-journey/docker-compose.yaml" ]; then
768- docker compose -f "$RUNNER_TEMP/nextgen-journey/docker-compose.yaml" --env-file "$RUNNER_TEMP/nextgen-journey/.env" down -v
692+ APP_DIR="$RUNNER_TEMP/zitadel-cli-journey/myapp"
693+ if [ -d "$APP_DIR" ]; then
694+ (
695+ cd "$APP_DIR"
696+ npm_config_registry=http://127.0.0.1:4873 \
697+ npm_config_yes=true \
698+ npm_config_audit=false \
699+ npm_config_fund=false \
700+ npx --yes @zitadel/cli@alpha reset --force --non-interactive --json
701+ ) || true
769702 fi
703+ if [ -n "${VERDACCIO_PID:-}" ]; then kill "$VERDACCIO_PID" 2>/dev/null || true; fi
0 commit comments