ci: build, test, and run Signage inside a pinned Ekklesia on every change
Signage had no CI. Its tests passed while three defects shipped that appear only inside Ekklesia, in a real browser. Every job now assembles Signage into a pinned platform commit, as an instance does, and installs that workspace with --frozen-lockfile: - lint, typecheck, test: Signage's own checks; - build: the platform's gates against exactly this module set (boundary rules, module manifest, migrations), then the build; - integration: the deployment image from the platform's Dockerfile, then the platform's split-topology smoke. It pairs a kiosk display, restarts it on the same profile, and runs the scenarios in ci/display-scenarios. The supporting files: - ci/platform.env pins one platform commit. ci/assemble.sh fetches the platform's main and refuses a pinned commit that is not on it, so CI only runs reviewed platform code. - ci/pnpm-lock.yaml is the assembled workspace's lockfile, regenerated with ci/update-lock.sh. Same trust rules as the platform: actions pinned by SHA, persist-credentials false, no secrets, no pull_request_target. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5e418bf941
commit
3073baeb8b
Executable
+38
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
# Signage inside Ekklesia, end to end: builds the deployment image from the assembled workspace with
|
||||
# the platform's own Dockerfile, then runs the platform's split-topology deployment smoke against it
|
||||
# with the display-device scenarios listed in ci/display-scenarios. A disposable PostgreSQL and object
|
||||
# store, generated secrets, and an explicit migration apply against that fresh database only; nothing
|
||||
# is pushed, published, or logged in to. The image is removed afterwards.
|
||||
#
|
||||
# bash ci/integration.sh (after bash ci/assemble.sh)
|
||||
set -Eeuo pipefail
|
||||
|
||||
root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
workspace="$root/build/workspace"
|
||||
[[ -f "$workspace/deploy/Dockerfile" ]] || {
|
||||
echo "integration: run bash ci/assemble.sh first." >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
image="signage-ci:${GITHUB_SHA:-local}-${GITHUB_RUN_ID:-0}-${GITHUB_RUN_ATTEMPT:-1}"
|
||||
trap 'docker image rm --force "$image" >/dev/null 2>&1 || true' EXIT
|
||||
|
||||
scenarios="$(sed -e 's/#.*//' -e '/^[[:space:]]*$/d' "$root/ci/display-scenarios" | tr '\n' ' ')"
|
||||
[[ -n "${scenarios// /}" ]] || {
|
||||
echo "integration: ci/display-scenarios lists no scenario." >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
DOCKER_BUILDKIT=1 docker build --quiet --file "$workspace/deploy/Dockerfile" --tag "$image" \
|
||||
"$workspace" >/dev/null
|
||||
echo "integration: built the deployment image with Signage; scenarios: ${scenarios}"
|
||||
|
||||
cd "$workspace"
|
||||
EKKLESIA_SMOKE_TOPOLOGY=split \
|
||||
EKKLESIA_SMOKE_IMAGE="$image" \
|
||||
EKKLESIA_SMOKE_DISPLAY_DEVICE=1 \
|
||||
EKKLESIA_SMOKE_DISPLAY_SCENARIOS="$scenarios" \
|
||||
EKKLESIA_SMOKE_WATCH_MS=120000 \
|
||||
EKKLESIA_SMOKE_RECYCLE_WATCH_MS=120000 \
|
||||
bash scripts/smoke-deploy.sh
|
||||
Reference in New Issue
Block a user