46 lines
2 KiB
Bash
Executable file
46 lines
2 KiB
Bash
Executable file
#!/usr/bin/env bash
|
||
# run-aptdeploy-monitoring.sh — apt-src deploy tests → public HTML
|
||
# Public only on taler.hacktivism.ch:
|
||
# https://taler.hacktivism.ch/taler-monitoring-aptdeploy/
|
||
# https://taler.hacktivism.ch/taler-monitoring-aptdeploy_err/
|
||
#
|
||
# CLI one-shot without HTML remains: run-aptdeploy.sh [all|fresh|upgrade|check-only]
|
||
#
|
||
set -uo pipefail
|
||
AGENT_DIR=$(cd "$(dirname "$0")" && pwd)
|
||
|
||
export AGENT_LABEL="${AGENT_LABEL:-aptdeploy-host-agent}"
|
||
export STATE_NAME="${STATE_NAME:-taler-aptdeploy-monitoring}"
|
||
export TALER_DOMAIN="${TALER_DOMAIN:-hacktivism.ch}"
|
||
# containers are local on koopa
|
||
export INSIDE_PODMAN=1
|
||
export INSIDE_MODE=local-podman
|
||
export LOCAL_STACK=1
|
||
export SKIP_SSH=0
|
||
export CONTINUE_ON_ERROR="${CONTINUE_ON_ERROR:-1}"
|
||
# four containers + checks; allow long wall
|
||
export RUN_TIMEOUT="${RUN_TIMEOUT:-1800}"
|
||
# dedicated job: always aptdeploy only
|
||
export PHASES="${PHASES:-aptdeploy monpages}"
|
||
# Only merchant public front — not bank/exchange
|
||
export MON_HOSTS="${MON_HOSTS:-taler.hacktivism.ch}"
|
||
export HTML_OUT="${HTML_OUT:-$HOME/monitoring-sites-staging}"
|
||
export DEPLOY_WWW_ROOT="${DEPLOY_WWW_ROOT:-/var/www/monitoring-sites}"
|
||
|
||
export HTML_OK_DIR="taler-monitoring-aptdeploy"
|
||
export HTML_ERR_DIR="taler-monitoring-aptdeploy_err"
|
||
export HTML_URL_OK="/taler-monitoring-aptdeploy/"
|
||
export HTML_URL_ERR="/taler-monitoring-aptdeploy_err/"
|
||
export PAGE_LABEL="taler-monitoring-aptdeploy"
|
||
# monpages: only this job’s /taler-monitoring-aptdeploy* — not bank/exchange
|
||
# landings or surface (those belong to run-hacktivism-monitoring / surface timer).
|
||
export MONPAGES_INVENTORY="${MONPAGES_INVENTORY:-job}"
|
||
|
||
# Ensure all four apt-src containers (fresh rebuild + upgrade track)
|
||
if [ "${APT_DEPLOY_ENSURE:-1}" = "1" ] \
|
||
&& [ -x "$AGENT_DIR/ensure-apt-deploy-test-containers.sh" ]; then
|
||
bash "$AGENT_DIR/ensure-apt-deploy-test-containers.sh" all \
|
||
|| echo "WARN: ensure-apt-deploy-test-containers failed (aptdeploy may ERROR)" >&2
|
||
fi
|
||
|
||
exec bash "$AGENT_DIR/run-host-report.sh" "$@"
|