mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 19:56:53 +00:00
make compose-role-sync runs only the role of one deployed application, with its proxy vhost and injected snippets. It marks every shared service of the stack as converged and skips the stack-wide service stop. With pw= it stages the Playwright spec of the role again, renders its env and runs it. make design-sync keeps re-rendering only the shared CSS, the role stylesheet and the branding assets. Both run through one playbook-sync.yml with a scope, which replaces playbook-design.yml. The host placement of the proxy and the shared services moves from the constructor stage into tasks/utils/constructor/placement.yml, so the role sync can include it. base='<hex>' on both targets passes DESIGN_BASE_COLOR. The development inventory references that variable for the design base color and keeps #FFA500 as its default, so a deployed role can be rendered and checked with another palette. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
29 lines
1.2 KiB
Bash
Executable File
29 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Re-render the static corporate design files of one deployed app inside the
|
|
# running stack: shared CSS, role style.css and the branding assets. No
|
|
# redeploy. Injected scripts stay as deployed, their CSP hashes live in the vhost.
|
|
#
|
|
# Param app: deployed application id (required).
|
|
# Param variant: matrix round index the app was deployed with (optional).
|
|
# Param base: hex base color that replaces the one of the inventory for this run, e.g. '#001f3f' (optional).
|
|
set -euo pipefail
|
|
|
|
: "${app:?app=<application_id> required}"
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
|
|
cd "${REPO_ROOT}"
|
|
# shellcheck source=scripts/meta/env/load.sh
|
|
source scripts/meta/env/load.sh
|
|
|
|
inv_dir="${INFINITO_INVENTORY_DIR}${variant:+-${variant}}"
|
|
|
|
extra="{\"APPLICATIONS_WHITELIST\": [\"${app}\"], \"sync_scope\": \"design\""
|
|
if [[ -n "${base:-}" ]]; then
|
|
extra+=", \"DESIGN_BASE_COLOR\": \"${base}\""
|
|
fi
|
|
extra+="}"
|
|
|
|
cmd="\"\${INFINITO_VENV_DIR}/bin/ansible-playbook\" -i '${inv_dir}/devices.yml' playbook-sync.yml -l localhost --vault-password-file '${inv_dir}/.password' -e '${extra}' -e ASYNC_ENABLED=false" \
|
|
bash scripts/tests/deploy/local/exec/container.sh
|