Record live staging transaction archive and retention evidence

This commit is contained in:
Mark Gregory
2026-11-30 12:41:12 +00:00
parent 611f8d0f3d
commit 13608f9d5f
24 changed files with 1588 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
set -euo pipefail
umask 077
test "$(hostname -s | tr A-Z a-z)" = absdev-ci
stage=$(mktemp -d /var/tmp/absdev-live-retention.XXXXXX)
cleanup() {
sudo -n find "$stage" -mindepth 2 -maxdepth 2 -type d -name backend -exec rm -rf -- {} +
rm -rf -- "$stage"
}
trap cleanup EXIT
cd "$stage"
tar -xm -f -
git clone -q framework.bundle framework
git -C framework checkout -q --detach 611f8d0f3de949fdd38031132124649facad968c
ln -s /var/tmp/absdev-supported-containment.L6qYEi/docker-config docker-config
mkdir tmp evidence
export TMPDIR="$stage/tmp"
if ! python3 -B staging.py > evidence/run.txt 2>&1; then
tail -65 evidence/run.txt >&2
exit 1
fi
TMPDIR="$stage/tmp" bash framework/scripts/ci-check.sh > evidence/framework-ci.txt 2>&1 || { tail -80 evidence/framework-ci.txt >&2; exit 1; }
cp checks.jsonl summary.json evidence/
for scenario in success failed-health restart; do
mkdir "evidence/$scenario"
dir=$(cat "$scenario.path")
cp "$dir/"{site-manifest.json,retention.json,transaction.json} "evidence/$scenario/"
if test "$scenario" != failed-health; then
cp "$dir/"{retired-retention.json,archive-identity.json} "evidence/$scenario/"
fi
done
(
cd evidence
find . -type f ! -name SHA256SUMS -print | sort | xargs sha256sum > SHA256SUMS
)
tar -czf - -C evidence .