feat(ci): rotation scripts keep the Forgejo secret replicas current #44
Loading…
Reference in a new issue
No description provided.
Delete branch "jfraeys/feat/rotation-ci-sync"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Wires the P5 sync into rotation, so a rotation updates the vault and the Forgejo replicas in one step.
Stacked on #43 (it adds .forgejo/ci-secrets.yml and scripts/sync-ci-secrets.py): merge #43 first; until then this diff also shows its commit.
sync-ci-secrets.py --vault-key KEY...: only the Forgejo secrets replicating those vault keys; exits 0 doing nothing if none do.rotate-secret.sh: records every key it changes (including the Authelia/Headscale paired keys) and syncs them after the vault write. Sync failure after a successful vault write: prints "Forgejo CI secret ... is STALE" plus the fix command, still prints the rest of the output, exits 1.rotate-ovh-s3-credentials.sh: same for its pair.provision-ci-state-key.py: replaced its own Forgejo PUT/verify code with the shared sync (less duplication).Today none of the rotated keys is replicated (the replicated vault keys are TF_VAR_linode_token, TF_VAR_cloudflare_api_token, FORGEJO_ADMIN_TOKEN, CI_STATE_BACKEND_*, and rotate-secret.sh does not touch them), so the hook is a no-op for current rotations; it takes effect when those are rotated.
Verified: syntax of all touched scripts;
--vault-keyno-op and mapped-key paths against the real repo (read-only/no-op only);rotate-secret.sh headscale --dry-runstill runs and leaves the vault untouched. Not verified: a real rotation or a real sync failure through rotate-secret.sh (would change real secrets).🤖 Generated with Claude Code