#!/usr/bin/env bash # Builds Signage as the canonical linux-x64-glibc Module Package, then gives that exact release pair # to the pinned platform's generic deployment smoke. The platform image contains no Signage source: # its verifier extracts the package into installation-owned module storage before migrations, # discovery, browser UI/display checks, restart, container recreation, disable/re-enable, removal, # and reinstall are exercised against disposable PostgreSQL and object-storage services. # # bash ci/fetch-platform.sh # bash ci/integration.sh set -Eeuo pipefail root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)" platform="$root/build/platform" release="$root/build/module-package" [[ -f "$platform/scripts/smoke-deploy.sh" ]] || { echo "integration: run bash ci/fetch-platform.sh first." >&2 exit 1 } source_revision="${GITHUB_SHA:-$(git -C "$root" rev-parse HEAD 2>/dev/null || true)}" [[ "$source_revision" =~ ^[0-9a-f]{40}$ ]] || { echo "integration: no full source revision is available for the package." >&2 exit 1 } rm -rf "$release" mkdir -p "$release" pnpm --dir "$root" build pnpm --dir "$root" exec ekklesia-pack-module --module "$root" --target linux-x64-glibc \ --out "$release" --license-file "$root/LICENSE" --source-revision "$source_revision" 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 } echo "integration: external Signage package built; scenarios: ${scenarios}" cd "$platform" EKKLESIA_SMOKE_TOPOLOGY=split \ EKKLESIA_SMOKE_MODULE_RELEASE_DIR="$release" \ EKKLESIA_SMOKE_MODULE_ID=signage \ EKKLESIA_SMOKE_MODULE_PROBE_PATH=/api/v1/modules/signage/channel-groups \ 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