#!/usr/bin/env bash # mumble — INSTALL-TIME hook (Phase 2 Q4.2). Runs during the install tier AFTER `abra app new` + # EXTRA_ENV + `abra app secret generate` and BEFORE the single `abra app deploy` # (lifecycle.py::_run_install_steps), with CCCI_RECIPE / CCCI_APP_DOMAIN / CCCI_APP_ENV in env. # # Purpose: guarantee `compose.host-ports.yml` exists in the recipe checkout for EVERY version under # test. mumble's voice server speaks a non-HTTP TLS protocol on 64738; cc-ci's tests run on-host # (cc-ci-run) and reach it at 127.0.0.1:64738 via a host-published port. The upstream recipe ships # compose.host-ports.yml only from version 1.0.0+, but the upgrade tier's base deploy is the previous # published version (0.2.0+), which predates it — so EXTRA_ENV's COMPOSE_FILE (which references the # overlay) would fail to resolve on that base deploy. We provide an identical overlay here so the # overlay is present whether the checked-out version ships it natively (no-op) or not (copied). set -euo pipefail : "${CCCI_RECIPE:?missing CCCI_RECIPE}" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" RECIPE_DIR="${HOME}/.abra/recipes/${CCCI_RECIPE}" if [ ! -d "$RECIPE_DIR" ]; then echo " mumble install_steps: recipe dir $RECIPE_DIR missing — cannot provide host-ports overlay" >&2 exit 1 fi if [ -f "$RECIPE_DIR/compose.host-ports.yml" ]; then echo " mumble install_steps: compose.host-ports.yml already present (native to this version)" else cp "$SCRIPT_DIR/compose.host-ports.yml" "$RECIPE_DIR/compose.host-ports.yml" echo " mumble install_steps: provided compose.host-ports.yml to recipe checkout (${CCCI_RECIPE})" fi