0
0
CI prod gate: r2 entries, run dumps as artifacts
.knotless/workflows/promote.yml+2−0
| @@ -14,6 +14,8 @@ after: [test] | ||
executor: release | ||
superseded: finish | ||
secrets: [PROD_DEPLOY_SSH_KEY, ATIRC_AGENT_CONFIG] | ||
# the prod gate's run dumps (failure, state, redacted logs: no secret), kept passed or failed; the gate's own dir (iroh keys) is not | ||
artifacts: [gate-runs] | ||
steps: | ||
- name: release | ||
timeout: 240 | ||
docs/plans/0040-release-pipeline.md+5−0
| @@ -279,6 +279,11 @@ calls, and stops at the first failed step, so the whole release is one step): | ||
moves `rc` back and runs `scripts/promote.sh rollback` on the VM, and the step fails. | ||
- `.knotless/workflows/promote.yml`: push main, `after: [test]`, `executor: release`, secrets `PROD_DEPLOY_SSH_KEY` | ||
and `ATIRC_AGENT_CONFIG`, one step `release bash scripts/promote.sh`. | ||
- The prod gate in promote runs as the release VM's guest requester r2 (as `scripts/ci-test.sh` runs staging: `SWC_REPO`, | ||
the installed binary and meshd), the entries r2 drives (the staging suite's: `GATE_R2_ENTRIES` in promote.sh); its run | ||
dumps are the run's artifacts (`gate-runs`). The entries that need a password account (a second requester, an owner | ||
sign-in: 0001, 0002, 0004, 0009, 0011, ...) are the full gate, `tests/gate.sh <prod target> --account bob,alice` on | ||
hat-8, where those credentials are (they never go into CI). | ||
| ||
### 7. rc operators | ||
| ||
scripts/promote.sh+6−2
| @@ -52,8 +52,12 @@ if [ -n "${ATIRC_AGENT_CONFIG:-}" ]; then | ||
fi | ||
unset ATIRC_AGENT_CONFIG | ||
chown r2 "$home/target-prod.json" | ||
install -d -o r2 gate-runs | ||
# the entries the guest requester r2 drives (the staging suite's, scripts/ci-test.sh input_default); the rest need a password | ||
# account (alice, bob: a second requester or an owner sign-in), whose credentials never leave the deploy host | ||
GATE_R2_ENTRIES="0003:run 0005:run 0006:run 0007:run 0007:restart 0008:run 0012:run 0013:run 0014:run 0014:concurrent 0014:exhausted 0014:backtoback 0015:pressure 0016:run 0016:badsha 0019:run 0020:run" | ||
# as scripts/ci-test.sh runs the staging suite: as the guest requester r2, the checkout as SWC_REPO (a prebuilt test host's | ||
# own source path is the build host's), the binary under test and meshd that ci-test.sh host and binary installed | ||
runuser -u r2 -- env HOME=/home/r2 XDG_RUNTIME_DIR="/run/user/$(id -u r2)" SWC_REPO="$PWD" SWC_BINARY="$home/swc-under-test" \ | ||
SWC_MESHD=/usr/local/bin/socialweb-meshd CI=1 GATE_HOST="$PWD/tests/target/release/swc-test-host" GATE_ACCOUNTS=r2 \ | ||
bash tests/gate.sh "$home/target-prod.json" | ||
SWC_MESHD=/usr/local/bin/socialweb-meshd SWC_RUNS="$PWD/gate-runs" CI=1 GATE_HOST="$PWD/tests/target/release/swc-test-host" GATE_ACCOUNTS=r2 \ | ||
bash tests/gate.sh "$home/target-prod.json" $GATE_R2_ENTRIES | ||