release 1.3.1: monpages FQDN check + fix silent deploy skip
This commit is contained in:
parent
941f54b409
commit
5b56141014
12 changed files with 247 additions and 17 deletions
|
|
@ -7,7 +7,8 @@
|
|||
# 2) line-buffered run log (written continuously)
|
||||
# 3) RUN_TIMEOUT wall clock for taler-monitoring.sh (default 600s)
|
||||
# 4) always write HTML (first run / empty staging too) + Forgejo commit link
|
||||
# 5) optional rsync to DEPLOY_WWW_ROOT if writable
|
||||
# 5) rsync to DEPLOY_WWW_ROOT (ERROR if not writable — v1.3.1)
|
||||
# 6) monpages post-check: public FQDN must serve monitoring HTML
|
||||
#
|
||||
# Configure via env file (not in git):
|
||||
# ${XDG_CONFIG_HOME:-$HOME/.config}/taler-monitoring/env
|
||||
|
|
@ -88,7 +89,7 @@ elif [ -n "${TALER_MON_LANG:-}" ]; then
|
|||
fi
|
||||
export TALER_MON_LANG
|
||||
|
||||
PHASES="${PHASES:-urls inside versions}"
|
||||
PHASES="${PHASES:-urls inside versions monpages}"
|
||||
HTML_BASE="${HTML_OUT:-$HOME/monitoring-sites-staging}"
|
||||
MON_HOSTS="${MON_HOSTS:-}"
|
||||
SUITE_PATH="${SOURCE_SUITE_PATH:-.}"
|
||||
|
|
@ -386,9 +387,37 @@ for host in $MON_HOSTS; do
|
|||
htmlify_host "$host"
|
||||
done
|
||||
|
||||
if [ -n "$DEPLOY_WWW" ] && [ -w "$DEPLOY_WWW" ] 2>/dev/null; then
|
||||
rsync -a --delete "$HTML_BASE/" "$DEPLOY_WWW/" && \
|
||||
echo "synced → $DEPLOY_WWW/"
|
||||
# Publish to live web root when possible (v1.3.1: never silent-skip)
|
||||
if [ -n "$DEPLOY_WWW" ]; then
|
||||
if [ -w "$DEPLOY_WWW" ] 2>/dev/null; then
|
||||
if rsync -a --delete "$HTML_BASE/" "$DEPLOY_WWW/"; then
|
||||
echo "synced → $DEPLOY_WWW/"
|
||||
else
|
||||
echo "ERROR: rsync to DEPLOY_WWW_ROOT=$DEPLOY_WWW failed" >&2
|
||||
ec=1
|
||||
fi
|
||||
elif [ -e "$DEPLOY_WWW" ]; then
|
||||
echo "ERROR: DEPLOY_WWW_ROOT=$DEPLOY_WWW exists but is not writable by $(id -un)" >&2
|
||||
echo " public FQDN pages will stay missing/stale — fix ownership or run:" >&2
|
||||
echo " sudo ~/koopa-caddy/apply-monitoring-live.sh" >&2
|
||||
ec=1
|
||||
else
|
||||
echo "ERROR: DEPLOY_WWW_ROOT=$DEPLOY_WWW missing — public pages not published" >&2
|
||||
echo " create tree + Caddy handles: sudo ~/koopa-caddy/apply-monitoring-live.sh" >&2
|
||||
ec=1
|
||||
fi
|
||||
else
|
||||
echo "WARN: DEPLOY_WWW_ROOT empty — skipping live publish (staging only: $HTML_BASE)" >&2
|
||||
fi
|
||||
|
||||
# Post-publish: verify this job's pages via FQDN (same paths as monpages phase)
|
||||
if [ "${MONPAGES_POSTCHECK:-1}" = "1" ] && [ -x "$ROOT/check_monitoring_pages.sh" ]; then
|
||||
echo "--- monpages post-check (public FQDN) ---"
|
||||
export MON_HOSTS HTML_URL_OK HTML_URL_ERR TALER_DOMAIN
|
||||
if ! bash "$ROOT/check_monitoring_pages.sh"; then
|
||||
echo "ERROR: public monitoring page(s) missing or not suite HTML via FQDN" >&2
|
||||
ec=1
|
||||
fi
|
||||
fi
|
||||
|
||||
ls -1t "$LOG_DIR"/run-*.log 2>/dev/null | tail -n +30 | xargs rm -f 2>/dev/null || true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue