diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index 510b85f99..8fc78eb19 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -229,6 +229,22 @@ jobs: cp "$SRC" "deploy/digests/${SHA}.json" echo "Recorded digest manifest: deploy/digests/${SHA}.json" chmod +x deploy/scripts/promote.sh + # Snapshot the full current staging release once. Sequential + # promote.sh calls overwrite `previous` per service and would + # otherwise leave a mixed rollback (new images + one old). + python3 -c ' + import json + p = json.load(open("deploy/pins/staging.json")) + prev = { + "commit_sha": p.get("commit_sha"), + "services": p.get("services") or {}, + "updated_at": p.get("updated_at"), + } + with open("/tmp/staging-previous.json", "w", encoding="utf-8") as f: + json.dump(prev, f, indent=2, sort_keys=True) + f.write("\n") + print("captured previous staging release", prev.get("commit_sha")) + ' # Pin services only (validator/gateway/updater/live challenges). # --skip-backup: this job records CI digests; Spaces/PG backup runs at # prod promote (deploy-prod.yml, fail-closed). @@ -250,11 +266,18 @@ jobs: python3 -c ' import json, sys p = json.load(open("deploy/pins/staging.json")) + prev = json.load(open("/tmp/staging-previous.json")) + p["previous"] = prev + with open("deploy/pins/staging.json", "w", encoding="utf-8") as f: + json.dump(p, f, indent=2, sort_keys=True) + f.write("\n") assert p["commit_sha"] == sys.argv[1], (p["commit_sha"], sys.argv[1]) for s in ("validator", "gateway", "updater", "bounty-challenge", "proof-challenge"): assert s in p["services"], s assert p["services"][s]["digest"].startswith("sha256:") - print("staging pins ok", p["commit_sha"]) + assert s in prev["services"], s + assert prev["services"][s]["digest"].startswith("sha256:") + print("staging pins ok", p["commit_sha"], "previous", prev.get("commit_sha")) ' "$SHA" - name: Commit and push staging pins diff --git a/deploy/digests/a8b9018134a3e7b5446514ab48a937882b0f0a63.json b/deploy/digests/a8b9018134a3e7b5446514ab48a937882b0f0a63.json new file mode 100644 index 000000000..44dc74293 --- /dev/null +++ b/deploy/digests/a8b9018134a3e7b5446514ab48a937882b0f0a63.json @@ -0,0 +1,55 @@ +{ + "commit_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63", + "created_at": "2026-09-09T16:02:23Z", + "images": { + "base-attest-helper": { + "commit_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63", + "digest": "sha256:505d9f2d9dfbbc3e0cf0a8c7593cb1c5b563417af30ac2467340759c1029f190", + "image": "ghcr.io/cortexlm/cortex/base-attest-helper@sha256:505d9f2d9dfbbc3e0cf0a8c7593cb1c5b563417af30ac2467340759c1029f190", + "repository": "ghcr.io/cortexlm/cortex/base-attest-helper", + "service": "base-attest-helper", + "tag_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63" + }, + "bounty-challenge": { + "commit_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63", + "digest": "sha256:cdc9696f7eb3b43942f4744aa2b6fbbc0a225b85ae3347288b2c5a970f18a1ad", + "image": "ghcr.io/cortexlm/cortex/bounty-challenge@sha256:cdc9696f7eb3b43942f4744aa2b6fbbc0a225b85ae3347288b2c5a970f18a1ad", + "repository": "ghcr.io/cortexlm/cortex/bounty-challenge", + "service": "bounty-challenge", + "tag_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63" + }, + "gateway": { + "commit_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63", + "digest": "sha256:17ded01be2d0142e970341a394fc405ad0759687b86cd3ed851e1cbee0e4f3c2", + "image": "ghcr.io/cortexlm/cortex/gateway@sha256:17ded01be2d0142e970341a394fc405ad0759687b86cd3ed851e1cbee0e4f3c2", + "repository": "ghcr.io/cortexlm/cortex/gateway", + "service": "gateway", + "tag_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63" + }, + "proof-challenge": { + "commit_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63", + "digest": "sha256:b7a33f892c995a5a49f9b7a6f0de0bf8dbeeff741641fa587372c70804ea22b6", + "image": "ghcr.io/cortexlm/cortex/proof-challenge@sha256:b7a33f892c995a5a49f9b7a6f0de0bf8dbeeff741641fa587372c70804ea22b6", + "repository": "ghcr.io/cortexlm/cortex/proof-challenge", + "service": "proof-challenge", + "tag_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63" + }, + "updater": { + "commit_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63", + "digest": "sha256:e42a763e175cc0aa92fb9398bcba1457f4120d7f0aba7c8c87f9b1024ea011d4", + "image": "ghcr.io/cortexlm/cortex/updater@sha256:e42a763e175cc0aa92fb9398bcba1457f4120d7f0aba7c8c87f9b1024ea011d4", + "repository": "ghcr.io/cortexlm/cortex/updater", + "service": "updater", + "tag_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63" + }, + "validator": { + "commit_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63", + "digest": "sha256:650bfe48be60fb0007992eb26ce3e908b14e43212b88da0c180c73f71e041bad", + "image": "ghcr.io/cortexlm/cortex/validator@sha256:650bfe48be60fb0007992eb26ce3e908b14e43212b88da0c180c73f71e041bad", + "repository": "ghcr.io/cortexlm/cortex/validator", + "service": "validator", + "tag_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63" + } + }, + "registry": "ghcr.io" +} diff --git a/deploy/pins/staging.json b/deploy/pins/staging.json index 83f7d768f..3f0ffe260 100644 --- a/deploy/pins/staging.json +++ b/deploy/pins/staging.json @@ -1,5 +1,5 @@ { - "commit_sha": "1dd07f7484bb6a2bab6f9fcd7c9348f95fec1927", + "commit_sha": "a8b9018134a3e7b5446514ab48a937882b0f0a63", "env": "staging", "previous": { "commit_sha": "1dd07f7484bb6a2bab6f9fcd7c9348f95fec1927", @@ -15,8 +15,8 @@ "repository": "ghcr.io/cortexlm/cortex/gateway" }, "proof-challenge": { - "digest": "sha256:5bd900e46503f8054f75e15b01324f2bfb472eb1feab90ada173b250270f77d3", - "image": "ghcr.io/cortexlm/cortex/proof-challenge@sha256:5bd900e46503f8054f75e15b01324f2bfb472eb1feab90ada173b250270f77d3", + "digest": "sha256:2541d0afd0fc492b031bc472756555f13957f6c8d1a85a9ab7f5902cdc639821", + "image": "ghcr.io/cortexlm/cortex/proof-challenge@sha256:2541d0afd0fc492b031bc472756555f13957f6c8d1a85a9ab7f5902cdc639821", "repository": "ghcr.io/cortexlm/cortex/proof-challenge" }, "updater": { @@ -30,34 +30,34 @@ "repository": "ghcr.io/cortexlm/cortex/validator" } }, - "updated_at": "2026-09-05T08:09:25Z" + "updated_at": "2026-09-05T08:09:26Z" }, "services": { "bounty-challenge": { - "digest": "sha256:624c1d1e98605d1885460a90373351d49c4a5f6ed242827a4d2673124e7a75d3", - "image": "ghcr.io/cortexlm/cortex/bounty-challenge@sha256:624c1d1e98605d1885460a90373351d49c4a5f6ed242827a4d2673124e7a75d3", + "digest": "sha256:cdc9696f7eb3b43942f4744aa2b6fbbc0a225b85ae3347288b2c5a970f18a1ad", + "image": "ghcr.io/cortexlm/cortex/bounty-challenge@sha256:cdc9696f7eb3b43942f4744aa2b6fbbc0a225b85ae3347288b2c5a970f18a1ad", "repository": "ghcr.io/cortexlm/cortex/bounty-challenge" }, "gateway": { - "digest": "sha256:fa8b73b7f696a18cbda31db76ee2524eb95e97a44316be6109a000316ef662a1", - "image": "ghcr.io/cortexlm/cortex/gateway@sha256:fa8b73b7f696a18cbda31db76ee2524eb95e97a44316be6109a000316ef662a1", + "digest": "sha256:17ded01be2d0142e970341a394fc405ad0759687b86cd3ed851e1cbee0e4f3c2", + "image": "ghcr.io/cortexlm/cortex/gateway@sha256:17ded01be2d0142e970341a394fc405ad0759687b86cd3ed851e1cbee0e4f3c2", "repository": "ghcr.io/cortexlm/cortex/gateway" }, "proof-challenge": { - "digest": "sha256:2541d0afd0fc492b031bc472756555f13957f6c8d1a85a9ab7f5902cdc639821", - "image": "ghcr.io/cortexlm/cortex/proof-challenge@sha256:2541d0afd0fc492b031bc472756555f13957f6c8d1a85a9ab7f5902cdc639821", + "digest": "sha256:b7a33f892c995a5a49f9b7a6f0de0bf8dbeeff741641fa587372c70804ea22b6", + "image": "ghcr.io/cortexlm/cortex/proof-challenge@sha256:b7a33f892c995a5a49f9b7a6f0de0bf8dbeeff741641fa587372c70804ea22b6", "repository": "ghcr.io/cortexlm/cortex/proof-challenge" }, "updater": { - "digest": "sha256:4f0cf422dc8be9f96b31d1c470e302da97a0054e812815ac444c5593a0006c02", - "image": "ghcr.io/cortexlm/cortex/updater@sha256:4f0cf422dc8be9f96b31d1c470e302da97a0054e812815ac444c5593a0006c02", + "digest": "sha256:e42a763e175cc0aa92fb9398bcba1457f4120d7f0aba7c8c87f9b1024ea011d4", + "image": "ghcr.io/cortexlm/cortex/updater@sha256:e42a763e175cc0aa92fb9398bcba1457f4120d7f0aba7c8c87f9b1024ea011d4", "repository": "ghcr.io/cortexlm/cortex/updater" }, "validator": { - "digest": "sha256:1b95fe826688313d895cd7fe8e635f3e44f3a1bbcd7aa8b6664f23ba8973f9e5", - "image": "ghcr.io/cortexlm/cortex/validator@sha256:1b95fe826688313d895cd7fe8e635f3e44f3a1bbcd7aa8b6664f23ba8973f9e5", + "digest": "sha256:650bfe48be60fb0007992eb26ce3e908b14e43212b88da0c180c73f71e041bad", + "image": "ghcr.io/cortexlm/cortex/validator@sha256:650bfe48be60fb0007992eb26ce3e908b14e43212b88da0c180c73f71e041bad", "repository": "ghcr.io/cortexlm/cortex/validator" } }, - "updated_at": "2026-09-05T08:09:26Z" + "updated_at": "2026-09-09T16:08:05Z" }