File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ # Capture acceptance evidence for R720 cutover runs.
5+ # Usage:
6+ # BASE_URL=https://memory.example.com ./scripts/r720-capture-acceptance.sh
7+ # OUT_DIR=artifacts/r720 BASE_URL=http://localhost:8082 ./scripts/r720-capture-acceptance.sh
8+
9+ OUT_DIR=" ${OUT_DIR:- artifacts/ r720} "
10+ STAMP=" $( date +%Y%m%d-%H%M%S) "
11+ RUN_DIR=" $OUT_DIR /acceptance-$STAMP "
12+ mkdir -p " $RUN_DIR "
13+
14+ BASE_URL=" ${BASE_URL:- http:// localhost: 8082} "
15+ DO_RESTART=" ${DO_RESTART:- 0} "
16+
17+ {
18+ echo " timestamp=$( date ' +%Y-%m-%dT%H:%M:%S%z' ) "
19+ echo " base_url=$BASE_URL "
20+ echo " do_restart=$DO_RESTART "
21+ } > " $RUN_DIR /context.env"
22+
23+ set +e
24+ BASE_URL=" $BASE_URL " DO_RESTART=" $DO_RESTART " bash scripts/r720-acceptance.sh > " $RUN_DIR /output.log" 2>&1
25+ RC=$?
26+ set -e
27+
28+ echo " $RC " > " $RUN_DIR /exit_code.txt"
29+
30+ if [ " $RC " -eq 0 ]; then
31+ echo " PASS: acceptance evidence captured at $RUN_DIR "
32+ else
33+ echo " FAIL($RC ): acceptance evidence captured at $RUN_DIR "
34+ fi
35+
36+ exit " $RC "
You can’t perform that action at this time.
0 commit comments