@empire-builder-kit/nx 1.0.0-rc.47 → 1.0.0-rc.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (764) hide show
  1. package/README.md +14 -169
  2. package/executors.json +24 -79
  3. package/generators.json +8 -18
  4. package/package.json +13 -71
  5. package/src/aws/identity.d.ts +1 -1
  6. package/src/aws-authority/boundary-transforms.d.ts +9 -0
  7. package/src/aws-authority/boundary-transforms.js +78 -0
  8. package/src/aws-authority/contracts.d.ts +116 -0
  9. package/src/aws-authority/contracts.js +40 -0
  10. package/src/aws-authority/deployment-guardrails.d.ts +4 -0
  11. package/src/aws-authority/deployment-guardrails.js +543 -0
  12. package/src/aws-authority/deployment-policy-groups.d.ts +3 -0
  13. package/src/aws-authority/deployment-policy-groups.js +299 -0
  14. package/src/aws-authority/deployment-resources.d.ts +64 -0
  15. package/src/aws-authority/deployment-resources.js +265 -0
  16. package/src/aws-authority/deployment-services.d.ts +3 -0
  17. package/src/aws-authority/deployment-services.js +717 -0
  18. package/src/aws-authority/development-authority.d.ts +11 -0
  19. package/src/aws-authority/development-authority.js +160 -0
  20. package/src/aws-authority/guardrail-actions.d.ts +87 -0
  21. package/src/aws-authority/guardrail-actions.js +463 -0
  22. package/src/aws-authority/policy-document.d.ts +15 -0
  23. package/src/aws-authority/policy-document.js +264 -0
  24. package/src/aws-authority/runtime-boundary.d.ts +7 -0
  25. package/src/aws-authority/runtime-boundary.js +211 -0
  26. package/src/aws-authority/service-actions.d.ts +96 -0
  27. package/src/aws-authority/service-actions.js +512 -0
  28. package/src/aws-authority/stage-authority.d.ts +6 -272
  29. package/src/aws-authority/stage-authority.js +109 -3609
  30. package/src/aws-authority/stage-identity.d.ts +6 -0
  31. package/src/aws-authority/stage-identity.js +134 -0
  32. package/src/cli/bootstrap.d.ts +0 -20
  33. package/src/cli/bootstrap.js +2 -153
  34. package/src/cli/dev-command.d.ts +2 -4
  35. package/src/cli/dev-command.js +1 -19
  36. package/src/cli/main.d.ts +0 -4
  37. package/src/cli/main.js +22 -80
  38. package/src/cli/output.d.ts +2 -4
  39. package/src/cli/output.js +2 -8
  40. package/src/executors/deployment-plan/deployment-plan.d.ts +0 -2
  41. package/src/executors/deployment-plan/deployment-plan.js +3 -68
  42. package/src/executors/dev-doctor/dev-doctor.js +2 -2
  43. package/src/executors/local-deploy/deployed-smoke.d.ts +12 -0
  44. package/src/executors/local-deploy/deployed-smoke.js +115 -0
  45. package/src/executors/local-deploy/deployment-authority.d.ts +24 -0
  46. package/src/executors/local-deploy/deployment-authority.js +81 -0
  47. package/src/executors/local-deploy/deployment-child.d.ts +18 -0
  48. package/src/executors/local-deploy/deployment-child.js +77 -0
  49. package/src/executors/local-deploy/deployment-contracts.d.ts +96 -0
  50. package/src/executors/local-deploy/deployment-contracts.js +3 -0
  51. package/src/executors/local-deploy/deployment-projects.d.ts +4 -0
  52. package/src/executors/local-deploy/deployment-projects.js +16 -0
  53. package/src/executors/local-deploy/deployment-receipt.d.ts +4 -0
  54. package/src/executors/local-deploy/deployment-receipt.js +55 -0
  55. package/src/executors/local-deploy/deployment-scope.d.ts +17 -0
  56. package/src/executors/local-deploy/deployment-scope.js +239 -0
  57. package/src/executors/local-deploy/deployment-source.d.ts +13 -0
  58. package/src/executors/local-deploy/deployment-source.js +86 -0
  59. package/src/executors/local-deploy/local-deploy.d.ts +5 -121
  60. package/src/executors/local-deploy/local-deploy.js +55 -936
  61. package/src/executors/sst-lifecycle/governed-child-process.d.ts +27 -0
  62. package/src/executors/sst-lifecycle/governed-child-process.js +277 -0
  63. package/src/executors/sst-lifecycle/governed-native-operation.js +4 -10
  64. package/src/executors/sst-lifecycle/run-sst-command.d.ts +4 -85
  65. package/src/executors/sst-lifecycle/run-sst-command.js +28 -834
  66. package/src/executors/sst-lifecycle/sst-contracts.d.ts +44 -0
  67. package/src/executors/sst-lifecycle/sst-contracts.js +3 -0
  68. package/src/executors/sst-lifecycle/sst-invocation.d.ts +17 -0
  69. package/src/executors/sst-lifecycle/sst-invocation.js +502 -0
  70. package/src/executors/sst-lifecycle/task-unlock.js +3 -3
  71. package/src/foundation/discovery.d.ts +1 -5
  72. package/src/foundation/discovery.js +0 -2
  73. package/src/foundation/index.d.ts +0 -2
  74. package/src/foundation/index.js +0 -9
  75. package/src/foundation/local-private-smoke-access.d.ts +6 -15
  76. package/src/foundation/local-private-smoke-access.js +8 -192
  77. package/src/foundation/observability.d.ts +16 -26
  78. package/src/foundation/observability.js +34 -135
  79. package/src/foundation/preflight.js +0 -14
  80. package/src/foundation/private-smoke-access.d.ts +7 -14
  81. package/src/foundation/private-smoke-access.js +4 -126
  82. package/src/foundation/root-site-workspace.d.ts +35 -0
  83. package/src/foundation/root-site-workspace.js +80 -0
  84. package/src/foundation/root-site.d.ts +8 -7
  85. package/src/foundation/root-site.js +17 -9
  86. package/src/generators/formatting.js +5 -4
  87. package/src/generators/function/function.d.ts +9 -5
  88. package/src/generators/function/function.js +106 -136
  89. package/src/generators/function/schema.json +2 -2
  90. package/src/generators/function-access/function-access.d.ts +0 -6
  91. package/src/generators/function-access/function-access.js +41 -109
  92. package/src/generators/observability-policy.js +1 -2
  93. package/src/{supply-chain → generators}/pnpm-toolchain-authority.d.ts +3 -3
  94. package/src/{supply-chain → generators}/pnpm-toolchain-authority.js +12 -12
  95. package/src/generators/post-generation-install.d.ts +1 -8
  96. package/src/generators/post-generation-install.js +11 -139
  97. package/src/generators/preset/dependency-overrides.d.ts +13 -19
  98. package/src/generators/preset/dependency-overrides.js +12 -56
  99. package/src/generators/preset/generator.js +0 -3
  100. package/src/generators/preset/workspace-files-foundation-infra.d.ts +6 -0
  101. package/src/generators/preset/workspace-files-foundation-infra.js +586 -0
  102. package/src/generators/preset/workspace-files-foundation-readme.d.ts +5 -0
  103. package/src/generators/preset/workspace-files-foundation-readme.js +90 -0
  104. package/src/generators/preset/workspace-files-foundation.d.ts +3 -0
  105. package/src/generators/preset/workspace-files-foundation.js +170 -0
  106. package/src/generators/preset/workspace-files-ownership.d.ts +9 -0
  107. package/src/generators/preset/workspace-files-ownership.js +124 -0
  108. package/src/generators/preset/workspace-files-root-config.d.ts +32 -0
  109. package/src/generators/preset/workspace-files-root-config.js +356 -0
  110. package/src/generators/preset/workspace-files-root-docs.d.ts +5 -0
  111. package/src/generators/preset/workspace-files-root-docs.js +109 -0
  112. package/src/generators/preset/workspace-files-shared.d.ts +18 -0
  113. package/src/generators/preset/workspace-files-shared.js +7 -0
  114. package/src/generators/preset/workspace-files-workflows.d.ts +39 -0
  115. package/src/generators/preset/workspace-files-workflows.js +306 -0
  116. package/src/generators/preset/workspace-files-workspace-health.d.ts +6 -0
  117. package/src/generators/preset/workspace-files-workspace-health.js +148 -0
  118. package/src/generators/preset/workspace-files.d.ts +10 -24
  119. package/src/generators/preset/workspace-files.js +48 -10705
  120. package/src/generators/site/built-in-site-documentation-files.d.ts +2 -1
  121. package/src/generators/site/built-in-site-documentation-files.js +15 -56
  122. package/src/generators/site/built-in-site-files.d.ts +4 -1
  123. package/src/generators/site/built-in-site-files.js +12 -11
  124. package/src/generators/site/built-in-site-infrastructure-files.d.ts +2 -1
  125. package/src/generators/site/built-in-site-infrastructure-files.js +46 -206
  126. package/src/generators/site/built-in-site-plan.d.ts +5 -1
  127. package/src/generators/site/built-in-site-plan.js +7 -5
  128. package/src/generators/site/built-in-site-project-files.d.ts +10 -2
  129. package/src/generators/site/built-in-site-project-files.js +131 -177
  130. package/src/generators/site/built-in-site-script-files.d.ts +2 -0
  131. package/src/generators/site/built-in-site-script-files.js +76 -280
  132. package/src/generators/site/built-in-site-shared.d.ts +64 -4
  133. package/src/generators/site/built-in-site-shared.js +307 -14
  134. package/src/generators/site/built-in-site-sst-config-files.d.ts +2 -1
  135. package/src/generators/site/built-in-site-sst-config-files.js +90 -22
  136. package/src/generators/site/built-in-site-web-files.d.ts +2 -1
  137. package/src/generators/site/built-in-site-web-files.js +19 -225
  138. package/src/generators/site/schema.d.ts +5 -0
  139. package/src/generators/site/schema.json +6 -0
  140. package/src/generators/site/site.d.ts +0 -8
  141. package/src/generators/site/site.js +17 -85
  142. package/src/generators/slice/built-in-plan-api-files.d.ts +1 -2
  143. package/src/generators/slice/built-in-plan-api-files.js +30 -890
  144. package/src/generators/slice/built-in-plan-database-lifecycle-files.js +57 -1851
  145. package/src/generators/slice/built-in-plan-infrastructure-files.d.ts +5 -2
  146. package/src/generators/slice/built-in-plan-infrastructure-files.js +80 -3272
  147. package/src/generators/slice/built-in-plan-key-value-files.d.ts +3 -2
  148. package/src/generators/slice/built-in-plan-key-value-files.js +3 -21
  149. package/src/generators/slice/built-in-plan-project-files.d.ts +5 -3
  150. package/src/generators/slice/built-in-plan-project-files.js +79 -897
  151. package/src/generators/slice/built-in-plan-shared.d.ts +3 -18
  152. package/src/generators/slice/built-in-plan-shared.js +4 -57
  153. package/src/generators/slice/built-in-plan-web-files.d.ts +1 -1
  154. package/src/generators/slice/built-in-plan-web-files.js +14 -540
  155. package/src/generators/slice/built-in-plan.d.ts +2 -3
  156. package/src/generators/slice/built-in-plan.js +79 -277
  157. package/src/{developer-agent/preview-changes.d.ts → generators/slice/generation-tree.d.ts} +1 -5
  158. package/src/generators/slice/generation-tree.js +161 -0
  159. package/src/generators/slice/schema.json +12 -4
  160. package/src/generators/slice/slice-config.d.ts +7 -0
  161. package/src/generators/slice/slice-config.js +125 -0
  162. package/src/generators/slice/slice.js +29 -261
  163. package/src/generators/slice/sql-bootstrap.d.ts +1 -0
  164. package/src/generators/slice/sql-bootstrap.js +505 -0
  165. package/src/generators/slice/sql-client.d.ts +1 -0
  166. package/src/generators/slice/sql-client.js +107 -0
  167. package/src/generators/slice/sql-infrastructure.d.ts +1 -0
  168. package/src/generators/slice/sql-infrastructure.js +225 -0
  169. package/src/generators/slice/sql-logging.d.ts +1 -0
  170. package/src/generators/slice/sql-logging.js +266 -0
  171. package/src/generators/slice/sql-migration.d.ts +2 -0
  172. package/src/generators/slice/sql-migration.js +202 -0
  173. package/src/generators/slice/standard-slice-contract.d.ts +25 -0
  174. package/src/generators/slice/standard-slice-contract.js +64 -0
  175. package/src/generators/sql/schema.json +1 -1
  176. package/src/generators/sql/sql.d.ts +1 -1
  177. package/src/generators/sql/sql.js +13 -7
  178. package/src/generators/upgrade/framework-package-upgrade.d.ts +4 -27
  179. package/src/generators/upgrade/framework-package-upgrade.js +16 -39
  180. package/src/generators/upgrade/framework-packages.d.ts +25 -0
  181. package/src/generators/upgrade/framework-packages.js +138 -0
  182. package/src/generators/upgrade/function-authentication-notice.d.ts +10 -18
  183. package/src/generators/upgrade/function-authentication-notice.js +24 -44
  184. package/src/generators/upgrade/schema.d.ts +0 -3
  185. package/src/generators/upgrade/schema.json +6 -16
  186. package/src/generators/upgrade/slice-compositions.d.ts +20 -0
  187. package/src/generators/upgrade/slice-compositions.js +100 -0
  188. package/src/generators/upgrade/slice-upgrade-guidance.d.ts +19 -0
  189. package/src/generators/upgrade/slice-upgrade-guidance.js +50 -0
  190. package/src/generators/upgrade/slice-upgrade.d.ts +4 -0
  191. package/src/generators/upgrade/slice-upgrade.js +231 -0
  192. package/src/generators/upgrade/upgrade-plan.d.ts +10 -13
  193. package/src/generators/upgrade/upgrade-plan.js +33 -197
  194. package/src/generators/upgrade/upgrade-preflight.d.ts +20 -0
  195. package/src/generators/upgrade/upgrade-preflight.js +64 -0
  196. package/src/generators/upgrade/upgrade.d.ts +8 -53
  197. package/src/generators/upgrade/upgrade.js +23 -1571
  198. package/src/generators/workload/schema.json +2 -2
  199. package/src/generators/workload/workload.d.ts +11 -11
  200. package/src/generators/workload/workload.js +166 -1255
  201. package/src/index.d.ts +0 -5
  202. package/src/index.js +0 -5
  203. package/src/local-dev/browser-verification.d.ts +0 -7
  204. package/src/local-dev/browser-verification.js +0 -136
  205. package/src/local-dev/contracts.d.ts +6 -0
  206. package/src/local-dev/contracts.js +17 -9
  207. package/src/local-dev/environment-checks.d.ts +126 -0
  208. package/src/local-dev/environment-checks.js +81 -0
  209. package/src/local-dev/environment-inspector.d.ts +3 -124
  210. package/src/local-dev/environment-inspector.js +9 -148
  211. package/src/local-dev/private-state.d.ts +1 -0
  212. package/src/local-dev/private-state.js +19 -23
  213. package/src/local-dev/process-identity.js +4 -2
  214. package/src/local-dev/slice-runner-child.d.ts +37 -0
  215. package/src/local-dev/slice-runner-child.js +127 -0
  216. package/src/local-dev/slice-runner-recovery.d.ts +32 -0
  217. package/src/local-dev/slice-runner-recovery.js +216 -0
  218. package/src/local-dev/slice-runner-state.d.ts +82 -0
  219. package/src/local-dev/slice-runner-state.js +265 -0
  220. package/src/local-dev/slice-runner.d.ts +4 -117
  221. package/src/local-dev/slice-runner.js +59 -594
  222. package/src/local-dev/tls.js +8 -97
  223. package/src/ownership/index.d.ts +1 -0
  224. package/src/ownership/index.js +6 -0
  225. package/src/ownership/pnpm-workspace.d.ts +77 -0
  226. package/src/ownership/pnpm-workspace.js +225 -0
  227. package/src/ownership/site-record.d.ts +8 -0
  228. package/src/ownership/site-record.js +17 -2
  229. package/src/repository-policy/capacity-migration.d.ts +1 -1
  230. package/src/repository-policy/capacity-migration.js +1 -1
  231. package/src/repository-policy/foundation-router.d.ts +17 -0
  232. package/src/repository-policy/foundation-router.js +44 -0
  233. package/src/repository-policy/index.d.ts +2 -0
  234. package/src/repository-policy/index.js +2 -0
  235. package/src/repository-policy/policy-accounts.d.ts +22 -0
  236. package/src/repository-policy/policy-accounts.js +134 -0
  237. package/src/repository-policy/policy-files.d.ts +8 -0
  238. package/src/repository-policy/policy-files.js +201 -0
  239. package/src/repository-policy/policy-internal.d.ts +2 -0
  240. package/src/repository-policy/policy-internal.js +11 -0
  241. package/src/repository-policy/policy-model.d.ts +95 -0
  242. package/src/repository-policy/policy-model.js +42 -0
  243. package/src/repository-policy/policy-validation.d.ts +4 -0
  244. package/src/repository-policy/policy-validation.js +308 -0
  245. package/src/repository-policy/policy.d.ts +5 -120
  246. package/src/repository-policy/policy.js +34 -662
  247. package/src/repository-policy/public-dns.d.ts +4 -0
  248. package/src/repository-policy/public-dns.js +102 -5
  249. package/src/{generators/repository-policy → repository-policy}/tree-policy.d.ts +1 -1
  250. package/src/{generators/repository-policy → repository-policy}/tree-policy.js +5 -5
  251. package/src/schemas/repository-policy-v1.json +40 -3
  252. package/src/secrets/index.d.ts +0 -5
  253. package/src/secrets/index.js +0 -5
  254. package/src/slice-infra/index.d.ts +57 -0
  255. package/src/slice-infra/index.js +117 -0
  256. package/src/slice-scripts/build.d.ts +27 -0
  257. package/src/slice-scripts/build.js +120 -0
  258. package/src/slice-scripts/database.d.ts +87 -0
  259. package/src/slice-scripts/database.js +328 -0
  260. package/src/slice-scripts/index.d.ts +11 -0
  261. package/src/slice-scripts/index.js +23 -0
  262. package/src/slice-scripts/root-site-routes.d.ts +11 -0
  263. package/src/slice-scripts/root-site-routes.js +83 -0
  264. package/src/slice-scripts/sql-migration-engine.mjs +180 -0
  265. package/src/workload-roles/effective-policy.d.ts +0 -37
  266. package/src/workload-roles/effective-policy.js +1 -174
  267. package/src/workload-roles/standard-slice.d.ts +2 -19
  268. package/src/workload-roles/standard-slice.js +3 -129
  269. package/src/api-contract/baseline-update.d.ts +0 -82
  270. package/src/api-contract/baseline-update.js +0 -225
  271. package/src/api-contract/compatibility.d.ts +0 -30
  272. package/src/api-contract/compatibility.js +0 -643
  273. package/src/api-contract/contract-graph.d.ts +0 -35
  274. package/src/api-contract/contract-graph.js +0 -141
  275. package/src/api-contract/evidence.d.ts +0 -23
  276. package/src/api-contract/evidence.js +0 -87
  277. package/src/api-contract/index.d.ts +0 -6
  278. package/src/api-contract/index.js +0 -10
  279. package/src/api-contract/model.d.ts +0 -144
  280. package/src/api-contract/model.js +0 -993
  281. package/src/api-contract/rollout.d.ts +0 -32
  282. package/src/api-contract/rollout.js +0 -88
  283. package/src/authorization/compatibility.d.ts +0 -62
  284. package/src/authorization/compatibility.js +0 -175
  285. package/src/authorization/index.d.ts +0 -1
  286. package/src/authorization/index.js +0 -5
  287. package/src/blueprints/execution.d.ts +0 -55
  288. package/src/blueprints/execution.js +0 -329
  289. package/src/blueprints/external-sandbox.d.ts +0 -53
  290. package/src/blueprints/external-sandbox.js +0 -1194
  291. package/src/blueprints/index.d.ts +0 -5
  292. package/src/blueprints/index.js +0 -9
  293. package/src/blueprints/inputs.d.ts +0 -43
  294. package/src/blueprints/inputs.js +0 -103
  295. package/src/blueprints/manifest.d.ts +0 -281
  296. package/src/blueprints/manifest.js +0 -424
  297. package/src/blueprints/resolver.d.ts +0 -37
  298. package/src/blueprints/resolver.js +0 -387
  299. package/src/blueprints/transitions.d.ts +0 -20
  300. package/src/blueprints/transitions.js +0 -61
  301. package/src/cli/agent-command.d.ts +0 -30
  302. package/src/cli/agent-command.js +0 -204
  303. package/src/cli/agent-runtime.d.ts +0 -25
  304. package/src/cli/agent-runtime.js +0 -498
  305. package/src/cli/blueprint-authority.d.ts +0 -9
  306. package/src/cli/blueprint-authority.js +0 -43
  307. package/src/cli/blueprint-command.d.ts +0 -24
  308. package/src/cli/blueprint-command.js +0 -63
  309. package/src/data-lifecycle/index.d.ts +0 -3
  310. package/src/data-lifecycle/index.js +0 -7
  311. package/src/data-lifecycle/model.d.ts +0 -172
  312. package/src/data-lifecycle/model.js +0 -95
  313. package/src/data-lifecycle/sensitive-artifacts.d.ts +0 -28
  314. package/src/data-lifecycle/sensitive-artifacts.js +0 -146
  315. package/src/data-lifecycle/validation.d.ts +0 -32
  316. package/src/data-lifecycle/validation.js +0 -837
  317. package/src/database-retirement/contract.d.ts +0 -68
  318. package/src/database-retirement/contract.js +0 -166
  319. package/src/database-retirement/index.d.ts +0 -1
  320. package/src/database-retirement/index.js +0 -5
  321. package/src/developer-agent/context.d.ts +0 -57
  322. package/src/developer-agent/context.js +0 -662
  323. package/src/developer-agent/generator-planning.d.ts +0 -34
  324. package/src/developer-agent/generator-planning.js +0 -759
  325. package/src/developer-agent/generator-preview.d.ts +0 -8
  326. package/src/developer-agent/generator-preview.js +0 -650
  327. package/src/developer-agent/git-inspection.d.ts +0 -112
  328. package/src/developer-agent/git-inspection.js +0 -887
  329. package/src/developer-agent/handoff.d.ts +0 -43
  330. package/src/developer-agent/handoff.js +0 -713
  331. package/src/developer-agent/index.d.ts +0 -10
  332. package/src/developer-agent/index.js +0 -14
  333. package/src/developer-agent/model.d.ts +0 -497
  334. package/src/developer-agent/model.js +0 -144
  335. package/src/developer-agent/operation-registry.d.ts +0 -61
  336. package/src/developer-agent/operation-registry.js +0 -1591
  337. package/src/developer-agent/ordering.d.ts +0 -9
  338. package/src/developer-agent/ordering.js +0 -15
  339. package/src/developer-agent/planning.d.ts +0 -25
  340. package/src/developer-agent/planning.js +0 -481
  341. package/src/developer-agent/preview-changes.js +0 -225
  342. package/src/developer-agent/preview-source.d.ts +0 -2
  343. package/src/developer-agent/preview-source.js +0 -19
  344. package/src/developer-agent/validation.d.ts +0 -30
  345. package/src/developer-agent/validation.js +0 -2729
  346. package/src/developer-agent/workspace-inspection.d.ts +0 -20
  347. package/src/developer-agent/workspace-inspection.js +0 -1236
  348. package/src/developer-agent/workspace-path.d.ts +0 -6
  349. package/src/developer-agent/workspace-path.js +0 -22
  350. package/src/executors/blueprint-trust/blueprint-trust.d.ts +0 -29
  351. package/src/executors/blueprint-trust/blueprint-trust.js +0 -121
  352. package/src/executors/blueprint-trust/schema.json +0 -27
  353. package/src/executors/blueprint-verification/blueprint-verification.d.ts +0 -13
  354. package/src/executors/blueprint-verification/blueprint-verification.js +0 -110
  355. package/src/executors/blueprint-verification/schema.json +0 -44
  356. package/src/executors/developer-context/developer-context.d.ts +0 -38
  357. package/src/executors/developer-context/developer-context.js +0 -78
  358. package/src/executors/developer-context/schema.json +0 -87
  359. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +0 -19
  360. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +0 -105
  361. package/src/executors/foundation-profile-preflight/schema.json +0 -32
  362. package/src/executors/github-bootstrap/github-bootstrap.d.ts +0 -13
  363. package/src/executors/github-bootstrap/github-bootstrap.js +0 -62
  364. package/src/executors/github-bootstrap/schema.json +0 -50
  365. package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +0 -37
  366. package/src/executors/infrastructure-plan/infrastructure-plan.js +0 -275
  367. package/src/executors/infrastructure-plan/schema.json +0 -38
  368. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +0 -42
  369. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +0 -1229
  370. package/src/executors/router-waf-rehearsal/schema.json +0 -29
  371. package/src/executors/secret-guardrails/schema.json +0 -6
  372. package/src/executors/secret-guardrails/secret-guardrails.d.ts +0 -3
  373. package/src/executors/secret-guardrails/secret-guardrails.js +0 -44
  374. package/src/executors/secret-initialize/schema.json +0 -42
  375. package/src/executors/secret-initialize/secret-initialize.d.ts +0 -34
  376. package/src/executors/secret-initialize/secret-initialize.js +0 -297
  377. package/src/executors/secret-metadata/schema.json +0 -36
  378. package/src/executors/secret-metadata/secret-metadata.d.ts +0 -46
  379. package/src/executors/secret-metadata/secret-metadata.js +0 -230
  380. package/src/executors/sst-lifecycle/generated-secret-retirement.d.ts +0 -53
  381. package/src/executors/sst-lifecycle/generated-secret-retirement.js +0 -192
  382. package/src/executors/sst-lifecycle/logging-preflight.d.ts +0 -22
  383. package/src/executors/sst-lifecycle/logging-preflight.js +0 -217
  384. package/src/executors/sst-lifecycle/secret-preflight.d.ts +0 -27
  385. package/src/executors/sst-lifecycle/secret-preflight.js +0 -125
  386. package/src/executors/work-markers/schema.json +0 -14
  387. package/src/executors/work-markers/work-markers.d.ts +0 -6
  388. package/src/executors/work-markers/work-markers.js +0 -20
  389. package/src/foundation/cost-estimate.d.ts +0 -175
  390. package/src/foundation/cost-estimate.js +0 -706
  391. package/src/foundation/private-smoke-admission.d.ts +0 -45
  392. package/src/foundation/private-smoke-admission.js +0 -180
  393. package/src/foundation/private-smoke-control-plane.d.ts +0 -18
  394. package/src/foundation/private-smoke-control-plane.js +0 -184
  395. package/src/foundation/root-site-readiness.d.ts +0 -27
  396. package/src/foundation/root-site-readiness.js +0 -78
  397. package/src/foundation/router-waf-rate-rehearsal.d.ts +0 -97
  398. package/src/foundation/router-waf-rate-rehearsal.js +0 -210
  399. package/src/foundation/router-waf.d.ts +0 -149
  400. package/src/foundation/router-waf.js +0 -809
  401. package/src/frontend-security/index.d.ts +0 -1
  402. package/src/frontend-security/index.js +0 -5
  403. package/src/frontend-security/security-headers.d.ts +0 -50
  404. package/src/frontend-security/security-headers.js +0 -418
  405. package/src/generators/blueprint/blueprint.d.ts +0 -5
  406. package/src/generators/blueprint/blueprint.js +0 -102
  407. package/src/generators/blueprint/files.d.ts +0 -6
  408. package/src/generators/blueprint/files.js +0 -217
  409. package/src/generators/blueprint/schema.d.ts +0 -4
  410. package/src/generators/blueprint/schema.json +0 -18
  411. package/src/generators/feature-registry.d.ts +0 -13
  412. package/src/generators/feature-registry.js +0 -73
  413. package/src/generators/function/function-registration.d.ts +0 -24
  414. package/src/generators/function/function-registration.js +0 -66
  415. package/src/generators/observability-infrastructure.d.ts +0 -2
  416. package/src/generators/observability-infrastructure.js +0 -31
  417. package/src/generators/preset/workspace-files-adopter-skills.d.ts +0 -7
  418. package/src/generators/preset/workspace-files-adopter-skills.js +0 -359
  419. package/src/generators/preset/workspace-files-agent-development.d.ts +0 -9
  420. package/src/generators/preset/workspace-files-agent-development.js +0 -42
  421. package/src/generators/preset/workspace-files-ci-acceptance.d.ts +0 -1
  422. package/src/generators/preset/workspace-files-ci-acceptance.js +0 -791
  423. package/src/generators/preset/workspace-files-ci-install.d.ts +0 -2
  424. package/src/generators/preset/workspace-files-ci-install.js +0 -196
  425. package/src/generators/preset/workspace-files-developer-agent.d.ts +0 -16
  426. package/src/generators/preset/workspace-files-developer-agent.js +0 -644
  427. package/src/generators/preset/workspace-files-ecr-inspector.d.ts +0 -18
  428. package/src/generators/preset/workspace-files-ecr-inspector.js +0 -298
  429. package/src/generators/preset/workspace-files-foundation-workload-roles.d.ts +0 -6
  430. package/src/generators/preset/workspace-files-foundation-workload-roles.js +0 -409
  431. package/src/generators/preset/workspace-files-performance-cost.d.ts +0 -66
  432. package/src/generators/preset/workspace-files-performance-cost.js +0 -866
  433. package/src/generators/preset/workspace-files-performance-load.d.ts +0 -73
  434. package/src/generators/preset/workspace-files-performance-load.js +0 -815
  435. package/src/generators/preset/workspace-files-shared-operation-claims.d.ts +0 -10
  436. package/src/generators/preset/workspace-files-shared-operation-claims.js +0 -59
  437. package/src/generators/preset/workspace-files-stage-authority.d.ts +0 -6
  438. package/src/generators/preset/workspace-files-stage-authority.js +0 -586
  439. package/src/generators/preset/workspace-files-thin-deploy.d.ts +0 -76
  440. package/src/generators/preset/workspace-files-thin-deploy.js +0 -2563
  441. package/src/generators/preset/workspace-files-thin-docs.d.ts +0 -7
  442. package/src/generators/preset/workspace-files-thin-docs.js +0 -386
  443. package/src/generators/preset/workspace-files-thin-release.d.ts +0 -14
  444. package/src/generators/preset/workspace-files-thin-release.js +0 -26
  445. package/src/generators/preset/workspace-files-workload-role-baseline.d.ts +0 -9
  446. package/src/generators/preset/workspace-files-workload-role-baseline.js +0 -1314
  447. package/src/generators/repository-policy/repository-policy.d.ts +0 -4
  448. package/src/generators/repository-policy/repository-policy.js +0 -294
  449. package/src/generators/repository-policy/schema.d.ts +0 -30
  450. package/src/generators/repository-policy/schema.json +0 -127
  451. package/src/generators/site/built-in-site-smoke-files.d.ts +0 -2
  452. package/src/generators/site/built-in-site-smoke-files.js +0 -37
  453. package/src/generators/slice/built-in-plan-alarm-identity.d.ts +0 -182
  454. package/src/generators/slice/built-in-plan-alarm-identity.js +0 -209
  455. package/src/generators/slice/built-in-plan-api-contract-files.d.ts +0 -2
  456. package/src/generators/slice/built-in-plan-api-contract-files.js +0 -2848
  457. package/src/generators/slice/built-in-plan-async-work-files.d.ts +0 -2
  458. package/src/generators/slice/built-in-plan-async-work-files.js +0 -6118
  459. package/src/generators/slice/built-in-plan-authorization-files.d.ts +0 -2
  460. package/src/generators/slice/built-in-plan-authorization-files.js +0 -2082
  461. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.d.ts +0 -2
  462. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +0 -1301
  463. package/src/generators/slice/built-in-plan-authorization-storage.d.ts +0 -3
  464. package/src/generators/slice/built-in-plan-authorization-storage.js +0 -119
  465. package/src/generators/slice/built-in-plan-background-work-files.d.ts +0 -2
  466. package/src/generators/slice/built-in-plan-background-work-files.js +0 -99
  467. package/src/generators/slice/built-in-plan-data-deletion-files.d.ts +0 -2
  468. package/src/generators/slice/built-in-plan-data-deletion-files.js +0 -273
  469. package/src/generators/slice/built-in-plan-data-export-infrastructure-files.d.ts +0 -2
  470. package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js +0 -223
  471. package/src/generators/slice/built-in-plan-data-files.d.ts +0 -2
  472. package/src/generators/slice/built-in-plan-data-files.js +0 -618
  473. package/src/generators/slice/built-in-plan-data-lifecycle-files.d.ts +0 -2
  474. package/src/generators/slice/built-in-plan-data-lifecycle-files.js +0 -775
  475. package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.d.ts +0 -2
  476. package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js +0 -863
  477. package/src/generators/slice/built-in-plan-data-retention-job-files.d.ts +0 -2
  478. package/src/generators/slice/built-in-plan-data-retention-job-files.js +0 -169
  479. package/src/generators/slice/built-in-plan-data-retention-launcher-files.d.ts +0 -2
  480. package/src/generators/slice/built-in-plan-data-retention-launcher-files.js +0 -186
  481. package/src/generators/slice/built-in-plan-data-rights-files.d.ts +0 -2
  482. package/src/generators/slice/built-in-plan-data-rights-files.js +0 -152
  483. package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.d.ts +0 -2
  484. package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.js +0 -508
  485. package/src/generators/slice/built-in-plan-event-contract-literal.d.ts +0 -6
  486. package/src/generators/slice/built-in-plan-event-contract-literal.js +0 -52
  487. package/src/generators/slice/built-in-plan-foundation-files.d.ts +0 -15
  488. package/src/generators/slice/built-in-plan-foundation-files.js +0 -314
  489. package/src/generators/slice/built-in-plan-frontend-files.d.ts +0 -2
  490. package/src/generators/slice/built-in-plan-frontend-files.js +0 -1975
  491. package/src/generators/slice/built-in-plan-frontend-header-proof.d.ts +0 -6
  492. package/src/generators/slice/built-in-plan-frontend-header-proof.js +0 -282
  493. package/src/generators/slice/built-in-plan-infrastructure-safety-files.d.ts +0 -2
  494. package/src/generators/slice/built-in-plan-infrastructure-safety-files.js +0 -373
  495. package/src/generators/slice/built-in-plan-key-value-cleanup.d.ts +0 -4
  496. package/src/generators/slice/built-in-plan-key-value-cleanup.js +0 -101
  497. package/src/generators/slice/built-in-plan-key-value-consumer.d.ts +0 -4
  498. package/src/generators/slice/built-in-plan-key-value-consumer.js +0 -151
  499. package/src/generators/slice/built-in-plan-key-value-deletion.d.ts +0 -2
  500. package/src/generators/slice/built-in-plan-key-value-deletion.js +0 -377
  501. package/src/generators/slice/built-in-plan-key-value-delivery.d.ts +0 -2
  502. package/src/generators/slice/built-in-plan-key-value-delivery.js +0 -137
  503. package/src/generators/slice/built-in-plan-key-value-export.d.ts +0 -2
  504. package/src/generators/slice/built-in-plan-key-value-export.js +0 -595
  505. package/src/generators/slice/built-in-plan-key-value-holds.d.ts +0 -2
  506. package/src/generators/slice/built-in-plan-key-value-holds.js +0 -189
  507. package/src/generators/slice/built-in-plan-key-value-infrastructure.d.ts +0 -2
  508. package/src/generators/slice/built-in-plan-key-value-infrastructure.js +0 -102
  509. package/src/generators/slice/built-in-plan-key-value-performance.d.ts +0 -5
  510. package/src/generators/slice/built-in-plan-key-value-performance.js +0 -530
  511. package/src/generators/slice/built-in-plan-key-value-provider.d.ts +0 -4
  512. package/src/generators/slice/built-in-plan-key-value-provider.js +0 -366
  513. package/src/generators/slice/built-in-plan-key-value-records.d.ts +0 -3
  514. package/src/generators/slice/built-in-plan-key-value-records.js +0 -232
  515. package/src/generators/slice/built-in-plan-key-value-retention-infrastructure.d.ts +0 -2
  516. package/src/generators/slice/built-in-plan-key-value-retention-infrastructure.js +0 -103
  517. package/src/generators/slice/built-in-plan-key-value-retention-job-files.d.ts +0 -2
  518. package/src/generators/slice/built-in-plan-key-value-retention-job-files.js +0 -160
  519. package/src/generators/slice/built-in-plan-key-value-retention-maintenance.d.ts +0 -2
  520. package/src/generators/slice/built-in-plan-key-value-retention-maintenance.js +0 -329
  521. package/src/generators/slice/built-in-plan-key-value-retention-worker.d.ts +0 -2
  522. package/src/generators/slice/built-in-plan-key-value-retention-worker.js +0 -477
  523. package/src/generators/slice/built-in-plan-key-value-retention.d.ts +0 -2
  524. package/src/generators/slice/built-in-plan-key-value-retention.js +0 -184
  525. package/src/generators/slice/built-in-plan-log-group-helpers.d.ts +0 -29
  526. package/src/generators/slice/built-in-plan-log-group-helpers.js +0 -130
  527. package/src/generators/slice/built-in-plan-metadata-files.d.ts +0 -3
  528. package/src/generators/slice/built-in-plan-metadata-files.js +0 -401
  529. package/src/generators/slice/built-in-plan-native-runtime-authority-files.d.ts +0 -2
  530. package/src/generators/slice/built-in-plan-native-runtime-authority-files.js +0 -324
  531. package/src/generators/slice/built-in-plan-next-build-authority.d.ts +0 -5
  532. package/src/generators/slice/built-in-plan-next-build-authority.js +0 -124
  533. package/src/generators/slice/built-in-plan-operations-files.d.ts +0 -8
  534. package/src/generators/slice/built-in-plan-operations-files.js +0 -1106
  535. package/src/generators/slice/built-in-plan-performance-files.d.ts +0 -4
  536. package/src/generators/slice/built-in-plan-performance-files.js +0 -2444
  537. package/src/generators/slice/built-in-plan-release-files.d.ts +0 -2
  538. package/src/generators/slice/built-in-plan-release-files.js +0 -6585
  539. package/src/generators/slice/built-in-plan-reliability-files.d.ts +0 -2
  540. package/src/generators/slice/built-in-plan-reliability-files.js +0 -4728
  541. package/src/generators/slice/built-in-plan-secret-runtime-files.d.ts +0 -2
  542. package/src/generators/slice/built-in-plan-secret-runtime-files.js +0 -1015
  543. package/src/generators/slice/built-in-plan-sql-events.d.ts +0 -2
  544. package/src/generators/slice/built-in-plan-sql-events.js +0 -276
  545. package/src/generators/slice/built-in-plan-testing-files.d.ts +0 -2
  546. package/src/generators/slice/built-in-plan-testing-files.js +0 -2618
  547. package/src/generators/slice/built-in-plan-testing-persistence-event-files.d.ts +0 -7
  548. package/src/generators/slice/built-in-plan-testing-persistence-event-files.js +0 -487
  549. package/src/generators/slice/built-in-plan-testing-persistence-files.d.ts +0 -2
  550. package/src/generators/slice/built-in-plan-testing-persistence-files.js +0 -180
  551. package/src/generators/slice/built-in-plan-thin-release-files.d.ts +0 -11
  552. package/src/generators/slice/built-in-plan-thin-release-files.js +0 -162
  553. package/src/generators/slice/built-in-plan-verification-files.d.ts +0 -2
  554. package/src/generators/slice/built-in-plan-verification-files.js +0 -442
  555. package/src/generators/slice/built-in-plan-workload-role-files.d.ts +0 -2
  556. package/src/generators/slice/built-in-plan-workload-role-files.js +0 -2220
  557. package/src/generators/slice/data-policy-review-seed.d.ts +0 -2
  558. package/src/generators/slice/data-policy-review-seed.js +0 -22
  559. package/src/generators/slice/deployed-smoke-diagnostics.d.ts +0 -35
  560. package/src/generators/slice/deployed-smoke-diagnostics.js +0 -189
  561. package/src/generators/slice/deployed-smoke-readiness.d.ts +0 -9
  562. package/src/generators/slice/deployed-smoke-readiness.js +0 -309
  563. package/src/generators/slice/local-source-identity.d.ts +0 -2
  564. package/src/generators/slice/local-source-identity.js +0 -31
  565. package/src/generators/slice/pnpm-launch-script.d.ts +0 -13
  566. package/src/generators/slice/pnpm-launch-script.js +0 -28
  567. package/src/generators/upgrade/custom-domain-notice.d.ts +0 -19
  568. package/src/generators/upgrade/custom-domain-notice.js +0 -38
  569. package/src/generators/upgrade/external-blueprint-compositions.d.ts +0 -84
  570. package/src/generators/upgrade/external-blueprint-compositions.js +0 -478
  571. package/src/generators/upgrade/sql-seeded-reconciliation.d.ts +0 -2
  572. package/src/generators/upgrade/sql-seeded-reconciliation.js +0 -170
  573. package/src/generators/workload/performance-registration.d.ts +0 -33
  574. package/src/generators/workload/performance-registration.js +0 -224
  575. package/src/generators/workload/reliability-registration.d.ts +0 -16
  576. package/src/generators/workload/reliability-registration.js +0 -150
  577. package/src/generators/workload/service-performance-files.d.ts +0 -5
  578. package/src/generators/workload/service-performance-files.js +0 -1883
  579. package/src/git-policy/action-pins.d.ts +0 -43
  580. package/src/git-policy/action-pins.js +0 -50
  581. package/src/git-policy/github-bootstrap.d.ts +0 -95
  582. package/src/git-policy/github-bootstrap.js +0 -1250
  583. package/src/git-policy/index.d.ts +0 -3
  584. package/src/git-policy/index.js +0 -7
  585. package/src/git-policy/routing.d.ts +0 -21
  586. package/src/git-policy/routing.js +0 -138
  587. package/src/infrastructure-change/convergence.d.ts +0 -13
  588. package/src/infrastructure-change/convergence.js +0 -85
  589. package/src/infrastructure-change/drift.d.ts +0 -13
  590. package/src/infrastructure-change/drift.js +0 -112
  591. package/src/infrastructure-change/index.d.ts +0 -7
  592. package/src/infrastructure-change/index.js +0 -11
  593. package/src/infrastructure-change/local-capability.d.ts +0 -73
  594. package/src/infrastructure-change/local-capability.js +0 -114
  595. package/src/infrastructure-change/model.d.ts +0 -274
  596. package/src/infrastructure-change/model.js +0 -29
  597. package/src/infrastructure-change/normalize.d.ts +0 -16
  598. package/src/infrastructure-change/normalize.js +0 -285
  599. package/src/infrastructure-change/plan.d.ts +0 -67
  600. package/src/infrastructure-change/plan.js +0 -671
  601. package/src/infrastructure-change/risk.d.ts +0 -9
  602. package/src/infrastructure-change/risk.js +0 -349
  603. package/src/infrastructure-change/summary.d.ts +0 -20
  604. package/src/infrastructure-change/summary.js +0 -130
  605. package/src/performance/cost-collection.d.ts +0 -225
  606. package/src/performance/cost-collection.js +0 -827
  607. package/src/performance/cost-controls.d.ts +0 -135
  608. package/src/performance/cost-controls.js +0 -347
  609. package/src/performance/evidence.d.ts +0 -140
  610. package/src/performance/evidence.js +0 -601
  611. package/src/performance/index.d.ts +0 -10
  612. package/src/performance/index.js +0 -14
  613. package/src/performance/load-safety.d.ts +0 -84
  614. package/src/performance/load-safety.js +0 -348
  615. package/src/performance/model.d.ts +0 -129
  616. package/src/performance/model.js +0 -451
  617. package/src/performance/pr-artifact-budget.d.ts +0 -42
  618. package/src/performance/pr-artifact-budget.js +0 -151
  619. package/src/performance/runner.d.ts +0 -75
  620. package/src/performance/runner.js +0 -227
  621. package/src/performance/scenario-endpoint.d.ts +0 -1
  622. package/src/performance/scenario-endpoint.js +0 -5
  623. package/src/performance/scenario.d.ts +0 -215
  624. package/src/performance/scenario.js +0 -744
  625. package/src/performance/unit-cost.d.ts +0 -105
  626. package/src/performance/unit-cost.js +0 -364
  627. package/src/release/index.d.ts +0 -2
  628. package/src/release/index.js +0 -6
  629. package/src/release/lifecycle.d.ts +0 -132
  630. package/src/release/lifecycle.js +0 -411
  631. package/src/release/manifest.d.ts +0 -148
  632. package/src/release/manifest.js +0 -503
  633. package/src/release/rollout.d.ts +0 -170
  634. package/src/release/rollout.js +0 -578
  635. package/src/release/source-authority.d.ts +0 -19
  636. package/src/release/source-authority.js +0 -212
  637. package/src/schemas/aggregate-count-evidence-v1.json +0 -135
  638. package/src/schemas/api-contract-baseline-v1.json +0 -674
  639. package/src/schemas/api-contract-compatibility-report-v1.json +0 -126
  640. package/src/schemas/aws-billing-actual-evidence-v1.json +0 -407
  641. package/src/schemas/blueprint-input-schema-v1.json +0 -23
  642. package/src/schemas/blueprint-v1.json +0 -188
  643. package/src/schemas/data-lifecycle-policy-v1.json +0 -517
  644. package/src/schemas/performance-policy-v1.json +0 -335
  645. package/src/schemas/testing-evidence-quarantine-v1.json +0 -168
  646. package/src/schemas/testing-evidence-result-v1.json +0 -319
  647. package/src/secrets/aws-control-plane.d.ts +0 -29
  648. package/src/secrets/aws-control-plane.js +0 -322
  649. package/src/secrets/generated-aws-control-plane.d.ts +0 -33
  650. package/src/secrets/generated-aws-control-plane.js +0 -322
  651. package/src/secrets/guardrails.d.ts +0 -26
  652. package/src/secrets/guardrails.js +0 -328
  653. package/src/secrets/metadata.d.ts +0 -48
  654. package/src/secrets/metadata.js +0 -199
  655. package/src/secrets/operator.d.ts +0 -190
  656. package/src/secrets/operator.js +0 -701
  657. package/src/secrets/verification.d.ts +0 -18
  658. package/src/secrets/verification.js +0 -152
  659. package/src/supply-chain/action-pins.d.ts +0 -26
  660. package/src/supply-chain/action-pins.js +0 -262
  661. package/src/supply-chain/blueprint-trust-git.d.ts +0 -130
  662. package/src/supply-chain/blueprint-trust-git.js +0 -1666
  663. package/src/supply-chain/blueprint-trust-process.d.ts +0 -4
  664. package/src/supply-chain/blueprint-trust-process.js +0 -88
  665. package/src/supply-chain/blueprint-trust.d.ts +0 -354
  666. package/src/supply-chain/blueprint-trust.js +0 -1558
  667. package/src/supply-chain/blueprint-verification-authority.d.ts +0 -62
  668. package/src/supply-chain/blueprint-verification-authority.js +0 -679
  669. package/src/supply-chain/blueprint-verification-execution.d.ts +0 -68
  670. package/src/supply-chain/blueprint-verification-execution.js +0 -639
  671. package/src/supply-chain/build-output-bounds.d.ts +0 -2
  672. package/src/supply-chain/build-output-bounds.js +0 -12
  673. package/src/supply-chain/build-output.d.ts +0 -41
  674. package/src/supply-chain/build-output.js +0 -551
  675. package/src/supply-chain/common.d.ts +0 -21
  676. package/src/supply-chain/common.js +0 -107
  677. package/src/supply-chain/container-artifact-contract.d.ts +0 -23
  678. package/src/supply-chain/container-artifact-contract.js +0 -208
  679. package/src/supply-chain/container-release.d.ts +0 -119
  680. package/src/supply-chain/container-release.js +0 -496
  681. package/src/supply-chain/ecr-applicability.d.ts +0 -19
  682. package/src/supply-chain/ecr-applicability.js +0 -103
  683. package/src/supply-chain/ecr-scanning.d.ts +0 -85
  684. package/src/supply-chain/ecr-scanning.js +0 -325
  685. package/src/supply-chain/ecs-deployed-image.d.ts +0 -87
  686. package/src/supply-chain/ecs-deployed-image.js +0 -302
  687. package/src/supply-chain/errors.d.ts +0 -6
  688. package/src/supply-chain/errors.js +0 -15
  689. package/src/supply-chain/generated-blueprint-trust-command.d.ts +0 -4
  690. package/src/supply-chain/generated-blueprint-trust-command.js +0 -1394
  691. package/src/supply-chain/generated-command.d.ts +0 -1
  692. package/src/supply-chain/generated-command.js +0 -775
  693. package/src/supply-chain/generated-container-release-command.d.ts +0 -16
  694. package/src/supply-chain/generated-container-release-command.js +0 -3248
  695. package/src/supply-chain/generated-ecr-collector-command.d.ts +0 -20
  696. package/src/supply-chain/generated-ecr-collector-command.js +0 -1445
  697. package/src/supply-chain/generated-files.d.ts +0 -13
  698. package/src/supply-chain/generated-files.js +0 -421
  699. package/src/supply-chain/generated-scanner-command.d.ts +0 -1
  700. package/src/supply-chain/generated-scanner-command.js +0 -778
  701. package/src/supply-chain/index.d.ts +0 -28
  702. package/src/supply-chain/index.js +0 -36
  703. package/src/supply-chain/inventory.d.ts +0 -96
  704. package/src/supply-chain/inventory.js +0 -828
  705. package/src/supply-chain/license-expression.d.ts +0 -7
  706. package/src/supply-chain/license-expression.js +0 -128
  707. package/src/supply-chain/policy.d.ts +0 -105
  708. package/src/supply-chain/policy.js +0 -304
  709. package/src/supply-chain/publication.d.ts +0 -48
  710. package/src/supply-chain/publication.js +0 -85
  711. package/src/supply-chain/sbom.d.ts +0 -228
  712. package/src/supply-chain/sbom.js +0 -913
  713. package/src/supply-chain/scanner.d.ts +0 -77
  714. package/src/supply-chain/scanner.js +0 -514
  715. package/src/supply-chain/vendored-source.d.ts +0 -95
  716. package/src/supply-chain/vendored-source.js +0 -315
  717. package/src/testing-evidence/fixture-scope.d.ts +0 -53
  718. package/src/testing-evidence/fixture-scope.js +0 -142
  719. package/src/testing-evidence/index.d.ts +0 -5
  720. package/src/testing-evidence/index.js +0 -9
  721. package/src/testing-evidence/quarantine.d.ts +0 -48
  722. package/src/testing-evidence/quarantine.js +0 -253
  723. package/src/testing-evidence/result.d.ts +0 -109
  724. package/src/testing-evidence/result.js +0 -585
  725. package/src/testing-evidence/runner-adapter.d.ts +0 -51
  726. package/src/testing-evidence/runner-adapter.js +0 -288
  727. package/src/testing-evidence/sensitive-artifacts.d.ts +0 -13
  728. package/src/testing-evidence/sensitive-artifacts.js +0 -93
  729. package/src/work-markers/index.d.ts +0 -1
  730. package/src/work-markers/index.js +0 -5
  731. package/src/work-markers/work-markers.d.ts +0 -39
  732. package/src/work-markers/work-markers.js +0 -363
  733. package/src/workload-roles/account-baseline.d.ts +0 -143
  734. package/src/workload-roles/account-baseline.js +0 -980
  735. package/src/workload-roles/authority.d.ts +0 -40
  736. package/src/workload-roles/authority.js +0 -202
  737. package/src/workload-roles/aws-adapter.d.ts +0 -99
  738. package/src/workload-roles/aws-adapter.js +0 -416
  739. package/src/workload-roles/aws-internal-handler.d.ts +0 -27
  740. package/src/workload-roles/aws-internal-handler.js +0 -58
  741. package/src/workload-roles/aws-s3-state.d.ts +0 -52
  742. package/src/workload-roles/aws-s3-state.js +0 -191
  743. package/src/workload-roles/aws-sdk-control-plane.d.ts +0 -12
  744. package/src/workload-roles/aws-sdk-control-plane.js +0 -291
  745. package/src/workload-roles/boundary.d.ts +0 -34
  746. package/src/workload-roles/boundary.js +0 -137
  747. package/src/workload-roles/convergence.d.ts +0 -66
  748. package/src/workload-roles/convergence.js +0 -186
  749. package/src/workload-roles/handler.d.ts +0 -43
  750. package/src/workload-roles/handler.js +0 -158
  751. package/src/workload-roles/history.d.ts +0 -47
  752. package/src/workload-roles/history.js +0 -324
  753. package/src/workload-roles/injection.d.ts +0 -119
  754. package/src/workload-roles/injection.js +0 -495
  755. package/src/workload-roles/manifest.d.ts +0 -54
  756. package/src/workload-roles/manifest.js +0 -343
  757. package/src/workload-roles/provisioner.d.ts +0 -70
  758. package/src/workload-roles/provisioner.js +0 -239
  759. package/src/workload-roles/registration.d.ts +0 -102
  760. package/src/workload-roles/registration.js +0 -462
  761. package/src/workload-roles/stage-boundary.d.ts +0 -31
  762. package/src/workload-roles/stage-boundary.js +0 -208
  763. /package/src/executors/{foundation-profile-preflight → local-deploy}/production-database-safeguard.d.ts +0 -0
  764. /package/src/executors/{foundation-profile-preflight → local-deploy}/production-database-safeguard.js +0 -0
@@ -1,2563 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EBK_RECORD_MAIN_TOKEN_SECRET = exports.THIN_DEPLOY_WORKFLOW_PATH = void 0;
4
- exports.renderThinDeployVerifyCaller = renderThinDeployVerifyCaller;
5
- exports.protectedBrowserInstallScript = protectedBrowserInstallScript;
6
- exports.machineCredentialRequestScript = machineCredentialRequestScript;
7
- exports.databaseCredentialRequestScript = databaseCredentialRequestScript;
8
- exports.exactStageDeployerGuardScript = exactStageDeployerGuardScript;
9
- exports.canonicalStageAuthorityDerivationScript = canonicalStageAuthorityDerivationScript;
10
- exports.exactStagingPromotionPullGuardScript = exactStagingPromotionPullGuardScript;
11
- exports.stagingPromotionReceiptValidationScript = stagingPromotionReceiptValidationScript;
12
- exports.restoredCandidateValidationScript = restoredCandidateValidationScript;
13
- exports.stagingPromotionSealScript = stagingPromotionSealScript;
14
- exports.postdeploySupplyChainBindingScript = postdeploySupplyChainBindingScript;
15
- exports.renderThinDeployWorkflowFilePlan = renderThinDeployWorkflowFilePlan;
16
- exports.THIN_DEPLOY_WORKFLOW_PATH = '.github/workflows/deploy.yml';
17
- /** The production environment secret that lets record-main fast-forward main. */
18
- exports.EBK_RECORD_MAIN_TOKEN_SECRET = 'EBK_RECORD_MAIN_TOKEN';
19
- const EXACT_SEMVER = /^\d+\.\d+\.\d+$/;
20
- const WORKSPACE_NAME = /^[a-z0-9][a-z0-9-]{0,62}$/;
21
- const ACTION_PIN = /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+@[a-f0-9]{40}(?: # [^\r\n]+)?$/;
22
- function assertOptions(options) {
23
- if (options.productionApprovalMode === 'trunk-promotion' &&
24
- (options.deploymentProfile === 'starter' ||
25
- options.deliveryLane === 'trunk')) {
26
- throw new Error('trunk-promotion requires an isolated deployment profile on the protected pair.');
27
- }
28
- if (!WORKSPACE_NAME.test(options.name)) {
29
- throw new Error('Workspace name must be a bounded lowercase slug.');
30
- }
31
- for (const [name, value] of Object.entries(options.actionPins)) {
32
- if (!ACTION_PIN.test(value)) {
33
- throw new Error(`${name} must be an exact 40-character action pin.`);
34
- }
35
- }
36
- for (const [name, value] of Object.entries(options.toolVersions)) {
37
- if (!EXACT_SEMVER.test(value)) {
38
- throw new Error(`${name} must be an exact semantic version.`);
39
- }
40
- }
41
- }
42
- function workflowCallTrigger(profile, deliveryLane = 'protected-pair') {
43
- return profile === 'starter' && deliveryLane !== 'trunk'
44
- ? ''
45
- : ` workflow_call:
46
- inputs:
47
- source_branch:
48
- required: true
49
- type: string
50
- source_commit:
51
- required: true
52
- type: string
53
- source_ref:
54
- required: true
55
- type: string
56
- verify_run_attempt:
57
- required: true
58
- type: string
59
- verify_run_id:
60
- required: true
61
- type: string
62
- `;
63
- }
64
- function renderThinDeployVerifyCaller(profile, deliveryLane = 'protected-pair', productionApprovalMode = 'promotion-pr') {
65
- const trunk = deliveryLane === 'trunk';
66
- if (profile === 'starter' && !trunk)
67
- return '';
68
- // GitHub validates every nested deploy.yml job against this caller's
69
- // permissions on every event, so the ceiling must admit the managed
70
- // rehearsal, which pushes its sealed receipt branch and opens the pull
71
- // request with the workflow token (isolated profiles only).
72
- const nestedWrite = profile !== 'starter';
73
- // Trunk lane: every merged main push is a production delivery.
74
- // Trunk promotion: production deploys from the develop run itself and
75
- // record-main fast-forwards main afterwards, so a main push only verifies.
76
- const protectedBranchCondition = trunk
77
- ? "github.ref == 'refs/heads/main'"
78
- : productionApprovalMode === 'trunk-promotion'
79
- ? "github.ref == 'refs/heads/develop'"
80
- : "(github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main')";
81
- return `
82
-
83
- deploy:
84
- name: deploy exact verified source
85
- needs: [acceptance, release-candidate]
86
- if: >-
87
- always() &&
88
- github.event_name == 'push' &&
89
- ${protectedBranchCondition} &&
90
- needs.acceptance.result == 'success' &&
91
- needs.acceptance.outputs.history_only != 'true' &&
92
- (needs.release-candidate.result == 'success' ||
93
- (github.ref == 'refs/heads/main' && needs.release-candidate.result == 'skipped'))
94
- # Ceiling for the nested deploy.yml jobs; each nested job declares its
95
- # own least-privilege set. Isolated profiles admit the rehearse job's
96
- # receipt push and pull request (EBK-INT-2026-080).
97
- permissions:
98
- actions: read
99
- contents: ${nestedWrite ? 'write' : 'read'}
100
- id-token: write${nestedWrite ? '\n pull-requests: write' : ''}
101
- uses: ./.github/workflows/deploy.yml
102
- with:
103
- source_branch: \${{ github.ref_name }}
104
- source_commit: \${{ github.sha }}
105
- source_ref: \${{ github.ref }}
106
- verify_run_attempt: \${{ github.run_attempt }}
107
- verify_run_id: \${{ github.run_id }}
108
- # The reusable workflow reads the production environment secret
109
- # AWS_STAGING_PROMOTION_PULL_ROLE_ARN, which only reaches a called
110
- # workflow when the caller inherits secrets (EBK-INT-2026-075).
111
- secrets: inherit`;
112
- }
113
- function indentedScript(source, spaces) {
114
- const prefix = ' '.repeat(spaces);
115
- return source
116
- .trim()
117
- .split('\n')
118
- .map((line) => `${prefix}${line}`)
119
- .join('\n');
120
- }
121
- /** @internal Run exactly this generated script in the protected-runner fixture. */
122
- function protectedBrowserInstallScript() {
123
- return `set -euo pipefail
124
- inventory="$EBK_SLICE_PROJECTS"
125
- if [ -n "\${EBK_SITE_PROJECT:-}" ]; then
126
- [ "$EBK_SITE_PROJECT" = site ] || { echo 'Invalid root site project'; exit 1; }
127
- inventory="\${inventory:+$inventory,}$EBK_SITE_PROJECT"
128
- fi
129
- if [ -z "$inventory" ]; then exit 0; fi
130
- case "$inventory" in ,*|*,|*,,*) echo 'Invalid smoke project inventory'; exit 1 ;; esac
131
- IFS=',' read -r -a projects <<< "$inventory"
132
- seen=,
133
- for project in "\${projects[@]}"; do
134
- case "$project" in ''|*[!A-Za-z0-9_-]*) echo 'Invalid smoke project'; exit 1 ;; esac
135
- case "$seen" in *,"$project",*) echo 'Duplicate smoke project'; exit 1 ;; esac
136
- seen="$seen$project,"
137
- done
138
- for project in "\${projects[@]}"; do
139
- pnpm --dir "packages/$project" exec playwright install --with-deps chromium
140
- done`;
141
- }
142
- /**
143
- * @internal Run exactly this generated script in the protected-runner fixture.
144
- *
145
- * Reads the deploying stage's GitHub environment variables through request
146
- * names and exports the canonical machine-credential variables only when they
147
- * are set. An unset GitHub variable expands to '', which the generated Slice
148
- * SST config would read as a generation rather than its blue-1 default, so the
149
- * canonical names never reach the lifecycle when the request is empty.
150
- */
151
- function machineCredentialRequestScript() {
152
- return `set -euo pipefail
153
- generation="$EBK_REQUESTED_MACHINE_CREDENTIAL_GENERATION"
154
- retire="$EBK_REQUESTED_MACHINE_RETIRE_PREVIOUS_GENERATION"
155
- generation_pattern='^(blue|green)-[1-9][0-9]{0,11}$'
156
- if [ -n "$generation" ] && ! [[ "$generation" =~ $generation_pattern ]]; then
157
- echo 'EBK_MACHINE_CREDENTIAL_GENERATION must be blue-N or green-N, where N is 1 to 12 digits without a leading zero, or unset'
158
- exit 1
159
- fi
160
- case "$retire" in
161
- ''|false|true) ;;
162
- *) echo 'EBK_MACHINE_RETIRE_PREVIOUS_GENERATION must be exactly true or false, or unset'; exit 1 ;;
163
- esac
164
- if [ "$retire" = true ]; then
165
- [ -n "$generation" ] || {
166
- echo 'Retiring the previous machine credential generation requires EBK_MACHINE_CREDENTIAL_GENERATION to name the current generation'
167
- exit 1
168
- }
169
- if [ "$EBK_ACTION" = deploy ] && [ "$EBK_LIFECYCLE_SCOPE" != full ]; then
170
- echo 'Retiring the previous machine credential generation requires a Deploy dispatch with lifecycle full; affected scope can skip the Slice'
171
- exit 1
172
- fi
173
- fi
174
- if [ -n "$generation" ]; then
175
- echo "EBK_MACHINE_CREDENTIAL_GENERATION=$generation" >> "$GITHUB_ENV"
176
- echo "Requested machine credential generation: $generation"
177
- fi
178
- if [ "$retire" = true ]; then
179
- echo 'EBK_MACHINE_RETIRE_PREVIOUS_GENERATION=true' >> "$GITHUB_ENV"
180
- echo 'Requested retirement of the previous machine credential generation'
181
- fi`;
182
- }
183
- function machineCredentialRequestStep() {
184
- return ` - name: Validate requested machine credential generation
185
- env:
186
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
187
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
188
- EBK_REQUESTED_MACHINE_CREDENTIAL_GENERATION: \${{ vars.EBK_MACHINE_CREDENTIAL_GENERATION }}
189
- EBK_REQUESTED_MACHINE_RETIRE_PREVIOUS_GENERATION: \${{ vars.EBK_MACHINE_RETIRE_PREVIOUS_GENERATION }}
190
- run: |
191
- ${indentedScript(machineCredentialRequestScript(), 10)}`;
192
- }
193
- /**
194
- * @internal Run exactly this generated script in the protected-runner fixture.
195
- *
196
- * Reads the deploying stage's optional database credential generation through
197
- * a request name and exports the canonical variable only when it is set. An
198
- * unset GitHub variable expands to '', which must not reach the Slice SST
199
- * config, so the default bootstrap generation is kept when the request is
200
- * empty. Every SQL Slice the deployment reaches rotates its generated
201
- * database credential once when the requested generation is new.
202
- */
203
- function databaseCredentialRequestScript() {
204
- return `set -euo pipefail
205
- generation="$EBK_REQUESTED_DATABASE_CREDENTIAL_GENERATION"
206
- generation_pattern='^[a-z0-9][a-z0-9-]{0,62}$'
207
- if [ -n "$generation" ] && ! [[ "$generation" =~ $generation_pattern ]]; then
208
- echo 'EBK_DATABASE_CREDENTIAL_GENERATION must be 1 to 63 lowercase letters, digits, or hyphens that start with a letter or digit, or unset'
209
- exit 1
210
- fi
211
- if [ -n "$generation" ]; then
212
- echo "EBK_DATABASE_CREDENTIAL_GENERATION=$generation" >> "$GITHUB_ENV"
213
- echo "Requested database credential generation: $generation"
214
- fi`;
215
- }
216
- function databaseCredentialRequestStep() {
217
- return ` - name: Validate requested database credential generation
218
- env:
219
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
220
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
221
- EBK_REQUESTED_DATABASE_CREDENTIAL_GENERATION: \${{ vars.EBK_DATABASE_CREDENTIAL_GENERATION }}
222
- run: |
223
- ${indentedScript(databaseCredentialRequestScript(), 10)}`;
224
- }
225
- /** @internal Exported for executable source-contract tests. */
226
- function exactStageDeployerGuardScript(operation, accountVariable) {
227
- return `read -r caller_account caller_arn <<< "$(aws sts get-caller-identity --query '[Account,Arn]' --output text)"
228
- [ "$caller_account" = "${accountVariable}" ] || {
229
- echo '${operation} caller account differs from committed policy'; exit 1;
230
- }
231
- caller_partition="\${caller_arn#arn:}"
232
- caller_partition="\${caller_partition%%:*}"
233
- [ "$caller_partition" = "$AWS_PARTITION" ] || {
234
- echo '${operation} caller partition differs from committed policy'; exit 1;
235
- }
236
- expected_role_arn="arn:$AWS_PARTITION:iam::${accountVariable}:role/ebk/$EBK_STAGE/deployment/ebk-$EBK_STAGE-deploy"
237
- [ "$AWS_DEPLOY_ROLE_ARN" = "$expected_role_arn" ] || {
238
- echo '${operation} configured role is not the canonical stage deployer'; exit 1;
239
- }
240
- expected_caller_prefix="arn:$AWS_PARTITION:sts::${accountVariable}:assumed-role/ebk-$EBK_STAGE-deploy/"
241
- case "$caller_arn" in
242
- "$expected_caller_prefix"?*) ;;
243
- *) echo '${operation} caller is not the exact stage deployer'; exit 1 ;;
244
- esac`;
245
- }
246
- /** @internal Shared verbatim by every generated protected workflow. */
247
- function canonicalStageAuthorityDerivationScript() {
248
- return `case "$EBK_STAGE" in
249
- development) account_id="$EBK_DEVELOPMENT_ACCOUNT" ;;
250
- staging) account_id="$EBK_STAGING_ACCOUNT" ;;
251
- production) account_id="$EBK_PRODUCTION_ACCOUNT" ;;
252
- *) exit 1 ;;
253
- esac
254
- case "$account_id" in *[!0-9]*|'') exit 1 ;; esac
255
- [ "\${#account_id}" -eq 12 ]
256
- case "$EBK_REGION" in
257
- cn-*) partition=aws-cn; audience=sts.amazonaws.com.cn ;;
258
- us-gov-*) partition=aws-us-gov; audience=sts.amazonaws.com ;;
259
- us-iso-*|us-isob-*|eu-isoe-*|us-isof-*)
260
- echo 'The committed Region belongs to an unsupported AWS partition.' >&2
261
- exit 1
262
- ;;
263
- *) partition=aws; audience=sts.amazonaws.com ;;
264
- esac
265
- role_arn="arn:$partition:iam::$account_id:role/ebk/$EBK_STAGE/deployment/ebk-$EBK_STAGE-deploy"
266
- echo "account_id=$account_id" >> "$GITHUB_OUTPUT"
267
- echo "audience=$audience" >> "$GITHUB_OUTPUT"
268
- echo "partition=$partition" >> "$GITHUB_OUTPUT"
269
- echo "role_arn=$role_arn" >> "$GITHUB_OUTPUT"`;
270
- }
271
- /** @internal Exported for executable source-contract tests. */
272
- function exactStagingPromotionPullGuardScript() {
273
- return `read -r caller_account caller_arn <<< "$(aws sts get-caller-identity --query '[Account,Arn]' --output text)"
274
- [ "$caller_account" = "$EBK_STAGING_ACCOUNT_ID" ] || {
275
- echo 'Staging registry caller account differs from committed policy'; exit 1;
276
- }
277
- caller_partition="\${caller_arn#arn:}"
278
- caller_partition="\${caller_partition%%:*}"
279
- [ "$caller_partition" = "$AWS_PARTITION" ] || {
280
- echo 'Staging registry caller partition differs from committed policy'; exit 1;
281
- }
282
- expected_role_arn="arn:$AWS_PARTITION:iam::$EBK_STAGING_ACCOUNT_ID:role/ebk/promotion/ebk-staging-promotion-pull"
283
- [ "$AWS_STAGING_PROMOTION_PULL_ROLE_ARN" = "$expected_role_arn" ] || {
284
- echo 'Staging registry configured role is not the canonical promotion pull role'; exit 1;
285
- }
286
- expected_caller_prefix="arn:$AWS_PARTITION:sts::$EBK_STAGING_ACCOUNT_ID:assumed-role/ebk-staging-promotion-pull/"
287
- case "$caller_arn" in
288
- "$expected_caller_prefix"?*) ;;
289
- *) echo 'Staging registry caller is not the exact promotion pull role'; exit 1 ;;
290
- esac`;
291
- }
292
- /** @internal Shared verbatim with the generated workflow and executable tests. */
293
- function stagingPromotionReceiptValidationScript() {
294
- return `import { createHash } from 'node:crypto';
295
- import { appendFileSync, readFileSync } from 'node:fs';
296
- import { join } from 'node:path';
297
-
298
- const commit = /^[a-f0-9]{40,64}$/;
299
- const integer = /^[1-9][0-9]*$/;
300
- const digest = /^sha256:[a-f0-9]{64}$/;
301
- const required = (name, pattern) => {
302
- const value = process.env[name]?.trim() ?? '';
303
- if (!pattern.test(value)) throw new Error(name + ' is absent or malformed.');
304
- return value;
305
- };
306
- const root = process.env.EBK_STAGING_RECEIPT_ROOT?.trim() ?? '';
307
- if (!root) throw new Error('Staging deployment receipt root is absent.');
308
- const expectedHasSlices = required('EBK_EXPECTED_HAS_SLICES', /^(?:true|false)$/) === 'true';
309
- const expectedHasContainers = required('EBK_EXPECTED_HAS_CONTAINERS', /^(?:true|false)$/) === 'true';
310
- if (expectedHasContainers && !expectedHasSlices) throw new Error('Container work requires a selected Slice.');
311
- const sourceCommit = required('EBK_STAGING_SOURCE_COMMIT', commit);
312
- const expectedAccount = required('EBK_EXPECTED_STAGING_ACCOUNT_ID', /^[0-9]{12}$/);
313
- const expectedProfile = required('EBK_EXPECTED_DEPLOYMENT_PROFILE', /^(?:production-isolated|fully-isolated)$/);
314
- const expectedRegion = required('EBK_EXPECTED_DEPLOYMENT_REGION', /^[a-z]{2}(?:-gov)?-[a-z]+(?:-[a-z]+)*-[0-9]$/);
315
- const deploymentRunId = required('EBK_STAGING_DEPLOYMENT_RUN_ID', integer);
316
- const deploymentRunAttempt = required('EBK_STAGING_DEPLOYMENT_RUN_ATTEMPT', integer);
317
- const receiptArtifactId = required('EBK_STAGING_RECEIPT_ARTIFACT_ID', integer);
318
- const receiptArtifactDigest = required('EBK_STAGING_RECEIPT_ARTIFACT_DIGEST', digest);
319
- const receiptBytes = readFileSync(join(root, 'latest.json'));
320
- const promotionBytes = readFileSync(join(root, 'promotion.json'));
321
- const receipt = JSON.parse(receiptBytes.toString('utf8'));
322
- const promotion = JSON.parse(promotionBytes.toString('utf8'));
323
- const receiptDigest = createHash('sha256').update(receiptBytes).digest('hex');
324
- if (
325
- receipt?.kind !== 'ebk-deployment-receipt' ||
326
- receipt.schemaVersion !== 1 ||
327
- receipt.outcome !== 'succeeded' ||
328
- receipt.authority !== 'github' ||
329
- receipt.stage !== 'staging' ||
330
- receipt.account !== expectedAccount ||
331
- receipt.profile !== expectedProfile ||
332
- receipt.region !== expectedRegion ||
333
- receipt.source?.clean !== true ||
334
- receipt.source?.commit !== sourceCommit ||
335
- promotion?.kind !== 'ebk-staging-deployment-promotion' ||
336
- promotion.schemaVersion !== 1 ||
337
- promotion.hasSlices !== expectedHasSlices ||
338
- typeof promotion.hasContainers !== 'boolean' ||
339
- (promotion.hasContainers && !promotion.hasSlices) ||
340
- (expectedHasContainers && !promotion.hasContainers) ||
341
- promotion.stage !== 'staging' ||
342
- promotion.account !== expectedAccount ||
343
- promotion.deploymentProfile !== expectedProfile ||
344
- promotion.region !== expectedRegion ||
345
- promotion.sourceCommit !== sourceCommit ||
346
- promotion.deployment?.runId !== deploymentRunId ||
347
- promotion.deployment?.runAttempt !== deploymentRunAttempt ||
348
- promotion.deployment?.receiptDigest !== receiptDigest ||
349
- (expectedHasSlices
350
- ? !integer.test(promotion.candidate?.artifactId ?? '') ||
351
- !digest.test(promotion.candidate?.artifactDigest ?? '') ||
352
- !integer.test(promotion.candidate?.producerRunId ?? '') ||
353
- !integer.test(promotion.candidate?.producerRunAttempt ?? '') ||
354
- promotion.candidate?.sourceCommit !== sourceCommit ||
355
- !/^[a-f0-9]{64}$/.test(promotion.candidate?.materialDigest ?? '')
356
- : promotion.candidate !== null) ||
357
- (promotion.hasContainers
358
- ? !integer.test(promotion.container?.artifactId ?? '') ||
359
- !digest.test(promotion.container?.artifactDigest ?? '')
360
- : promotion.container !== null)
361
- ) {
362
- throw new Error('Staging deployment receipt and candidate promotion binding disagree.');
363
- }
364
- const outputs = {
365
- deployment_run_attempt: deploymentRunAttempt,
366
- deployment_run_id: deploymentRunId,
367
- receipt_artifact_digest: receiptArtifactDigest,
368
- receipt_artifact_id: receiptArtifactId,
369
- source_commit: sourceCommit,
370
- };
371
- if (expectedHasSlices) Object.assign(outputs, {
372
- artifact_digest: promotion.candidate.artifactDigest,
373
- artifact_id: promotion.candidate.artifactId,
374
- candidate_material_digest: promotion.candidate.materialDigest,
375
- producer_run_attempt: promotion.candidate.producerRunAttempt,
376
- producer_run_id: promotion.candidate.producerRunId,
377
- });
378
- if (expectedHasContainers) Object.assign(outputs, {
379
- container_artifact_digest: promotion.container.artifactDigest,
380
- container_artifact_id: promotion.container.artifactId,
381
- });
382
- for (const [name, value] of Object.entries(outputs)) appendFileSync(process.env.GITHUB_OUTPUT, name + '=' + value + '\\n');`;
383
- }
384
- /** @internal Shared verbatim with the generated workflow and executable tests. */
385
- function restoredCandidateValidationScript() {
386
- return `import { createHash } from 'node:crypto';
387
- import { readFileSync, readdirSync } from 'node:fs';
388
- import { join } from 'node:path';
389
-
390
- const root = '.ebk/evidence/release-candidate/packages';
391
- const sourceCommit = process.env.EBK_RELEASE_SOURCE_COMMIT?.trim() ?? '';
392
- const producerRunId = process.env.EBK_CANDIDATE_PRODUCER_RUN_ID?.trim() ?? '';
393
- const producerRunAttempt = process.env.EBK_CANDIDATE_PRODUCER_RUN_ATTEMPT?.trim() ?? '';
394
- const expected = process.env.EBK_CANDIDATE_MATERIAL_DIGEST?.trim() ?? '';
395
- if (!/^[a-f0-9]{40,64}$/.test(sourceCommit) || !/^[1-9][0-9]*$/.test(producerRunId) || !/^[1-9][0-9]*$/.test(producerRunAttempt) || !/^[a-f0-9]{64}$/.test(expected)) {
396
- throw new Error('Restored candidate authority is absent or malformed.');
397
- }
398
- const projects = readdirSync(root, { withFileTypes: true })
399
- .filter((entry) => entry.isDirectory())
400
- .map((entry) => entry.name)
401
- .sort();
402
- if (projects.length === 0 || projects.some((project) => !/^[a-z0-9][a-z0-9-]{0,62}$/.test(project))) {
403
- throw new Error('Restored candidate project inventory is absent or malformed.');
404
- }
405
- const entries = projects.map((project) => {
406
- const bytes = readFileSync(join(root, project, 'candidate.json'));
407
- const value = JSON.parse(bytes.toString('utf8'));
408
- if (
409
- value?.kind !== 'ebk-release-candidate' ||
410
- value.schemaVersion !== 1 ||
411
- value.slice !== project ||
412
- value.sourceCommit !== sourceCommit ||
413
- value.provenance?.runId !== producerRunId ||
414
- value.provenance?.runAttempt !== producerRunAttempt
415
- ) throw new Error('Restored candidate provenance is stale or cross-paired.');
416
- return { manifestDigest: createHash('sha256').update(bytes).digest('hex'), project };
417
- });
418
- const observed = createHash('sha256').update(JSON.stringify(entries)).digest('hex');
419
- if (observed !== expected) throw new Error('Restored candidate material digest differs from staging.');`;
420
- }
421
- /** @internal Shared verbatim with the generated workflow and executable tests. */
422
- function stagingPromotionSealScript() {
423
- return `import { createHash } from 'node:crypto';
424
- import { mkdirSync, readFileSync, readdirSync, writeFileSync } from 'node:fs';
425
- import { join } from 'node:path';
426
-
427
- const required = (name, pattern) => {
428
- const value = process.env[name]?.trim() ?? '';
429
- if (!pattern.test(value)) throw new Error(name + ' is absent or malformed.');
430
- return value;
431
- };
432
- const sourceCommit = required('EBK_RELEASE_SOURCE_COMMIT', /^[a-f0-9]{40,64}$/);
433
- const hasSlices = required('EBK_HAS_SLICES', /^(?:true|false)$/) === 'true';
434
- const hasContainers = required('EBK_HAS_CONTAINERS', /^(?:true|false)$/) === 'true';
435
- if (hasContainers && !hasSlices) throw new Error('Container work requires a selected Slice.');
436
- const account = required('EBK_POLICY_ACCOUNT_ID', /^[0-9]{12}$/);
437
- const deploymentProfile = required('EBK_DEPLOYMENT_PROFILE', /^(?:production-isolated|fully-isolated)$/);
438
- const region = required('EBK_POLICY_REGION', /^[a-z]{2}(?:-gov)?-[a-z]+(?:-[a-z]+)*-[0-9]$/);
439
- const deploymentRunId = required('GITHUB_RUN_ID', /^[1-9][0-9]*$/);
440
- const deploymentRunAttempt = required('GITHUB_RUN_ATTEMPT', /^[1-9][0-9]*$/);
441
- const receiptPath = '.ebk/evidence/deployment/latest.json';
442
- const receiptBytes = readFileSync(receiptPath);
443
- const receipt = JSON.parse(receiptBytes.toString('utf8'));
444
- if (receipt?.kind !== 'ebk-deployment-receipt' || receipt.schemaVersion !== 1 || receipt.outcome !== 'succeeded' || receipt.authority !== 'github' || receipt.stage !== 'staging' || receipt.account !== account || receipt.profile !== deploymentProfile || receipt.region !== region || receipt.source?.clean !== true || receipt.source?.commit !== sourceCommit) {
445
- throw new Error('Successful staging deployment receipt is absent or stale.');
446
- }
447
- const candidateEnvironment = {
448
- artifactDigest: process.env.EBK_CANDIDATE_ARTIFACT_DIGEST?.trim() ?? '',
449
- artifactId: process.env.EBK_CANDIDATE_ARTIFACT_ID?.trim() ?? '',
450
- producerRunAttempt: process.env.EBK_CANDIDATE_PRODUCER_RUN_ATTEMPT?.trim() ?? '',
451
- producerRunId: process.env.EBK_CANDIDATE_PRODUCER_RUN_ID?.trim() ?? '',
452
- };
453
- const containerEnvironment = {
454
- artifactDigest: process.env.EBK_CONTAINER_ARTIFACT_DIGEST?.trim() ?? '',
455
- artifactId: process.env.EBK_CONTAINER_ARTIFACT_ID?.trim() ?? '',
456
- };
457
- let candidate = null;
458
- let container = null;
459
- if (hasSlices) {
460
- const producerRunId = required('EBK_CANDIDATE_PRODUCER_RUN_ID', /^[1-9][0-9]*$/);
461
- const producerRunAttempt = required('EBK_CANDIDATE_PRODUCER_RUN_ATTEMPT', /^[1-9][0-9]*$/);
462
- const artifactId = required('EBK_CANDIDATE_ARTIFACT_ID', /^[1-9][0-9]*$/);
463
- const artifactDigest = required('EBK_CANDIDATE_ARTIFACT_DIGEST', /^sha256:[a-f0-9]{64}$/);
464
- const root = '.ebk/evidence/release-candidate/packages';
465
- const projects = readdirSync(root, { withFileTypes: true })
466
- .filter((entry) => entry.isDirectory())
467
- .map((entry) => entry.name)
468
- .sort();
469
- if (projects.length === 0 || projects.some((project) => !/^[a-z0-9][a-z0-9-]{0,62}$/.test(project))) throw new Error('Staging candidate inventory is absent or malformed.');
470
- const entries = projects.map((project) => {
471
- const bytes = readFileSync(join(root, project, 'candidate.json'));
472
- const value = JSON.parse(bytes.toString('utf8'));
473
- if (value?.kind !== 'ebk-release-candidate' || value.schemaVersion !== 1 || value.slice !== project || value.sourceCommit !== sourceCommit || value.provenance?.runId !== producerRunId || value.provenance?.runAttempt !== producerRunAttempt) {
474
- throw new Error('Staging candidate provenance is stale or cross-paired.');
475
- }
476
- return { manifestDigest: createHash('sha256').update(bytes).digest('hex'), project };
477
- });
478
- candidate = { artifactDigest, artifactId, materialDigest: createHash('sha256').update(JSON.stringify(entries)).digest('hex'), producerRunAttempt, producerRunId, sourceCommit };
479
- } else if (Object.values(candidateEnvironment).some(Boolean)) {
480
- throw new Error('A staging promotion without Slices must not carry Slice release material.');
481
- }
482
- if (hasContainers) {
483
- const artifactId = required('EBK_CONTAINER_ARTIFACT_ID', /^[1-9][0-9]*$/);
484
- // The upload action returns bare hex; the artifacts API uses sha256:<hex>.
485
- const raw = containerEnvironment.artifactDigest;
486
- process.env.EBK_CONTAINER_ARTIFACT_DIGEST = /^[a-f0-9]{64}$/.test(raw) ? 'sha256:' + raw : raw;
487
- const artifactDigest = required('EBK_CONTAINER_ARTIFACT_DIGEST', /^sha256:[a-f0-9]{64}$/);
488
- container = { artifactDigest, artifactId };
489
- } else if (Object.values(containerEnvironment).some(Boolean)) {
490
- throw new Error('A staging promotion without OCI artifacts must not carry container material.');
491
- }
492
- const promotion = {
493
- account,
494
- candidate,
495
- container,
496
- deploymentProfile,
497
- deployment: { receiptDigest: createHash('sha256').update(receiptBytes).digest('hex'), runAttempt: deploymentRunAttempt, runId: deploymentRunId },
498
- hasSlices,
499
- hasContainers,
500
- kind: 'ebk-staging-deployment-promotion',
501
- region,
502
- schemaVersion: 1,
503
- sourceCommit,
504
- stage: 'staging',
505
- };
506
- mkdirSync('.ebk/evidence/deployment', { recursive: true });
507
- writeFileSync('.ebk/evidence/deployment/promotion.json', JSON.stringify(promotion, null, 2) + '\\n', { mode: 0o600 });`;
508
- }
509
- /** @internal Shared verbatim with the generated workflow and executable tests. */
510
- function postdeploySupplyChainBindingScript() {
511
- return `import { createHash } from 'node:crypto';
512
- import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
513
-
514
- const required = (name, pattern) => {
515
- const value = process.env[name]?.trim() ?? '';
516
- if (!pattern.test(value)) throw new Error(name + ' is absent or malformed.');
517
- return value;
518
- };
519
- const canonical = (value) => {
520
- if (value === null || typeof value !== 'object') return JSON.stringify(value);
521
- if (Array.isArray(value)) return '[' + value.map(canonical).join(',') + ']';
522
- return '{' + Object.entries(value)
523
- .sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0)
524
- .map(([key, child]) => JSON.stringify(key) + ':' + canonical(child))
525
- .join(',') + '}';
526
- };
527
- const accountId = required('EBK_POLICY_ACCOUNT_ID', /^[0-9]{12}$/);
528
- const deploymentCommit = required('EBK_SOURCE_COMMIT', /^[a-f0-9]{40,64}$/);
529
- const profile = required('EBK_DEPLOYMENT_PROFILE', /^(?:starter|production-isolated|fully-isolated)$/);
530
- const region = required('EBK_POLICY_REGION', /^[a-z]{2}(?:-gov)?-[a-z]+(?:-[a-z]+)*-[0-9]$/);
531
- const releaseCandidateArtifactDigest = required('EBK_CANDIDATE_ARTIFACT_DIGEST', /^sha256:[a-f0-9]{64}$/);
532
- const releaseCandidateArtifactId = required('EBK_CANDIDATE_ARTIFACT_ID', /^[1-9][0-9]*$/);
533
- const releaseCandidateProducerRunAttempt = required('EBK_CANDIDATE_PRODUCER_RUN_ATTEMPT', /^[1-9][0-9]*$/);
534
- const releaseCandidateProducerRunId = required('EBK_CANDIDATE_PRODUCER_RUN_ID', /^[1-9][0-9]*$/);
535
- const releaseSourceCommit = required('EBK_RELEASE_SOURCE_COMMIT', /^[a-f0-9]{40,64}$/);
536
- const runAttempt = required('GITHUB_RUN_ATTEMPT', /^[1-9][0-9]*$/);
537
- const runId = required('GITHUB_RUN_ID', /^[1-9][0-9]*$/);
538
- const stage = required('EBK_STAGE', /^(?:development|staging|production)$/);
539
- const receipt = JSON.parse(readFileSync('.ebk/evidence/deployment/latest.json', 'utf8'));
540
- if (
541
- receipt?.kind !== 'ebk-deployment-receipt' ||
542
- receipt.schemaVersion !== 1 ||
543
- receipt.outcome !== 'succeeded' ||
544
- receipt.authority !== 'github' ||
545
- receipt.account !== accountId ||
546
- receipt.profile !== profile ||
547
- receipt.region !== region ||
548
- receipt.stage !== stage ||
549
- receipt.source?.clean !== true ||
550
- receipt.source?.commit !== deploymentCommit
551
- ) throw new Error('Successful deployment receipt is absent or cross-paired.');
552
- const unsigned = {
553
- accountId,
554
- deploymentCommit,
555
- kind: 'ebk-postdeploy-supply-chain-binding',
556
- profile,
557
- region,
558
- releaseCandidateArtifactDigest,
559
- releaseCandidateArtifactId,
560
- releaseCandidateProducerRunAttempt,
561
- releaseCandidateProducerRunId,
562
- releaseSourceCommit,
563
- runAttempt,
564
- runId,
565
- schemaVersion: 1,
566
- stage,
567
- };
568
- const binding = {
569
- ...unsigned,
570
- materialDigest: createHash('sha256').update(canonical(unsigned)).digest('hex'),
571
- };
572
- mkdirSync('.ebk/evidence/deployment', { recursive: true, mode: 0o700 });
573
- writeFileSync(
574
- '.ebk/evidence/deployment/postdeploy-supply-chain.json',
575
- JSON.stringify(binding, null, 2) + '\\n',
576
- { flag: 'wx', mode: 0o600 },
577
- );`;
578
- }
579
- function renderThinDeployWorkflow(options) {
580
- const { actionPins, deploymentProfile, name, toolVersions } = options;
581
- const trunkPromotion = options.productionApprovalMode === 'trunk-promotion';
582
- // The starter protected pair deploys development from protected develop;
583
- // in the trunk lane develop is unprotected and owns no stage.
584
- const developmentFromProtectedDevelop = deploymentProfile === 'starter' && options.deliveryLane !== 'trunk';
585
- return `name: Deploy
586
- run-name: Deploy \${{ inputs.source_commit || github.sha }}
587
-
588
- on:
589
- ${workflowCallTrigger(deploymentProfile, options.deliveryLane)} workflow_dispatch:
590
- inputs:
591
- action:
592
- description: Native lifecycle action
593
- required: true
594
- default: deploy
595
- type: choice
596
- options: [deploy, refresh, unlock, remove${deploymentProfile === 'starter' ? '' : ', rehearse'}]
597
- project:
598
- description: Required registered project for unlock or remove recovery
599
- required: false
600
- type: string${deploymentProfile === 'starter'
601
- ? ''
602
- : `
603
- probe_url:
604
- description: rehearse only; exact HTTPS Router health URL in /<kebab-slice>/api/health form for the staging blocking rehearsal
605
- required: false
606
- type: string`}
607
- lifecycle:
608
- description: affected skips Slices unchanged since the newest successful deployment; full deploys everything
609
- required: false
610
- default: affected
611
- type: choice
612
- options: [affected, full]
613
-
614
- concurrency:
615
- group: protected-lifecycle-\${{ inputs.source_branch || github.ref_name }}
616
- cancel-in-progress: false
617
-
618
- permissions:
619
- contents: read
620
-
621
- env:
622
- EBK_DEPLOYMENT_SOURCE_BRANCH: \${{ inputs.source_branch || github.ref_name }}
623
- EBK_DEPLOYMENT_SOURCE_COMMIT: \${{ inputs.source_commit || github.sha }}
624
- EBK_DEPLOYMENT_SOURCE_REF: \${{ inputs.source_ref || github.ref }}
625
- EBK_EXPECTED_SST_VERSION: ${toolVersions.sst}
626
-
627
- jobs:
628
- prepare:
629
- name: route protected native lifecycle
630
- runs-on: ubuntu-latest
631
- outputs:
632
- action: \${{ steps.route.outputs.action }}
633
- probe_url: \${{ steps.route.outputs.probe_url }}
634
- account_id: \${{ steps.account.outputs.account_id }}
635
- has_slices: \${{ steps.policy.outputs.has_slices }}
636
- has_containers: \${{ steps.policy.outputs.has_containers }}
637
- container_projects: \${{ steps.policy.outputs.container_projects }}
638
- container_matrix: \${{ steps.policy.outputs.container_matrix }}
639
- ordered_projects: \${{ steps.policy.outputs.ordered_projects }}
640
- oidc_audience: \${{ steps.account.outputs.audience }}
641
- partition: \${{ steps.account.outputs.partition }}
642
- profile: \${{ steps.policy.outputs.deployment_profile }}
643
- project: \${{ steps.route.outputs.project }}
644
- region: \${{ steps.policy.outputs.deployment_region }}
645
- site_project: \${{ steps.policy.outputs.site_project }}
646
- slice_projects: \${{ steps.policy.outputs.slice_projects }}
647
- slice_matrix: \${{ steps.policy.outputs.slice_matrix }}
648
- staging_account_id: \${{ steps.policy.outputs.staging_account_id }}
649
- stage: \${{ steps.route.outputs.stage }}
650
- stage_deploy_role_arn: \${{ steps.account.outputs.role_arn }}${trunkPromotion
651
- ? `
652
- production_account_id: \${{ steps.production-account.outputs.account_id }}
653
- production_deploy_role_arn: \${{ steps.production-account.outputs.role_arn }}`
654
- : ''}
655
- steps:
656
- - name: Verify exact protected branch tip before setup
657
- env:
658
- EBK_CONTEXT_REF: \${{ github.ref }}
659
- EBK_CONTEXT_REF_NAME: \${{ github.ref_name }}
660
- EBK_CONTEXT_RUN_ATTEMPT: \${{ github.run_attempt }}
661
- EBK_CONTEXT_RUN_ID: \${{ github.run_id }}
662
- EBK_CONTEXT_SHA: \${{ github.sha }}
663
- EBK_INPUT_RUN_ATTEMPT: \${{ inputs.verify_run_attempt || '' }}
664
- EBK_INPUT_RUN_ID: \${{ inputs.verify_run_id || '' }}
665
- EBK_INPUT_SOURCE_BRANCH: \${{ inputs.source_branch || '' }}
666
- EBK_INPUT_SOURCE_COMMIT: \${{ inputs.source_commit || '' }}
667
- EBK_INPUT_SOURCE_REF: \${{ inputs.source_ref || '' }}
668
- EBK_SOURCE_BRANCH: \${{ env.EBK_DEPLOYMENT_SOURCE_BRANCH }}
669
- EBK_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
670
- EBK_SOURCE_REF: \${{ env.EBK_DEPLOYMENT_SOURCE_REF }}
671
- EBK_TRIGGER: \${{ github.event_name }}
672
- GH_REPO: \${{ github.repository }}
673
- GH_TOKEN: \${{ github.token }}
674
- run: |
675
- set -euo pipefail
676
- case "$EBK_SOURCE_COMMIT" in ''|*[!0-9a-f]*) exit 1 ;; esac
677
- { [ "\${#EBK_SOURCE_COMMIT}" -eq 40 ] || [ "\${#EBK_SOURCE_COMMIT}" -eq 64 ]; } || exit 1
678
- case "$EBK_SOURCE_BRANCH:$EBK_SOURCE_REF" in
679
- develop:refs/heads/develop|main:refs/heads/main) ;;
680
- *) echo 'Protected lifecycle must bind one exact protected branch ref'; exit 1 ;;
681
- esac
682
- if [ -n "$EBK_INPUT_RUN_ID$EBK_INPUT_RUN_ATTEMPT$EBK_INPUT_SOURCE_BRANCH$EBK_INPUT_SOURCE_COMMIT$EBK_INPUT_SOURCE_REF" ]; then
683
- [ "$EBK_TRIGGER" = push ] || { echo 'Automatic deployment requires one protected push Verify caller'; exit 1; }
684
- [ -n "$EBK_INPUT_RUN_ID" ] && [ -n "$EBK_INPUT_RUN_ATTEMPT" ] &&
685
- [ -n "$EBK_INPUT_SOURCE_BRANCH" ] && [ -n "$EBK_INPUT_SOURCE_COMMIT" ] && [ -n "$EBK_INPUT_SOURCE_REF" ] ||
686
- { echo 'Automatic deployment caller binding is incomplete'; exit 1; }
687
- [ "$EBK_INPUT_RUN_ID" = "$EBK_CONTEXT_RUN_ID" ] &&
688
- [ "$EBK_INPUT_RUN_ATTEMPT" = "$EBK_CONTEXT_RUN_ATTEMPT" ] &&
689
- [ "$EBK_INPUT_SOURCE_COMMIT" = "$EBK_CONTEXT_SHA" ] &&
690
- [ "$EBK_INPUT_SOURCE_BRANCH" = "$EBK_CONTEXT_REF_NAME" ] &&
691
- [ "$EBK_INPUT_SOURCE_REF" = "$EBK_CONTEXT_REF" ] ||
692
- { echo 'Automatic deployment differs from its exact Verify caller'; exit 1; }
693
- else
694
- [ "$EBK_TRIGGER" = workflow_dispatch ] || { echo 'Manual deployment requires workflow dispatch'; exit 1; }
695
- fi
696
- branch_tip="$(gh api "/repos/$GH_REPO/git/ref/heads/$EBK_SOURCE_BRANCH" --jq '.object.sha')"
697
- [ "$branch_tip" = "$EBK_SOURCE_COMMIT" ] || {
698
- echo 'Deployment source is no longer the exact protected branch tip'; exit 1;
699
- }
700
- - name: Check out immutable source
701
- uses: ${actionPins.checkout}
702
- with:
703
- fetch-depth: 0
704
- persist-credentials: false
705
- ref: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
706
- - uses: ${actionPins.pnpmSetup}
707
- - uses: ${actionPins.setupNode}
708
- with:
709
- node-version: ${toolVersions.node}
710
- cache: pnpm
711
- - run: pnpm install --frozen-lockfile --ignore-scripts --ignore-pnpmfile
712
- - id: route
713
- name: Resolve protected stage and action
714
- env:
715
- EBK_DISPATCH_ACTION: \${{ inputs.action || '' }}
716
- EBK_DISPATCH_PROBE_URL: \${{ inputs.probe_url || '' }}
717
- EBK_DISPATCH_PROJECT: \${{ inputs.project || '' }}
718
- EBK_PROFILE: ${deploymentProfile}
719
- EBK_SOURCE_BRANCH: \${{ env.EBK_DEPLOYMENT_SOURCE_BRANCH }}
720
- EBK_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
721
- EBK_TRIGGER: \${{ github.event_name }}
722
- run: |
723
- set -euo pipefail
724
- action=deploy
725
- project=
726
- if [ "$EBK_TRIGGER" = workflow_dispatch ]; then
727
- action="$EBK_DISPATCH_ACTION"
728
- project="$EBK_DISPATCH_PROJECT"
729
- fi
730
- case "$EBK_SOURCE_COMMIT" in ''|*[!0-9a-f]*) exit 1 ;; esac
731
- { [ "\${#EBK_SOURCE_COMMIT}" -eq 40 ] || [ "\${#EBK_SOURCE_COMMIT}" -eq 64 ]; } || exit 1
732
- case "$action" in deploy|refresh|unlock|remove|rehearse) ;; *) exit 1 ;; esac
733
- case "$project" in ''|*[!A-Za-z0-9_-]*) [ -z "$project" ] || exit 1 ;; esac
734
- case "$action" in
735
- unlock|remove) [ -n "$project" ] || { echo 'unlock and remove require an explicit project'; exit 1; } ;;
736
- deploy|refresh) [ -z "$project" ] || { echo 'deploy and refresh operate on the policy-derived project order'; exit 1; } ;;
737
- rehearse)
738
- [ -z "$project" ] || { echo 'rehearse targets the foundation Router WAF and takes no project'; exit 1; }
739
- [ "$EBK_PROFILE" != starter ] || { echo 'starter rehearses development locally; rehearse is for isolated staging'; exit 1; }
740
- [ "$EBK_SOURCE_BRANCH" = develop ] || { echo 'rehearse runs from develop against staging'; exit 1; }
741
- case "$EBK_DISPATCH_PROBE_URL" in
742
- https://*/*/api/health) ;;
743
- *) echo 'rehearse requires probe_url in https://<router>/<kebab-slice>/api/health form'; exit 1 ;;
744
- esac
745
- ;;
746
- esac
747
- # The committed deployment plan knows deploy, refresh, unlock, and
748
- # remove; a rehearsal derives the same project inventory as deploy.
749
- plan_action="$action"
750
- [ "$action" != rehearse ] || plan_action=deploy
751
- case "$EBK_SOURCE_BRANCH" in
752
- main) stage=production ;;${options.deliveryLane === 'trunk'
753
- ? `
754
- develop) echo 'Trunk lane protected lifecycle runs from main'; exit 1 ;;`
755
- : `
756
- develop)
757
- if [ "$EBK_PROFILE" = starter ]; then
758
- stage=development
759
- else
760
- stage=staging
761
- fi
762
- ;;`}
763
- *) echo 'Protected lifecycle must run from develop or main'; exit 1 ;;
764
- esac
765
- echo "action=$action" >> "$GITHUB_OUTPUT"
766
- echo "plan_action=$plan_action" >> "$GITHUB_OUTPUT"
767
- echo "probe_url=$EBK_DISPATCH_PROBE_URL" >> "$GITHUB_OUTPUT"
768
- echo "project=$project" >> "$GITHUB_OUTPUT"
769
- echo "stage=$stage" >> "$GITHUB_OUTPUT"
770
- - id: policy
771
- name: Derive ordered projects from committed policy
772
- env:
773
- EBK_ACTION: \${{ steps.route.outputs.plan_action }}
774
- EBK_PROJECT: \${{ steps.route.outputs.project }}
775
- EBK_STAGE: \${{ steps.route.outputs.stage }}
776
- run: |
777
- set -euo pipefail
778
- args=("--action=$EBK_ACTION" "--stage=$EBK_STAGE")
779
- if [ -n "$EBK_PROJECT" ]; then args+=("--project=$EBK_PROJECT"); fi
780
- pnpm nx run ${name}:deployment-plan -- "\${args[@]}"
781
- - name: Bind generated profile
782
- env:
783
- EBK_RENDERED_PROFILE: ${deploymentProfile}
784
- EBK_REPOSITORY_PROFILE: \${{ steps.policy.outputs.deployment_profile }}
785
- run: test "$EBK_RENDERED_PROFILE" = "$EBK_REPOSITORY_PROFILE"
786
- - id: account
787
- name: Derive canonical committed stage authority
788
- env:
789
- EBK_DEVELOPMENT_ACCOUNT: \${{ steps.policy.outputs.development_account_id }}
790
- EBK_PRODUCTION_ACCOUNT: \${{ steps.policy.outputs.production_account_id }}
791
- EBK_REGION: \${{ steps.policy.outputs.deployment_region }}
792
- EBK_STAGE: \${{ steps.route.outputs.stage }}
793
- EBK_STAGING_ACCOUNT: \${{ steps.policy.outputs.staging_account_id }}
794
- run: |
795
- ${indentedScript(`set -euo pipefail\n${canonicalStageAuthorityDerivationScript()}`, 10)}${trunkPromotion
796
- ? `
797
- # Trunk promotion deploys production from the develop run, so the
798
- # production authority is derived here beside the staging authority.
799
- - id: production-account
800
- name: Derive canonical committed production authority for trunk promotion
801
- if: >-
802
- steps.route.outputs.action == 'deploy' &&
803
- steps.route.outputs.stage == 'staging' &&
804
- steps.policy.outputs.deployment_profile != 'starter' &&
805
- steps.policy.outputs.has_slices == 'true'
806
- env:
807
- EBK_DEVELOPMENT_ACCOUNT: \${{ steps.policy.outputs.development_account_id }}
808
- EBK_PRODUCTION_ACCOUNT: \${{ steps.policy.outputs.production_account_id }}
809
- EBK_REGION: \${{ steps.policy.outputs.deployment_region }}
810
- EBK_STAGE: production
811
- EBK_STAGING_ACCOUNT: \${{ steps.policy.outputs.staging_account_id }}
812
- run: |
813
- ${indentedScript(`set -euo pipefail\n${canonicalStageAuthorityDerivationScript()}`, 10)}`
814
- : ''}
815
-
816
- immutable-artifacts:
817
- name: prepare exact immutable release artifacts
818
- needs: prepare
819
- if: >-
820
- needs.prepare.outputs.action == 'deploy' &&
821
- (
822
- needs.prepare.outputs.has_slices == 'true' ||
823
- (needs.prepare.outputs.stage == 'production' && needs.prepare.outputs.profile != 'starter')
824
- )
825
- runs-on: ubuntu-latest
826
- permissions:
827
- actions: read
828
- contents: read
829
- outputs:
830
- artifact_digest: \${{ steps.current.outputs.artifact_digest || steps.staging.outputs.artifact_digest }}
831
- artifact_id: \${{ steps.current.outputs.artifact_id || steps.staging.outputs.artifact_id }}
832
- candidate_material_digest: \${{ steps.staging.outputs.candidate_material_digest }}
833
- container_artifact_digest: \${{ steps.staging.outputs.container_artifact_digest }}
834
- container_artifact_id: \${{ steps.staging.outputs.container_artifact_id }}
835
- staging_deployment_run_attempt: \${{ steps.staging.outputs.deployment_run_attempt }}
836
- staging_deployment_run_id: \${{ steps.staging.outputs.deployment_run_id }}
837
- baseline_artifact_digest: \${{ steps.baseline.outputs.artifact_digest }}
838
- baseline_artifact_id: \${{ steps.baseline.outputs.artifact_id }}
839
- baseline_commit: \${{ steps.baseline.outputs.commit }}
840
- baseline_found: \${{ steps.baseline.outputs.found }}
841
- baseline_run_id: \${{ steps.baseline.outputs.run_id }}
842
- producer_run_attempt: \${{ steps.current.outputs.producer_run_attempt || steps.staging.outputs.producer_run_attempt }}
843
- producer_run_id: \${{ steps.current.outputs.producer_run_id || steps.staging.outputs.producer_run_id }}
844
- source_commit: \${{ steps.current.outputs.source_commit || steps.staging.outputs.source_commit }}
845
- steps:
846
- - name: Check out immutable production ancestry
847
- if: needs.prepare.outputs.stage == 'production' && needs.prepare.outputs.profile != 'starter'
848
- uses: ${actionPins.checkout}
849
- with:
850
- fetch-depth: 0
851
- persist-credentials: false
852
- ref: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
853
- - id: current
854
- name: Select exact successful current-source CI candidate
855
- if: >-
856
- needs.prepare.outputs.has_slices == 'true' &&
857
- (needs.prepare.outputs.stage != 'production' || needs.prepare.outputs.profile == 'starter')
858
- env:
859
- EBK_CALLER_RUN_ATTEMPT: \${{ inputs.verify_run_attempt || '' }}
860
- EBK_CALLER_RUN_ID: \${{ inputs.verify_run_id || '' }}
861
- EBK_SOURCE_BRANCH: \${{ env.EBK_DEPLOYMENT_SOURCE_BRANCH }}
862
- EBK_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
863
- GH_REPO: \${{ github.repository }}
864
- GH_TOKEN: \${{ github.token }}
865
- run: |
866
- set -euo pipefail
867
- if [ -n "$EBK_CALLER_RUN_ID" ]; then
868
- [ -n "$EBK_CALLER_RUN_ATTEMPT" ] || exit 1
869
- run_id="$EBK_CALLER_RUN_ID"
870
- run_attempt="$EBK_CALLER_RUN_ATTEMPT"
871
- else
872
- runs="$(gh api "/repos/$GH_REPO/actions/workflows/ci.yml/runs?event=push&branch=$EBK_SOURCE_BRANCH&head_sha=$EBK_SOURCE_COMMIT&status=success&per_page=100")"
873
- producer="$(printf '%s' "$runs" | jq -c --arg branch "$EBK_SOURCE_BRANCH" --arg source "$EBK_SOURCE_COMMIT" \
874
- '[.workflow_runs[] | select(.head_sha == $source and .head_branch == $branch and .event == "push" and .conclusion == "success" and .path == ".github/workflows/ci.yml")] | if length == 1 then .[0] else empty end')"
875
- [ -n "$producer" ] || { echo 'Exact successful CI candidate producer is absent or ambiguous'; exit 1; }
876
- run_id="$(printf '%s' "$producer" | jq -r '.id // empty')"
877
- run_attempt="$(printf '%s' "$producer" | jq -r '.run_attempt // empty')"
878
- fi
879
- artifacts="$(gh api "/repos/$GH_REPO/actions/runs/$run_id/artifacts?per_page=100")"
880
- artifact="$(printf '%s' "$artifacts" | jq -c --arg source "$EBK_SOURCE_COMMIT" \
881
- '[.artifacts[] | select(.name == "release-candidate-" + $source and .expired == false)] | if length == 1 then .[0] else empty end')"
882
- [ -n "$artifact" ] || { echo 'Exact release candidate artifact is absent or ambiguous'; exit 1; }
883
- artifact_id="$(printf '%s' "$artifact" | jq -r '.id // empty')"
884
- artifact_digest="$(printf '%s' "$artifact" | jq -r '.digest // empty')"
885
- case "$run_id:$run_attempt:$artifact_id" in *[!0-9:]*) exit 1 ;; esac
886
- case "$artifact_digest" in sha256:????????????????????????????????????????????????????????????????) ;; *) exit 1 ;; esac
887
- echo "artifact_digest=$artifact_digest" >> "$GITHUB_OUTPUT"
888
- echo "artifact_id=$artifact_id" >> "$GITHUB_OUTPUT"
889
- echo "producer_run_attempt=$run_attempt" >> "$GITHUB_OUTPUT"
890
- echo "producer_run_id=$run_id" >> "$GITHUB_OUTPUT"
891
- echo "source_commit=$EBK_SOURCE_COMMIT" >> "$GITHUB_OUTPUT"
892
- - id: baseline
893
- name: Select the newest successful deployment receipt on this branch
894
- if: >-
895
- needs.prepare.outputs.has_slices == 'true' &&
896
- (needs.prepare.outputs.stage != 'production' || needs.prepare.outputs.profile == 'starter')
897
- env:
898
- EBK_SOURCE_BRANCH: \${{ env.EBK_DEPLOYMENT_SOURCE_BRANCH }}
899
- EBK_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
900
- EBK_STAGE: \${{ needs.prepare.outputs.stage }}
901
- GH_REPO: \${{ github.repository }}
902
- GH_TOKEN: \${{ github.token }}
903
- run: |
904
- set -euo pipefail
905
- # A baseline lets unchanged OCI artifacts reuse their retained evidence.
906
- # Declining is always safe: without one, every artifact is rebuilt.
907
- echo "found=false" >> "$GITHUB_OUTPUT"
908
- runs="$(gh api "/repos/$GH_REPO/actions/workflows/ci.yml/runs?event=push&branch=$EBK_SOURCE_BRANCH&status=success&per_page=50")"
909
- for candidate in $(printf '%s' "$runs" | jq -r --arg branch "$EBK_SOURCE_BRANCH" \\
910
- '.workflow_runs | sort_by(.run_number) | reverse | .[] | select(.head_branch == $branch and .event == "push" and .conclusion == "success" and .path == ".github/workflows/ci.yml") | "\\(.id):\\(.run_attempt):\\(.head_sha)"'); do
911
- IFS=':' read -r run_id run_attempt head_sha <<< "$candidate"
912
- case "$run_id:$run_attempt" in *[!0-9:]*) continue ;; esac
913
- case "$head_sha" in ????????????????????????????????????????) ;; *) continue ;; esac
914
- [ "$head_sha" != "$EBK_SOURCE_COMMIT" ] || continue
915
- # This job has no checkout on the staging path, so ancestry comes
916
- # from the API rather than a local repository (EBK-INT-2026-083).
917
- ancestry="$(gh api "/repos/$GH_REPO/compare/$head_sha...$EBK_SOURCE_COMMIT" --jq '.status' 2>/dev/null || echo unknown)"
918
- [ "$ancestry" = ahead ] || continue
919
- artifacts="$(gh api "/repos/$GH_REPO/actions/runs/$run_id/artifacts?per_page=100")"
920
- receipt="$(printf '%s' "$artifacts" | jq -c --arg name "deployment-receipt-$EBK_STAGE-$run_id-$run_attempt" \\
921
- '[.artifacts[] | select(.name == $name and .expired == false)] | if length == 1 then .[0] else empty end')"
922
- [ -n "$receipt" ] || continue
923
- artifact_id="$(printf '%s' "$receipt" | jq -r '.id // empty')"
924
- artifact_digest="$(printf '%s' "$receipt" | jq -r '.digest // empty')"
925
- case "$artifact_id" in ''|*[!0-9]*) continue ;; esac
926
- case "$artifact_digest" in sha256:????????????????????????????????????????????????????????????????) ;; *) continue ;; esac
927
- echo "artifact_digest=$artifact_digest" >> "$GITHUB_OUTPUT"
928
- echo "artifact_id=$artifact_id" >> "$GITHUB_OUTPUT"
929
- echo "commit=$head_sha" >> "$GITHUB_OUTPUT"
930
- echo "found=true" >> "$GITHUB_OUTPUT"
931
- echo "run_id=$run_id" >> "$GITHUB_OUTPUT"
932
- echo "Baseline deployment receipt: run $run_id attempt $run_attempt at $head_sha"
933
- break
934
- done
935
- - id: staging-receipt
936
- name: Select exact successful staging deployment receipt
937
- if: needs.prepare.outputs.stage == 'production' && needs.prepare.outputs.profile != 'starter'
938
- env:
939
- EBK_DEPLOYMENT_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
940
- GH_REPO: \${{ github.repository }}
941
- GH_TOKEN: \${{ github.token }}
942
- run: |
943
- set -euo pipefail
944
- parents="$(git rev-list --parents -n 1 "$EBK_DEPLOYMENT_SOURCE_COMMIT")"
945
- set -- $parents
946
- [ "$#" -eq 3 ] || { echo 'Isolated production requires one exact two-parent promotion merge'; exit 1; }
947
- [ "$1" = "$EBK_DEPLOYMENT_SOURCE_COMMIT" ] || exit 1
948
- staging_source="$3"
949
- git merge-base --is-ancestor "$staging_source" "$EBK_DEPLOYMENT_SOURCE_COMMIT" || {
950
- echo 'Staging promotion source is not an ancestor of production'; exit 1;
951
- }
952
- [ "$(git rev-parse "$EBK_DEPLOYMENT_SOURCE_COMMIT^{tree}")" = "$(git rev-parse "$staging_source^{tree}")" ] || {
953
- echo 'Production merge tree differs from the promoted staging source'; exit 1;
954
- }
955
- git show-ref --verify --quiet refs/remotes/origin/develop || {
956
- echo 'Protected develop lineage is absent from the immutable checkout'; exit 1;
957
- }
958
- git rev-list --first-parent refs/remotes/origin/develop > "$RUNNER_TEMP/develop-first-parent"
959
- grep -Fxq "$staging_source" "$RUNNER_TEMP/develop-first-parent" || {
960
- echo 'Staging promotion source is absent from protected develop first-parent history'; exit 1;
961
- }
962
- runs="$(gh api "/repos/$GH_REPO/actions/workflows/ci.yml/runs?event=push&branch=develop&head_sha=$staging_source&status=success&per_page=100")"
963
- producer="$(printf '%s' "$runs" | jq -c --arg source "$staging_source" \
964
- '[.workflow_runs[] | select(.head_sha == $source and .head_branch == "develop" and .event == "push" and .conclusion == "success" and .path == ".github/workflows/ci.yml")] | if length == 1 then .[0] else empty end')"
965
- [ -n "$producer" ] || { echo 'Exact successful staging Verify deployment is absent or ambiguous'; exit 1; }
966
- run_id="$(printf '%s' "$producer" | jq -r '.id // empty')"
967
- run_attempt="$(printf '%s' "$producer" | jq -r '.run_attempt // empty')"
968
- artifacts="$(gh api "/repos/$GH_REPO/actions/runs/$run_id/artifacts?per_page=100")"
969
- receipt_name="deployment-receipt-staging-$run_id-$run_attempt"
970
- receipt="$(printf '%s' "$artifacts" | jq -c --arg name "$receipt_name" \
971
- '[.artifacts[] | select(.name == $name and .expired == false)] | if length == 1 then .[0] else empty end')"
972
- [ -n "$receipt" ] || { echo 'Exact successful staging deployment receipt is absent or ambiguous'; exit 1; }
973
- artifact_id="$(printf '%s' "$receipt" | jq -r '.id // empty')"
974
- artifact_digest="$(printf '%s' "$receipt" | jq -r '.digest // empty')"
975
- case "$run_id:$run_attempt:$artifact_id" in *[!0-9:]*) exit 1 ;; esac
976
- case "$artifact_digest" in sha256:????????????????????????????????????????????????????????????????) ;; *) exit 1 ;; esac
977
- echo "artifact_digest=$artifact_digest" >> "$GITHUB_OUTPUT"
978
- echo "artifact_id=$artifact_id" >> "$GITHUB_OUTPUT"
979
- echo "run_attempt=$run_attempt" >> "$GITHUB_OUTPUT"
980
- echo "run_id=$run_id" >> "$GITHUB_OUTPUT"
981
- echo "source_commit=$staging_source" >> "$GITHUB_OUTPUT"
982
- - name: Restore exact staging deployment receipt
983
- if: needs.prepare.outputs.stage == 'production' && needs.prepare.outputs.profile != 'starter'
984
- uses: ${actionPins.downloadArtifact}
985
- with:
986
- artifact-ids: \${{ steps.staging-receipt.outputs.artifact_id }}
987
- github-token: \${{ github.token }}
988
- path: \${{ runner.temp }}/staging-deployment-receipt
989
- run-id: \${{ steps.staging-receipt.outputs.run_id }}
990
- - id: staging
991
- name: Bind exact staging deployment and release evidence
992
- if: needs.prepare.outputs.stage == 'production' && needs.prepare.outputs.profile != 'starter'
993
- env:
994
- EBK_STAGING_DEPLOYMENT_RUN_ATTEMPT: \${{ steps.staging-receipt.outputs.run_attempt }}
995
- EBK_STAGING_DEPLOYMENT_RUN_ID: \${{ steps.staging-receipt.outputs.run_id }}
996
- EBK_EXPECTED_HAS_SLICES: \${{ needs.prepare.outputs.has_slices }}
997
- EBK_EXPECTED_HAS_CONTAINERS: \${{ needs.prepare.outputs.has_containers }}
998
- EBK_EXPECTED_DEPLOYMENT_PROFILE: \${{ needs.prepare.outputs.profile }}
999
- EBK_EXPECTED_DEPLOYMENT_REGION: \${{ needs.prepare.outputs.region }}
1000
- EBK_EXPECTED_STAGING_ACCOUNT_ID: \${{ needs.prepare.outputs.staging_account_id }}
1001
- EBK_STAGING_RECEIPT_ARTIFACT_DIGEST: \${{ steps.staging-receipt.outputs.artifact_digest }}
1002
- EBK_STAGING_RECEIPT_ARTIFACT_ID: \${{ steps.staging-receipt.outputs.artifact_id }}
1003
- # The receipt artifact keeps .ebk/evidence as its root, so latest.json
1004
- # and promotion.json live under deployment/ (EBK-INT-2026-074).
1005
- EBK_STAGING_RECEIPT_ROOT: \${{ runner.temp }}/staging-deployment-receipt/deployment
1006
- EBK_STAGING_SOURCE_COMMIT: \${{ steps.staging-receipt.outputs.source_commit }}
1007
- GH_REPO: \${{ github.repository }}
1008
- GH_TOKEN: \${{ github.token }}
1009
- run: |
1010
- node --input-type=module <<'NODE'
1011
- ${indentedScript(stagingPromotionReceiptValidationScript(), 10)}
1012
- NODE
1013
- if [ "$EBK_EXPECTED_HAS_SLICES" = true ]; then
1014
- promotion="$EBK_STAGING_RECEIPT_ROOT/promotion.json"
1015
- candidate_run_id="$(jq -r '.candidate.producerRunId' "$promotion")"
1016
- candidate_run_attempt="$(jq -r '.candidate.producerRunAttempt' "$promotion")"
1017
- candidate_artifact_id="$(jq -r '.candidate.artifactId' "$promotion")"
1018
- candidate_artifact_digest="$(jq -r '.candidate.artifactDigest' "$promotion")"
1019
- candidate_run="$(gh api "/repos/$GH_REPO/actions/runs/$candidate_run_id")"
1020
- printf '%s' "$candidate_run" | jq -e \
1021
- --arg source "$EBK_STAGING_SOURCE_COMMIT" \
1022
- --arg attempt "$candidate_run_attempt" \
1023
- '.head_sha == $source and .head_branch == "develop" and .event == "push" and .path == ".github/workflows/ci.yml" and .conclusion == "success" and (.run_attempt | tostring) == $attempt' >/dev/null
1024
- candidate_artifacts="$(gh api "/repos/$GH_REPO/actions/runs/$candidate_run_id/artifacts?per_page=100")"
1025
- printf '%s' "$candidate_artifacts" | jq -e \
1026
- --arg id "$candidate_artifact_id" \
1027
- --arg digest "$candidate_artifact_digest" \
1028
- --arg name "release-candidate-$EBK_STAGING_SOURCE_COMMIT" \
1029
- '[.artifacts[] | select((.id | tostring) == $id and .name == $name and .digest == $digest and .expired == false)] | length == 1' >/dev/null
1030
- fi
1031
- if [ "$EBK_EXPECTED_HAS_CONTAINERS" = true ]; then
1032
- container_artifact_id="$(jq -r '.container.artifactId' "$promotion")"
1033
- container_artifact_digest="$(jq -r '.container.artifactDigest' "$promotion")"
1034
- staging_artifacts="$(gh api "/repos/$GH_REPO/actions/runs/$EBK_STAGING_DEPLOYMENT_RUN_ID/artifacts?per_page=100")"
1035
- printf '%s' "$staging_artifacts" | jq -e \
1036
- --arg id "$container_artifact_id" \
1037
- --arg digest "$container_artifact_digest" \
1038
- --arg name "container-release-staging-$EBK_STAGING_DEPLOYMENT_RUN_ID-$EBK_STAGING_DEPLOYMENT_RUN_ATTEMPT" \
1039
- '[.artifacts[] | select((.id | tostring) == $id and .name == $name and .digest == $digest and .expired == false)] | length == 1' >/dev/null
1040
- fi
1041
-
1042
- container-platform:
1043
- name: native \${{ needs.prepare.outputs.stage }} OCI \${{ matrix.project.project }} \${{ matrix.platform }}
1044
- needs: [prepare, immutable-artifacts]
1045
- if: >-
1046
- always() &&
1047
- needs.prepare.result == 'success' &&
1048
- needs.immutable-artifacts.result == 'success' &&
1049
- needs.prepare.outputs.action == 'deploy' &&
1050
- needs.prepare.outputs.has_containers == 'true' &&
1051
- (
1052
- needs.prepare.outputs.stage == 'staging' ||
1053
- (needs.prepare.outputs.stage == 'production' && needs.prepare.outputs.profile == 'starter')
1054
- )
1055
- strategy:
1056
- fail-fast: false
1057
- # One job per Slice and architecture: Slices build in parallel instead of
1058
- # looping on one runner per architecture.
1059
- matrix:
1060
- project: \${{ fromJson(needs.prepare.outputs.container_matrix) }}
1061
- # architecture is an original axis: include entries only decorate the
1062
- # matching combination. Include-only keys would be merged into every
1063
- # project and the later entry would overwrite the earlier one, so every
1064
- # Slice would build one architecture (EBK-INT-2026-081).
1065
- architecture: [amd64, arm64]
1066
- include:
1067
- - architecture: amd64
1068
- platform: linux/amd64
1069
- runner: ubuntu-latest
1070
- target: container-release-amd64
1071
- - architecture: arm64
1072
- platform: linux/arm64
1073
- runner: ubuntu-24.04-arm
1074
- target: container-release-arm64
1075
- runs-on: \${{ matrix.runner }}
1076
- environment: \${{ needs.prepare.outputs.stage }}
1077
- permissions:
1078
- actions: read
1079
- contents: read
1080
- id-token: write
1081
- env:
1082
- AWS_DEPLOY_ROLE_ARN: \${{ needs.prepare.outputs.stage_deploy_role_arn }}
1083
- AWS_EXPECTED_ACCOUNT_ID: \${{ vars.AWS_EXPECTED_ACCOUNT_ID }}
1084
- AWS_PARTITION: \${{ needs.prepare.outputs.partition }}
1085
- AWS_REGION: \${{ vars.AWS_REGION }}
1086
- EBK_ACTION: deploy
1087
- EBK_DEPLOYMENT_PROFILE: \${{ needs.prepare.outputs.profile }}
1088
- EBK_POLICY_ACCOUNT_ID: \${{ needs.prepare.outputs.account_id }}
1089
- EBK_POLICY_REGION: \${{ needs.prepare.outputs.region }}
1090
- EBK_RELEASE_SOURCE_COMMIT: \${{ needs.immutable-artifacts.outputs.source_commit }}
1091
- EBK_SOURCE_COMMIT: \${{ inputs.source_commit || github.sha }}
1092
- EBK_STAGE: \${{ needs.prepare.outputs.stage }}
1093
- EBK_SLICE_PROJECTS: \${{ needs.prepare.outputs.container_projects }}
1094
- EBK_SLICE_PROJECT: \${{ matrix.project.project }}
1095
- EBK_CONTAINER_PROJECTS: \${{ needs.prepare.outputs.container_projects }}
1096
- steps:
1097
- - name: Check out immutable container source
1098
- uses: ${actionPins.checkout}
1099
- env:
1100
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1101
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1102
- with:
1103
- fetch-depth: 0
1104
- persist-credentials: false
1105
- ref: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
1106
- - uses: ${actionPins.pnpmSetup}
1107
- env:
1108
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1109
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1110
- - uses: ${actionPins.setupNode}
1111
- env:
1112
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1113
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1114
- with:
1115
- node-version: ${toolVersions.node}
1116
- cache: pnpm
1117
- - env:
1118
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1119
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1120
- run: pnpm install --frozen-lockfile --ignore-scripts --ignore-pnpmfile
1121
- - name: Verify managed workspace integrity before container authority
1122
- env:
1123
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1124
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1125
- run: pnpm nx run ${name}:workspace-health
1126
- - name: Restore exact immutable release candidate for container build
1127
- uses: ${actionPins.downloadArtifact}
1128
- env:
1129
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1130
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1131
- with:
1132
- artifact-ids: \${{ needs.immutable-artifacts.outputs.artifact_id }}
1133
- github-token: \${{ github.token }}
1134
- path: .ebk/evidence/release-candidate
1135
- run-id: \${{ needs.immutable-artifacts.outputs.producer_run_id }}
1136
- - name: Restore the baseline deployment receipt for unchanged artifacts
1137
- if: needs.immutable-artifacts.outputs.baseline_found == 'true'
1138
- uses: ${actionPins.downloadArtifact}
1139
- env:
1140
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1141
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1142
- with:
1143
- artifact-ids: \${{ needs.immutable-artifacts.outputs.baseline_artifact_id }}
1144
- github-token: \${{ github.token }}
1145
- path: \${{ runner.temp }}/ebk-deployment-baseline
1146
- run-id: \${{ needs.immutable-artifacts.outputs.baseline_run_id }}
1147
- - name: Revalidate exact protected branch tip before OIDC
1148
- env:
1149
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1150
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1151
- EBK_SOURCE_BRANCH: \${{ env.EBK_DEPLOYMENT_SOURCE_BRANCH }}
1152
- EBK_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
1153
- GH_REPO: \${{ github.repository }}
1154
- GH_TOKEN: \${{ github.token }}
1155
- run: |
1156
- set -euo pipefail
1157
- [ "$(git rev-parse HEAD)" = "$EBK_SOURCE_COMMIT" ] || {
1158
- echo 'Deployment checkout differs from the exact protected source'; exit 1;
1159
- }
1160
- branch_tip="$(gh api "/repos/$GH_REPO/git/ref/heads/$EBK_SOURCE_BRANCH" --jq '.object.sha')"
1161
- [ "$branch_tip" = "$EBK_SOURCE_COMMIT" ] || {
1162
- echo 'Deployment source is no longer the exact protected branch tip'; exit 1;
1163
- }
1164
- - name: Assume the current stage deployment role for container build
1165
- uses: ${actionPins.configureAwsCredentials}
1166
- with:
1167
- audience: \${{ needs.prepare.outputs.oidc_audience }}
1168
- aws-region: \${{ vars.AWS_REGION }}
1169
- role-session-name: ebk-container-\${{ matrix.architecture }}-\${{ github.run_id }}-\${{ github.run_attempt }}
1170
- role-to-assume: \${{ env.AWS_DEPLOY_ROLE_ARN }}
1171
- - name: Verify exact container build authority
1172
- run: |
1173
- set -euo pipefail
1174
- [ "$AWS_EXPECTED_ACCOUNT_ID" = "$EBK_POLICY_ACCOUNT_ID" ]
1175
- [ "$AWS_REGION" = "$EBK_POLICY_REGION" ]
1176
- [ "$(aws sts get-caller-identity --query Account --output text)" = "$EBK_POLICY_ACCOUNT_ID" ]
1177
- - name: Restore the container layer and release tool caches
1178
- uses: ${actionPins.cache}
1179
- env:
1180
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1181
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1182
- with:
1183
- path: |
1184
- \${{ runner.temp }}/ebk-buildx-cache
1185
- \${{ runner.temp }}/ebk-release-tools
1186
- key: ebk-container-\${{ needs.prepare.outputs.stage }}-\${{ matrix.project.project }}-\${{ matrix.architecture }}-\${{ hashFiles('pnpm-lock.yaml') }}-\${{ github.run_id }}
1187
- restore-keys: |
1188
- ebk-container-\${{ needs.prepare.outputs.stage }}-\${{ matrix.project.project }}-\${{ matrix.architecture }}-\${{ hashFiles('pnpm-lock.yaml') }}-
1189
- ebk-container-\${{ needs.prepare.outputs.stage }}-\${{ matrix.project.project }}-\${{ matrix.architecture }}-
1190
- - name: Build and run exact native OCI artifacts
1191
- env:
1192
- EBK_BUILDX_CACHE_DIR: \${{ runner.temp }}/ebk-buildx-cache
1193
- EBK_RELEASE_TOOL_CACHE_DIR: \${{ runner.temp }}/ebk-release-tools
1194
- EBK_CONTAINER_BASELINE_COMMIT: \${{ needs.immutable-artifacts.outputs.baseline_commit }}
1195
- EBK_CONTAINER_BASELINE_ROOT: \${{ needs.immutable-artifacts.outputs.baseline_found == 'true' && format('{0}/ebk-deployment-baseline', runner.temp) || '' }}
1196
- run: |
1197
- set -euo pipefail
1198
- ${indentedScript(exactStageDeployerGuardScript('Container build', '$EBK_POLICY_ACCOUNT_ID'), 10)}
1199
- case "$EBK_SLICE_PROJECT" in
1200
- ''|-*|*-|*[!a-z0-9-]*) echo 'Container build Slice project must be an exact normalized Slice name'; exit 1 ;;
1201
- esac
1202
- case ",$EBK_CONTAINER_PROJECTS," in
1203
- *",$EBK_SLICE_PROJECT,"*) ;;
1204
- *) echo 'Container build Slice project is not in the committed deployment plan'; exit 1 ;;
1205
- esac
1206
- pnpm nx run "$EBK_SLICE_PROJECT:\${{ matrix.target }}"
1207
- - name: Retain native platform evidence
1208
- uses: ${actionPins.uploadArtifact}
1209
- with:
1210
- name: container-platform-\${{ needs.prepare.outputs.stage }}-\${{ matrix.project.project }}-\${{ matrix.architecture }}-\${{ github.run_id }}-\${{ github.run_attempt }}
1211
- if-no-files-found: error
1212
- include-hidden-files: true
1213
- retention-days: 30
1214
- # The glob keeps partials/<stage> as the artifact root: the assemble
1215
- # job merges every platform artifact into that directory and the
1216
- # container release tool reads <project>/<architecture>/ beneath it.
1217
- # A literal <project>/<architecture> path would make the architecture
1218
- # directory the root and flatten the merged restore.
1219
- path: .ebk/evidence/container-release/partials/\${{ needs.prepare.outputs.stage }}/*/\${{ matrix.architecture }}
1220
-
1221
- container-assemble:
1222
- name: assemble \${{ needs.prepare.outputs.stage }} OCI indexes
1223
- needs: [prepare, immutable-artifacts, container-platform]
1224
- if: >-
1225
- always() &&
1226
- needs.prepare.result == 'success' &&
1227
- needs.immutable-artifacts.result == 'success' &&
1228
- needs.container-platform.result == 'success' &&
1229
- needs.prepare.outputs.action == 'deploy' &&
1230
- needs.prepare.outputs.has_containers == 'true'
1231
- runs-on: ubuntu-latest
1232
- environment: \${{ needs.prepare.outputs.stage }}
1233
- permissions:
1234
- actions: read
1235
- contents: read
1236
- id-token: write
1237
- outputs:
1238
- artifact_digest: \${{ steps.retain.outputs.artifact-digest }}
1239
- artifact_id: \${{ steps.retain.outputs.artifact-id }}
1240
- env:
1241
- AWS_DEPLOY_ROLE_ARN: \${{ needs.prepare.outputs.stage_deploy_role_arn }}
1242
- AWS_EXPECTED_ACCOUNT_ID: \${{ vars.AWS_EXPECTED_ACCOUNT_ID }}
1243
- AWS_PARTITION: \${{ needs.prepare.outputs.partition }}
1244
- AWS_REGION: \${{ vars.AWS_REGION }}
1245
- EBK_ACTION: deploy
1246
- EBK_DEPLOYMENT_PROFILE: \${{ needs.prepare.outputs.profile }}
1247
- EBK_POLICY_ACCOUNT_ID: \${{ needs.prepare.outputs.account_id }}
1248
- EBK_POLICY_REGION: \${{ needs.prepare.outputs.region }}
1249
- EBK_RELEASE_SOURCE_COMMIT: \${{ needs.immutable-artifacts.outputs.source_commit }}
1250
- EBK_SOURCE_COMMIT: \${{ inputs.source_commit || github.sha }}
1251
- EBK_STAGE: \${{ needs.prepare.outputs.stage }}
1252
- EBK_SLICE_PROJECTS: \${{ needs.prepare.outputs.container_projects }}
1253
- steps:
1254
- - name: Check out immutable container source
1255
- uses: ${actionPins.checkout}
1256
- env:
1257
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1258
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1259
- with:
1260
- fetch-depth: 0
1261
- persist-credentials: false
1262
- ref: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
1263
- - uses: ${actionPins.pnpmSetup}
1264
- env:
1265
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1266
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1267
- - uses: ${actionPins.setupNode}
1268
- env:
1269
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1270
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1271
- with:
1272
- node-version: ${toolVersions.node}
1273
- cache: pnpm
1274
- - env:
1275
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1276
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1277
- run: pnpm install --frozen-lockfile --ignore-scripts --ignore-pnpmfile
1278
- - name: Verify managed workspace integrity before container authority
1279
- env:
1280
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1281
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1282
- run: pnpm nx run ${name}:workspace-health
1283
- - name: Restore exact immutable release candidate for container assembly
1284
- uses: ${actionPins.downloadArtifact}
1285
- env:
1286
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1287
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1288
- with:
1289
- artifact-ids: \${{ needs.immutable-artifacts.outputs.artifact_id }}
1290
- github-token: \${{ github.token }}
1291
- path: .ebk/evidence/release-candidate
1292
- run-id: \${{ needs.immutable-artifacts.outputs.producer_run_id }}
1293
- - name: Restore both native platform records
1294
- uses: ${actionPins.downloadArtifact}
1295
- env:
1296
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1297
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1298
- with:
1299
- pattern: container-platform-\${{ needs.prepare.outputs.stage }}-*-\${{ github.run_id }}-\${{ github.run_attempt }}
1300
- merge-multiple: true
1301
- path: .ebk/evidence/container-release/partials/\${{ needs.prepare.outputs.stage }}
1302
- - name: Revalidate exact protected branch tip before OIDC
1303
- env:
1304
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1305
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1306
- EBK_SOURCE_BRANCH: \${{ env.EBK_DEPLOYMENT_SOURCE_BRANCH }}
1307
- EBK_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
1308
- GH_REPO: \${{ github.repository }}
1309
- GH_TOKEN: \${{ github.token }}
1310
- run: |
1311
- set -euo pipefail
1312
- [ "$(git rev-parse HEAD)" = "$EBK_SOURCE_COMMIT" ] || {
1313
- echo 'Deployment checkout differs from the exact protected source'; exit 1;
1314
- }
1315
- branch_tip="$(gh api "/repos/$GH_REPO/git/ref/heads/$EBK_SOURCE_BRANCH" --jq '.object.sha')"
1316
- [ "$branch_tip" = "$EBK_SOURCE_COMMIT" ] || {
1317
- echo 'Deployment source is no longer the exact protected branch tip'; exit 1;
1318
- }
1319
- - name: Assume the current stage deployment role for container assembly
1320
- uses: ${actionPins.configureAwsCredentials}
1321
- with:
1322
- audience: \${{ needs.prepare.outputs.oidc_audience }}
1323
- aws-region: \${{ vars.AWS_REGION }}
1324
- role-session-name: ebk-container-assemble-\${{ github.run_id }}-\${{ github.run_attempt }}
1325
- role-to-assume: \${{ env.AWS_DEPLOY_ROLE_ARN }}
1326
- - name: Verify exact container assembly authority
1327
- run: |
1328
- set -euo pipefail
1329
- [ "$AWS_EXPECTED_ACCOUNT_ID" = "$EBK_POLICY_ACCOUNT_ID" ]
1330
- [ "$AWS_REGION" = "$EBK_POLICY_REGION" ]
1331
- [ "$(aws sts get-caller-identity --query Account --output text)" = "$EBK_POLICY_ACCOUNT_ID" ]
1332
- - name: Assemble exact dual-architecture indexes
1333
- run: |
1334
- set -euo pipefail
1335
- ${indentedScript(exactStageDeployerGuardScript('Container assembly', '$EBK_POLICY_ACCOUNT_ID'), 10)}
1336
- IFS=',' read -r -a projects <<< "$EBK_SLICE_PROJECTS"
1337
- for project in "\${projects[@]}"; do
1338
- test -n "$project" || continue
1339
- pnpm nx run "$project:container-release-assemble"
1340
- binding=".ebk/evidence/container-release/$EBK_STAGE/packages/$project/binding.json"
1341
- sidecar=".ebk/evidence/container-release/$EBK_STAGE/packages/$project/release-bound-binding.json"
1342
- test -f "$binding" && test ! -e "$sidecar"
1343
- cp "$binding" "$sidecar"
1344
- cmp "$binding" "$sidecar"
1345
- done
1346
- - id: retain
1347
- name: Retain exact predeploy container bundle
1348
- uses: ${actionPins.uploadArtifact}
1349
- with:
1350
- name: container-release-\${{ needs.prepare.outputs.stage }}-\${{ github.run_id }}-\${{ github.run_attempt }}
1351
- if-no-files-found: error
1352
- include-hidden-files: true
1353
- retention-days: 30
1354
- path: .ebk/evidence/container-release
1355
-
1356
- container-promote-production:
1357
- name: promote reviewed OCI indexes to production
1358
- needs: [prepare, immutable-artifacts]
1359
- if: >-
1360
- always() &&
1361
- needs.prepare.result == 'success' &&
1362
- needs.immutable-artifacts.result == 'success' &&
1363
- needs.prepare.outputs.action == 'deploy' &&
1364
- needs.prepare.outputs.stage == 'production' &&
1365
- needs.prepare.outputs.profile != 'starter' &&
1366
- needs.prepare.outputs.has_containers == 'true'
1367
- runs-on: ubuntu-latest
1368
- environment: production
1369
- permissions:
1370
- actions: read
1371
- contents: read
1372
- id-token: write
1373
- outputs:
1374
- artifact_digest: \${{ steps.retain.outputs.artifact-digest }}
1375
- artifact_id: \${{ steps.retain.outputs.artifact-id }}
1376
- env:
1377
- AWS_DEPLOY_ROLE_ARN: \${{ needs.prepare.outputs.stage_deploy_role_arn }}
1378
- AWS_EXPECTED_ACCOUNT_ID: \${{ vars.AWS_EXPECTED_ACCOUNT_ID }}
1379
- AWS_PARTITION: \${{ needs.prepare.outputs.partition }}
1380
- AWS_REGION: \${{ vars.AWS_REGION }}
1381
- EBK_ACTION: deploy
1382
- EBK_DEPLOYMENT_PROFILE: \${{ needs.prepare.outputs.profile }}
1383
- EBK_POLICY_PRODUCTION_ACCOUNT_ID: \${{ needs.prepare.outputs.account_id }}
1384
- EBK_POLICY_REGION: \${{ needs.prepare.outputs.region }}
1385
- EBK_POLICY_STAGING_ACCOUNT_ID: \${{ needs.prepare.outputs.staging_account_id }}
1386
- EBK_RELEASE_SOURCE_COMMIT: \${{ needs.immutable-artifacts.outputs.source_commit }}
1387
- EBK_SOURCE_COMMIT: \${{ inputs.source_commit || github.sha }}
1388
- EBK_STAGE: production
1389
- EBK_SLICE_PROJECTS: \${{ needs.prepare.outputs.container_projects }}
1390
- steps:
1391
- - name: Check out immutable production source
1392
- uses: ${actionPins.checkout}
1393
- env:
1394
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1395
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1396
- with:
1397
- fetch-depth: 0
1398
- persist-credentials: false
1399
- ref: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
1400
- - uses: ${actionPins.pnpmSetup}
1401
- env:
1402
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1403
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1404
- - uses: ${actionPins.setupNode}
1405
- env:
1406
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1407
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1408
- with:
1409
- node-version: ${toolVersions.node}
1410
- cache: pnpm
1411
- - env:
1412
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1413
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1414
- run: pnpm install --frozen-lockfile --ignore-scripts --ignore-pnpmfile
1415
- - name: Verify managed workspace integrity before container authority
1416
- env:
1417
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1418
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1419
- run: pnpm nx run ${name}:workspace-health
1420
- - name: Restore exact immutable release candidate for promotion
1421
- uses: ${actionPins.downloadArtifact}
1422
- env:
1423
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1424
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1425
- with:
1426
- artifact-ids: \${{ needs.immutable-artifacts.outputs.artifact_id }}
1427
- github-token: \${{ github.token }}
1428
- path: .ebk/evidence/release-candidate
1429
- run-id: \${{ needs.immutable-artifacts.outputs.producer_run_id }}
1430
- - name: Restore exact staging container bundle
1431
- uses: ${actionPins.downloadArtifact}
1432
- env:
1433
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1434
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1435
- with:
1436
- artifact-ids: \${{ needs.immutable-artifacts.outputs.container_artifact_id }}
1437
- github-token: \${{ github.token }}
1438
- path: .ebk/evidence/container-release
1439
- run-id: \${{ needs.immutable-artifacts.outputs.staging_deployment_run_id }}
1440
- - name: Revalidate exact protected branch tip before OIDC
1441
- env:
1442
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1443
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1444
- EBK_SOURCE_BRANCH: \${{ env.EBK_DEPLOYMENT_SOURCE_BRANCH }}
1445
- EBK_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
1446
- GH_REPO: \${{ github.repository }}
1447
- GH_TOKEN: \${{ github.token }}
1448
- run: |
1449
- set -euo pipefail
1450
- [ "$(git rev-parse HEAD)" = "$EBK_SOURCE_COMMIT" ] || {
1451
- echo 'Deployment checkout differs from the exact protected source'; exit 1;
1452
- }
1453
- branch_tip="$(gh api "/repos/$GH_REPO/git/ref/heads/$EBK_SOURCE_BRANCH" --jq '.object.sha')"
1454
- [ "$branch_tip" = "$EBK_SOURCE_COMMIT" ] || {
1455
- echo 'Deployment source is no longer the exact protected branch tip'; exit 1;
1456
- }
1457
- - name: Assume exact staging registry pull role
1458
- uses: ${actionPins.configureAwsCredentials}
1459
- with:
1460
- audience: \${{ needs.prepare.outputs.oidc_audience }}
1461
- aws-region: \${{ vars.AWS_STAGING_PROMOTION_REGION }}
1462
- role-session-name: ebk-staging-container-pull-\${{ github.run_id }}-\${{ github.run_attempt }}
1463
- role-to-assume: \${{ secrets.AWS_STAGING_PROMOTION_PULL_ROLE_ARN }}
1464
- - name: Authenticate exact staging source registry
1465
- env:
1466
- AWS_STAGING_PROMOTION_PULL_ROLE_ARN: \${{ secrets.AWS_STAGING_PROMOTION_PULL_ROLE_ARN }}
1467
- EBK_STAGING_ACCOUNT_ID: \${{ vars.AWS_STAGING_PROMOTION_EXPECTED_ACCOUNT_ID }}
1468
- EBK_STAGING_REGION: \${{ vars.AWS_STAGING_PROMOTION_REGION }}
1469
- run: |
1470
- set -euo pipefail
1471
- [ "$EBK_STAGING_ACCOUNT_ID" = "$EBK_POLICY_STAGING_ACCOUNT_ID" ]
1472
- [ "$EBK_STAGING_REGION" = "$EBK_POLICY_REGION" ]
1473
- ${indentedScript(exactStagingPromotionPullGuardScript(), 10)}
1474
- [ "$EBK_STAGING_ACCOUNT_ID" != "$AWS_EXPECTED_ACCOUNT_ID" ]
1475
- registry_suffix=.com
1476
- case "$EBK_STAGING_REGION" in cn-*) registry_suffix=.com.cn ;; esac
1477
- aws ecr get-login-password --region "$EBK_STAGING_REGION" |
1478
- docker login --username AWS --password-stdin \
1479
- "$EBK_STAGING_ACCOUNT_ID.dkr.ecr.$EBK_STAGING_REGION.amazonaws$registry_suffix"
1480
- - name: Revalidate exact protected branch tip before OIDC
1481
- env:
1482
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1483
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1484
- EBK_SOURCE_BRANCH: \${{ env.EBK_DEPLOYMENT_SOURCE_BRANCH }}
1485
- EBK_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
1486
- GH_REPO: \${{ github.repository }}
1487
- GH_TOKEN: \${{ github.token }}
1488
- run: |
1489
- set -euo pipefail
1490
- [ "$(git rev-parse HEAD)" = "$EBK_SOURCE_COMMIT" ] || {
1491
- echo 'Deployment checkout differs from the exact protected source'; exit 1;
1492
- }
1493
- branch_tip="$(gh api "/repos/$GH_REPO/git/ref/heads/$EBK_SOURCE_BRANCH" --jq '.object.sha')"
1494
- [ "$branch_tip" = "$EBK_SOURCE_COMMIT" ] || {
1495
- echo 'Deployment source is no longer the exact protected branch tip'; exit 1;
1496
- }
1497
- - name: Assume the production deployment role for container promotion
1498
- uses: ${actionPins.configureAwsCredentials}
1499
- with:
1500
- audience: \${{ needs.prepare.outputs.oidc_audience }}
1501
- aws-region: \${{ vars.AWS_REGION }}
1502
- role-session-name: ebk-production-container-push-\${{ github.run_id }}-\${{ github.run_attempt }}
1503
- role-to-assume: \${{ env.AWS_DEPLOY_ROLE_ARN }}
1504
- - name: Promote exact staging indexes without rebuilding
1505
- env:
1506
- EBK_STAGING_PROMOTION_EXPECTED_ACCOUNT_ID: \${{ vars.AWS_STAGING_PROMOTION_EXPECTED_ACCOUNT_ID }}
1507
- EBK_STAGING_PROMOTION_REGION: \${{ vars.AWS_STAGING_PROMOTION_REGION }}
1508
- run: |
1509
- set -euo pipefail
1510
- [ "$AWS_EXPECTED_ACCOUNT_ID" = "$EBK_POLICY_PRODUCTION_ACCOUNT_ID" ]
1511
- [ "$AWS_REGION" = "$EBK_POLICY_REGION" ]
1512
- ${indentedScript(exactStageDeployerGuardScript('Container promotion', '$AWS_EXPECTED_ACCOUNT_ID'), 10)}
1513
- IFS=',' read -r -a projects <<< "$EBK_SLICE_PROJECTS"
1514
- for project in "\${projects[@]}"; do
1515
- test -n "$project" || continue
1516
- # The container release tool resolves these against the repository
1517
- # root, so they stay repository-relative (EBK-INT-2026-077).
1518
- export EBK_CONTAINER_PROMOTION_SOURCE_BINDING_PATH=".ebk/evidence/container-release/staging/packages/$project/binding.json"
1519
- export EBK_CONTAINER_PROMOTION_SOURCE_SIDECAR_PATH=".ebk/evidence/container-release/staging/packages/$project/release-bound-binding.json"
1520
- pnpm nx run "$project:container-release-promote"
1521
- done
1522
- - id: retain
1523
- name: Retain production target container binding
1524
- uses: ${actionPins.uploadArtifact}
1525
- with:
1526
- name: container-release-production-\${{ github.run_id }}-\${{ github.run_attempt }}
1527
- if-no-files-found: error
1528
- include-hidden-files: true
1529
- retention-days: 90
1530
- path: .ebk/evidence/container-release
1531
-
1532
- execute:
1533
- name: native \${{ needs.prepare.outputs.action }} \${{ needs.prepare.outputs.stage }}
1534
- needs: [prepare, immutable-artifacts, container-assemble, container-promote-production]
1535
- if: >-
1536
- always() &&
1537
- needs.prepare.result == 'success' &&
1538
- needs.prepare.outputs.action != 'rehearse' &&
1539
- (
1540
- needs.prepare.outputs.action != 'deploy' ||
1541
- (
1542
- needs.prepare.outputs.has_slices != 'true' &&
1543
- (needs.prepare.outputs.stage != 'production' || needs.prepare.outputs.profile == 'starter')
1544
- ) || (
1545
- needs.immutable-artifacts.result == 'success' &&
1546
- (
1547
- needs.prepare.outputs.has_containers != 'true' ||
1548
- needs.prepare.outputs.stage == 'development' ||
1549
- (
1550
- (
1551
- needs.prepare.outputs.stage == 'staging' ||
1552
- (needs.prepare.outputs.stage == 'production' && needs.prepare.outputs.profile == 'starter')
1553
- ) &&
1554
- needs.container-assemble.result == 'success'
1555
- ) ||
1556
- (
1557
- needs.prepare.outputs.stage == 'production' &&
1558
- needs.prepare.outputs.profile != 'starter' &&
1559
- needs.container-promote-production.result == 'success'
1560
- )
1561
- )
1562
- )
1563
- )
1564
- runs-on: ubuntu-latest
1565
- environment: \${{ needs.prepare.outputs.stage }}
1566
- permissions:
1567
- actions: read
1568
- contents: read
1569
- id-token: write
1570
- env:
1571
- AWS_DEPLOY_ROLE_ARN: \${{ needs.prepare.outputs.stage_deploy_role_arn }}
1572
- AWS_EXPECTED_ACCOUNT_ID: \${{ vars.AWS_EXPECTED_ACCOUNT_ID }}
1573
- AWS_PARTITION: \${{ needs.prepare.outputs.partition }}
1574
- AWS_REGION: \${{ vars.AWS_REGION }}
1575
- EBK_ACTION: \${{ needs.prepare.outputs.action }}
1576
- EBK_ALLOW_PRODUCTION_REMOVE: \${{ vars.EBK_ALLOW_PRODUCTION_REMOVE }}
1577
- EBK_CANDIDATE_ARTIFACT_DIGEST: \${{ needs.immutable-artifacts.outputs.artifact_digest }}
1578
- EBK_CANDIDATE_ARTIFACT_ID: \${{ needs.immutable-artifacts.outputs.artifact_id }}
1579
- EBK_CANDIDATE_MATERIAL_DIGEST: \${{ needs.immutable-artifacts.outputs.candidate_material_digest }}
1580
- EBK_CANDIDATE_PRODUCER_RUN_ATTEMPT: \${{ needs.immutable-artifacts.outputs.producer_run_attempt }}
1581
- EBK_CANDIDATE_PRODUCER_RUN_ID: \${{ needs.immutable-artifacts.outputs.producer_run_id }}
1582
- EBK_DEPLOYMENT_PROFILE: \${{ needs.prepare.outputs.profile }}
1583
- EBK_ORDERED_PROJECTS: \${{ needs.prepare.outputs.ordered_projects }}
1584
- EBK_POLICY_ACCOUNT_ID: \${{ needs.prepare.outputs.account_id }}
1585
- EBK_POLICY_REGION: \${{ needs.prepare.outputs.region }}
1586
- EBK_RELEASE_SOURCE_COMMIT: \${{ needs.immutable-artifacts.outputs.source_commit || inputs.source_commit || github.sha }}
1587
- EBK_SITE_PROJECT: \${{ needs.prepare.outputs.site_project }}
1588
- EBK_SLICE_PROJECTS: \${{ needs.prepare.outputs.slice_projects }}
1589
- EBK_SOURCE_COMMIT: \${{ inputs.source_commit || github.sha }}
1590
- EBK_STAGE: \${{ needs.prepare.outputs.stage }}
1591
- EBK_LIFECYCLE_SCOPE: \${{ inputs.lifecycle || 'affected' }}
1592
- EBK_BASELINE_FOUND: \${{ needs.immutable-artifacts.outputs.baseline_found }}
1593
- EBK_BASELINE_RUN_ID: \${{ needs.immutable-artifacts.outputs.baseline_run_id }}
1594
- steps:
1595
- - name: Check out immutable deployment source
1596
- uses: ${actionPins.checkout}
1597
- env:
1598
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1599
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1600
- with:
1601
- fetch-depth: 0
1602
- persist-credentials: false
1603
- ref: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
1604
- - uses: ${actionPins.pnpmSetup}
1605
- env:
1606
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1607
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1608
- - uses: ${actionPins.setupNode}
1609
- env:
1610
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1611
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1612
- with:
1613
- node-version: ${toolVersions.node}
1614
- cache: pnpm
1615
- - env:
1616
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1617
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1618
- run: pnpm install --frozen-lockfile --ignore-scripts --ignore-pnpmfile
1619
- - name: Verify managed workspace integrity before AWS authority
1620
- env:
1621
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1622
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1623
- run: pnpm nx run ${name}:workspace-health
1624
- - name: Restore exact immutable release candidate
1625
- if: needs.prepare.outputs.action == 'deploy' && needs.prepare.outputs.has_slices == 'true'
1626
- uses: ${actionPins.downloadArtifact}
1627
- env:
1628
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1629
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1630
- with:
1631
- artifact-ids: \${{ needs.immutable-artifacts.outputs.artifact_id }}
1632
- github-token: \${{ github.token }}
1633
- path: .ebk/evidence/release-candidate
1634
- run-id: \${{ needs.immutable-artifacts.outputs.producer_run_id }}
1635
- - name: Restore the baseline deployment receipt for unchanged Slices
1636
- if: needs.prepare.outputs.action == 'deploy' && needs.immutable-artifacts.outputs.baseline_found == 'true'
1637
- uses: ${actionPins.downloadArtifact}
1638
- env:
1639
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1640
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1641
- with:
1642
- artifact-ids: \${{ needs.immutable-artifacts.outputs.baseline_artifact_id }}
1643
- github-token: \${{ github.token }}
1644
- path: \${{ runner.temp }}/ebk-deployment-baseline
1645
- run-id: \${{ needs.immutable-artifacts.outputs.baseline_run_id }}
1646
- - name: Restore exact current-stage container binding
1647
- if: >-
1648
- needs.prepare.outputs.action == 'deploy' &&
1649
- needs.prepare.outputs.has_containers == 'true' &&
1650
- (
1651
- needs.prepare.outputs.stage == 'staging' ||
1652
- (needs.prepare.outputs.stage == 'production' && needs.prepare.outputs.profile == 'starter')
1653
- )
1654
- uses: ${actionPins.downloadArtifact}
1655
- env:
1656
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1657
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1658
- with:
1659
- name: container-release-\${{ needs.prepare.outputs.stage }}-\${{ github.run_id }}-\${{ github.run_attempt }}
1660
- path: .ebk/evidence/container-release
1661
- - name: Restore exact promoted production container binding
1662
- if: >-
1663
- needs.prepare.outputs.action == 'deploy' &&
1664
- needs.prepare.outputs.has_containers == 'true' &&
1665
- needs.prepare.outputs.stage == 'production' &&
1666
- needs.prepare.outputs.profile != 'starter'
1667
- uses: ${actionPins.downloadArtifact}
1668
- env:
1669
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1670
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1671
- with:
1672
- name: container-release-production-\${{ github.run_id }}-\${{ github.run_attempt }}
1673
- path: .ebk/evidence/container-release
1674
- - name: Verify exact predeploy container binding inventory
1675
- if: >-
1676
- needs.prepare.outputs.action == 'deploy' &&
1677
- needs.prepare.outputs.has_containers == 'true' &&
1678
- needs.prepare.outputs.stage != 'development'
1679
- env:
1680
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1681
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1682
- EBK_CONTAINER_PROJECTS: \${{ needs.prepare.outputs.container_projects }}
1683
- run: |
1684
- set -euo pipefail
1685
- IFS=',' read -r -a projects <<< "$EBK_CONTAINER_PROJECTS"
1686
- for project in "\${projects[@]}"; do
1687
- test -n "$project" || continue
1688
- test -f ".ebk/evidence/container-release/$EBK_STAGE/packages/$project/binding.json" || {
1689
- echo "Exact predeploy container binding is absent for $project"
1690
- exit 1
1691
- }
1692
- done
1693
- - name: Verify exact restored staging-tested release candidate
1694
- if: env.EBK_ACTION == 'deploy' && env.EBK_STAGE == 'production' && needs.prepare.outputs.profile != 'starter' && needs.prepare.outputs.has_slices == 'true'
1695
- env:
1696
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1697
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1698
- run: |
1699
- node --input-type=module <<'NODE'
1700
- ${indentedScript(restoredCandidateValidationScript(), 10)}
1701
- NODE
1702
- - name: Authorize deployed Blueprint trust before protected mutation
1703
- if: env.EBK_ACTION == 'deploy'
1704
- env:
1705
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1706
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1707
- EBK_PROTECTED_BLUEPRINT_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
1708
- run: |
1709
- set -euo pipefail
1710
- case "$EBK_PROTECTED_BLUEPRINT_COMMIT" in
1711
- ''|*[!0-9a-f]*) echo 'Protected Blueprint authority must be one full lowercase Git object ID'; exit 1 ;;
1712
- esac
1713
- test "\${#EBK_PROTECTED_BLUEPRINT_COMMIT}" -eq 40 ||
1714
- test "\${#EBK_PROTECTED_BLUEPRINT_COMMIT}" -eq 64 ||
1715
- { echo 'Protected Blueprint authority must be one full Git object ID'; exit 1; }
1716
- test "$(git rev-parse HEAD)" = "$EBK_PROTECTED_BLUEPRINT_COMMIT" ||
1717
- { echo 'Protected Blueprint authority differs from the exact workflow checkout'; exit 1; }
1718
- case "$EBK_STAGE" in${developmentFromProtectedDevelop
1719
- ? `
1720
- development) protected_branch=develop ;;`
1721
- : ''}
1722
- staging) protected_branch=develop ;;
1723
- production) protected_branch=main ;;
1724
- *) exit 1 ;;
1725
- esac
1726
- node tools/blueprint-trust-check.mjs \
1727
- --operation=deploy \
1728
- --protected-branch="$protected_branch" \
1729
- --protected-ref="$EBK_PROTECTED_BLUEPRINT_COMMIT" \
1730
- --output=.ebk/evidence/supply-chain/blueprint-trust.json
1731
- - name: Produce subject-bound protected scanner evidence
1732
- if: env.EBK_ACTION == 'deploy'
1733
- env:
1734
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1735
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1736
- run: pnpm nx run ${name}:supply-chain-scan
1737
- - name: Enforce protected supply-chain policy before mutation
1738
- if: env.EBK_ACTION == 'deploy'
1739
- env:
1740
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1741
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1742
- run: pnpm nx run ${name}:supply-chain-check-protected
1743
- - name: Install pinned Playwright Chromium for deployed smoke proofs
1744
- if: env.EBK_ACTION == 'deploy' && (needs.prepare.outputs.has_slices == 'true' || needs.prepare.outputs.site_project != '')
1745
- env:
1746
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1747
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1748
- run: |
1749
- ${indentedScript(protectedBrowserInstallScript(), 10)}
1750
- ${machineCredentialRequestStep()}
1751
- ${databaseCredentialRequestStep()}
1752
- - name: Revalidate exact protected branch tip before OIDC
1753
- env:
1754
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1755
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1756
- EBK_SOURCE_BRANCH: \${{ env.EBK_DEPLOYMENT_SOURCE_BRANCH }}
1757
- EBK_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
1758
- GH_REPO: \${{ github.repository }}
1759
- GH_TOKEN: \${{ github.token }}
1760
- run: |
1761
- set -euo pipefail
1762
- [ "$(git rev-parse HEAD)" = "$EBK_SOURCE_COMMIT" ] || {
1763
- echo 'Deployment checkout differs from the exact protected source'; exit 1;
1764
- }
1765
- branch_tip="$(gh api "/repos/$GH_REPO/git/ref/heads/$EBK_SOURCE_BRANCH" --jq '.object.sha')"
1766
- [ "$branch_tip" = "$EBK_SOURCE_COMMIT" ] || {
1767
- echo 'Deployment source is no longer the exact protected branch tip'; exit 1;
1768
- }
1769
- - name: Assume the one stage deployment role
1770
- uses: ${actionPins.configureAwsCredentials}
1771
- with:
1772
- audience: \${{ needs.prepare.outputs.oidc_audience }}
1773
- aws-region: \${{ vars.AWS_REGION }}
1774
- role-session-name: ebk-native-\${{ github.run_id }}-\${{ github.run_attempt }}
1775
- role-to-assume: \${{ env.AWS_DEPLOY_ROLE_ARN }}
1776
- - name: Verify exact stage authority
1777
- run: |
1778
- set -euo pipefail
1779
- [ "$AWS_EXPECTED_ACCOUNT_ID" = "$EBK_POLICY_ACCOUNT_ID" ]
1780
- [ "$AWS_REGION" = "$EBK_POLICY_REGION" ]
1781
- ${indentedScript(exactStageDeployerGuardScript('Native lifecycle', '$EBK_POLICY_ACCOUNT_ID'), 10)}
1782
- - name: Run ordered native lifecycle targets
1783
- id: native-lifecycle
1784
- env:
1785
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1786
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1787
- EBK_GITHUB_JOB_WORKFLOW_REF: \${{ job.workflow_ref }}
1788
- GITHUB_TOKEN: \${{ github.token }}
1789
- run: |
1790
- set -euo pipefail
1791
- test -n "$AWS_DEPLOY_ROLE_ARN" || { echo 'Stage deployment role is absent'; exit 1; }
1792
- if [ "$EBK_ACTION" = deploy ]; then
1793
- case "$EBK_LIFECYCLE_SCOPE" in affected|full) ;; *) echo 'Lifecycle scope must be affected or full'; exit 1 ;; esac
1794
- baseline_arguments=()
1795
- if [ "$EBK_LIFECYCLE_SCOPE" = affected ] && [ "$EBK_BASELINE_FOUND" = true ]; then
1796
- case "$EBK_BASELINE_RUN_ID" in ''|*[!0-9]*) echo 'Baseline run id is malformed'; exit 1 ;; esac
1797
- baseline_arguments=(
1798
- --baselineReceipt="$RUNNER_TEMP/ebk-deployment-baseline/deployment/latest.json"
1799
- --baselineRunId="$EBK_BASELINE_RUN_ID"
1800
- --baselineRunAttempt=1
1801
- )
1802
- fi
1803
- pnpm nx run ${name}:deploy-local -- \
1804
- --stage="$EBK_STAGE" \
1805
- --expectedRoleArn="$AWS_DEPLOY_ROLE_ARN" \
1806
- --lifecycleScope="$EBK_LIFECYCLE_SCOPE" \
1807
- "\${baseline_arguments[@]}"
1808
- else
1809
- [ -n "$EBK_ORDERED_PROJECTS" ] || { echo 'Committed deployment order is empty'; exit 1; }
1810
- IFS=',' read -r -a projects <<< "$EBK_ORDERED_PROJECTS"
1811
- seen=,
1812
- for project in "\${projects[@]}"; do
1813
- case "$project" in ''|*[!A-Za-z0-9_-]*) exit 1 ;; esac
1814
- case "$seen" in *,"$project",*) echo "Duplicate lifecycle project: $project"; exit 1 ;; esac
1815
- seen="$seen$project,"
1816
- pnpm nx run "$project:$EBK_ACTION" -- --stage="$EBK_STAGE" --region="$AWS_REGION" --expectedRoleArn="$AWS_DEPLOY_ROLE_ARN"
1817
- done
1818
- fi
1819
- - name: Prove temporary smoke admission removed
1820
- if: always() && env.EBK_ACTION == 'deploy' && steps.native-lifecycle.outcome != 'skipped'
1821
- env:
1822
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1823
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1824
- EBK_GITHUB_JOB_WORKFLOW_REF: \${{ job.workflow_ref }}
1825
- GITHUB_TOKEN: \${{ github.token }}
1826
- run: |
1827
- set -euo pipefail
1828
- ${indentedScript(exactStageDeployerGuardScript('Smoke access cleanup', '$EBK_POLICY_ACCOUNT_ID'), 10)}
1829
- [ "$(git rev-parse HEAD)" = "$EBK_SOURCE_COMMIT" ]
1830
- git diff --quiet HEAD
1831
- node --input-type=module <<'NODE'
1832
- import { cleanupGithubPrivateSmoke } from '@empire-builder-kit/nx/foundation';
1833
- await cleanupGithubPrivateSmoke({
1834
- account: process.env.EBK_POLICY_ACCOUNT_ID,
1835
- deploymentProfile: process.env.EBK_DEPLOYMENT_PROFILE,
1836
- root: process.cwd(),
1837
- source: process.env.EBK_SOURCE_COMMIT,
1838
- stage: process.env.EBK_STAGE,
1839
- workspace: '${name}',
1840
- });
1841
- NODE
1842
- - name: Seal exact staging promotion receipt
1843
- if: env.EBK_ACTION == 'deploy' && env.EBK_STAGE == 'staging' && needs.prepare.outputs.profile != 'starter'
1844
- env:
1845
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1846
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1847
- EBK_CONTAINER_ARTIFACT_DIGEST: \${{ needs.container-assemble.outputs.artifact_digest }}
1848
- EBK_CONTAINER_ARTIFACT_ID: \${{ needs.container-assemble.outputs.artifact_id }}
1849
- EBK_HAS_SLICES: \${{ needs.prepare.outputs.has_slices }}
1850
- EBK_HAS_CONTAINERS: \${{ needs.prepare.outputs.has_containers }}
1851
- run: |
1852
- node --input-type=module <<'NODE'
1853
- ${indentedScript(stagingPromotionSealScript(), 10)}
1854
- NODE
1855
- - name: Seal exact postdeploy supply-chain binding
1856
- if: env.EBK_ACTION == 'deploy' && env.EBK_STAGE != 'development' && needs.prepare.outputs.has_slices == 'true'
1857
- env:
1858
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1859
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1860
- run: |
1861
- node --input-type=module <<'NODE'
1862
- ${indentedScript(postdeploySupplyChainBindingScript(), 10)}
1863
- NODE
1864
- - name: Retain bounded deployment receipt
1865
- if: always() && needs.prepare.outputs.action == 'deploy'
1866
- uses: ${actionPins.uploadArtifact}
1867
- with:
1868
- if-no-files-found: warn
1869
- name: deployment-receipt-\${{ needs.prepare.outputs.stage }}-\${{ github.run_id }}-\${{ github.run_attempt }}
1870
- path: |
1871
- .ebk/evidence/deployment/latest.json
1872
- .ebk/evidence/deployment/postdeploy-supply-chain.json
1873
- .ebk/evidence/deployment/promotion.json
1874
- .ebk/evidence/container-release/**
1875
- retention-days: 30
1876
- ${deploymentProfile === 'starter' ? '' : renderRehearseJob(options)}${trunkPromotion ? renderTrunkPromotionJobs(options) : ''}`;
1877
- }
1878
- /**
1879
- * Managed Router WAF blocking rehearsal (EBK-INT-2026-079). The protected
1880
- * dispatch runs the foundation rehearsal target under the staging deployment
1881
- * role with seedProbes, so the runner performs the operator probes itself
1882
- * inside the private-smoke allowlist admission, proves the admission removed,
1883
- * and opens the pull request that carries the sealed evidence and receipt
1884
- * back to develop through the ordinary review path.
1885
- */
1886
- function renderRehearseJob(options) {
1887
- const { actionPins, name, toolVersions } = options;
1888
- return `
1889
- rehearse:
1890
- name: rehearse staging Router WAF blocking
1891
- needs: prepare
1892
- if: >-
1893
- needs.prepare.result == 'success' &&
1894
- needs.prepare.outputs.action == 'rehearse' &&
1895
- needs.prepare.outputs.stage == 'staging' &&
1896
- needs.prepare.outputs.profile != 'starter'
1897
- runs-on: ubuntu-latest
1898
- environment: \${{ needs.prepare.outputs.stage }}
1899
- permissions:
1900
- actions: read
1901
- contents: write
1902
- id-token: write
1903
- pull-requests: write
1904
- env:
1905
- AWS_DEPLOY_ROLE_ARN: \${{ needs.prepare.outputs.stage_deploy_role_arn }}
1906
- AWS_EXPECTED_ACCOUNT_ID: \${{ vars.AWS_EXPECTED_ACCOUNT_ID }}
1907
- AWS_PARTITION: \${{ needs.prepare.outputs.partition }}
1908
- AWS_REGION: \${{ vars.AWS_REGION }}
1909
- EBK_ACTION: rehearse
1910
- EBK_DEPLOYMENT_PROFILE: \${{ needs.prepare.outputs.profile }}
1911
- EBK_POLICY_ACCOUNT_ID: \${{ needs.prepare.outputs.account_id }}
1912
- EBK_POLICY_REGION: \${{ needs.prepare.outputs.region }}
1913
- EBK_PROBE_URL: \${{ needs.prepare.outputs.probe_url }}
1914
- EBK_SOURCE_COMMIT: \${{ inputs.source_commit || github.sha }}
1915
- EBK_STAGE: \${{ needs.prepare.outputs.stage }}
1916
- steps:
1917
- - name: Check out immutable deployment source
1918
- uses: ${actionPins.checkout}
1919
- env:
1920
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1921
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1922
- with:
1923
- fetch-depth: 0
1924
- persist-credentials: false
1925
- ref: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
1926
- - uses: ${actionPins.pnpmSetup}
1927
- env:
1928
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1929
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1930
- - uses: ${actionPins.setupNode}
1931
- env:
1932
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1933
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1934
- with:
1935
- node-version: ${toolVersions.node}
1936
- cache: pnpm
1937
- - env:
1938
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1939
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1940
- run: pnpm install --frozen-lockfile --ignore-scripts --ignore-pnpmfile
1941
- - name: Verify managed workspace integrity before AWS authority
1942
- env:
1943
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1944
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1945
- run: pnpm nx run ${name}:workspace-health
1946
- - name: Require the exact pending rehearsal seeds
1947
- env:
1948
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1949
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1950
- run: |
1951
- set -euo pipefail
1952
- for seed in router-waf-live-evidence router-waf-blocking-rehearsal; do
1953
- [ "$(jq -r '.status // empty' "packages/foundation/security/$seed.json")" = pending ] || {
1954
- echo "packages/foundation/security/$seed.json must be reset to its pending seed before another rehearsal"; exit 1;
1955
- }
1956
- done
1957
- - name: Revalidate exact protected branch tip before OIDC
1958
- env:
1959
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1960
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1961
- EBK_SOURCE_BRANCH: \${{ env.EBK_DEPLOYMENT_SOURCE_BRANCH }}
1962
- EBK_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
1963
- GH_REPO: \${{ github.repository }}
1964
- GH_TOKEN: \${{ github.token }}
1965
- run: |
1966
- set -euo pipefail
1967
- [ "$(git rev-parse HEAD)" = "$EBK_SOURCE_COMMIT" ] || {
1968
- echo 'Deployment checkout differs from the exact protected source'; exit 1;
1969
- }
1970
- branch_tip="$(gh api "/repos/$GH_REPO/git/ref/heads/$EBK_SOURCE_BRANCH" --jq '.object.sha')"
1971
- [ "$branch_tip" = "$EBK_SOURCE_COMMIT" ] || {
1972
- echo 'Deployment source is no longer the exact protected branch tip'; exit 1;
1973
- }
1974
- - name: Assume the one stage deployment role
1975
- uses: ${actionPins.configureAwsCredentials}
1976
- with:
1977
- audience: \${{ needs.prepare.outputs.oidc_audience }}
1978
- aws-region: \${{ vars.AWS_REGION }}
1979
- role-session-name: ebk-rehearse-\${{ github.run_id }}-\${{ github.run_attempt }}
1980
- role-to-assume: \${{ env.AWS_DEPLOY_ROLE_ARN }}
1981
- - name: Verify exact stage authority
1982
- run: |
1983
- set -euo pipefail
1984
- [ "$AWS_EXPECTED_ACCOUNT_ID" = "$EBK_POLICY_ACCOUNT_ID" ]
1985
- [ "$AWS_REGION" = "$EBK_POLICY_REGION" ]
1986
- ${indentedScript(exactStageDeployerGuardScript('Router WAF rehearsal', '$EBK_POLICY_ACCOUNT_ID'), 10)}
1987
- - name: Rehearse Router WAF blocking with runner-seeded probes
1988
- id: rehearsal
1989
- env:
1990
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
1991
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
1992
- EBK_GITHUB_JOB_WORKFLOW_REF: \${{ job.workflow_ref }}
1993
- GITHUB_TOKEN: \${{ github.token }}
1994
- run: |
1995
- set -euo pipefail
1996
- test -n "$AWS_DEPLOY_ROLE_ARN" || { echo 'Stage deployment role is absent'; exit 1; }
1997
- pnpm nx run foundation:router-waf-rehearsal -- \\
1998
- --probeUrl="$EBK_PROBE_URL" \\
1999
- --seedProbes=true
2000
- - name: Prove temporary smoke admission removed
2001
- if: always() && steps.rehearsal.outcome != 'skipped'
2002
- env:
2003
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2004
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2005
- EBK_GITHUB_JOB_WORKFLOW_REF: \${{ job.workflow_ref }}
2006
- GITHUB_TOKEN: \${{ github.token }}
2007
- run: |
2008
- set -euo pipefail
2009
- ${indentedScript(exactStageDeployerGuardScript('Smoke access cleanup', '$EBK_POLICY_ACCOUNT_ID'), 10)}
2010
- [ "$(git rev-parse HEAD)" = "$EBK_SOURCE_COMMIT" ]
2011
- node --input-type=module <<'NODE'
2012
- import { cleanupGithubPrivateSmoke } from '@empire-builder-kit/nx/foundation';
2013
- await cleanupGithubPrivateSmoke({
2014
- account: process.env.EBK_POLICY_ACCOUNT_ID,
2015
- deploymentProfile: process.env.EBK_DEPLOYMENT_PROFILE,
2016
- root: process.cwd(),
2017
- source: process.env.EBK_SOURCE_COMMIT,
2018
- stage: process.env.EBK_STAGE,
2019
- workspace: '${name}',
2020
- });
2021
- NODE
2022
- - name: Retain the sealed rehearsal evidence
2023
- uses: ${actionPins.uploadArtifact}
2024
- with:
2025
- if-no-files-found: error
2026
- name: router-waf-rehearsal-\${{ github.run_id }}-\${{ github.run_attempt }}
2027
- path: |
2028
- packages/foundation/security/router-waf-live-evidence.json
2029
- packages/foundation/security/router-waf-blocking-rehearsal.json
2030
- retention-days: 90
2031
- - name: Open the rehearsal receipt pull request
2032
- env:
2033
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2034
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2035
- EBK_RUN_ATTEMPT: \${{ github.run_attempt }}
2036
- EBK_RUN_ID: \${{ github.run_id }}
2037
- GH_REPO: \${{ github.repository }}
2038
- GH_TOKEN: \${{ github.token }}
2039
- run: |
2040
- set -euo pipefail
2041
- case "$EBK_RUN_ID:$EBK_RUN_ATTEMPT" in *[!0-9:]*|:*|*:) exit 1 ;; esac
2042
- branch="ebk/router-waf-rehearsal-$EBK_RUN_ID-$EBK_RUN_ATTEMPT"
2043
- git diff --quiet -- packages/foundation/security && { echo 'The rehearsal sealed nothing new'; exit 1; }
2044
- git config user.name 'ebk-router-waf-rehearsal[bot]'
2045
- git config user.email 'ebk-router-waf-rehearsal[bot]@users.noreply.github.com'
2046
- git checkout -q -b "$branch"
2047
- git add packages/foundation/security/router-waf-live-evidence.json packages/foundation/security/router-waf-blocking-rehearsal.json
2048
- git commit -q -m "chore(security): seal the staging Router WAF blocking rehearsal (run $EBK_RUN_ID)"
2049
- # git over HTTPS authenticates with basic x-access-token, the same
2050
- # header actions/checkout persists; a bearer header makes git fall
2051
- # back to a username prompt (EBK-INT-2026-085).
2052
- authorization="$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\\n')"
2053
- git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic $authorization" push -q origin "HEAD:refs/heads/$branch"
2054
- gh pr create \\
2055
- --head "$branch" \\
2056
- --base develop \\
2057
- --title 'chore(security): seal the staging Router WAF blocking rehearsal' \\
2058
- --body "Managed rehearsal run $EBK_RUN_ID attempt $EBK_RUN_ATTEMPT sealed the staging Router WAF blocking rehearsal for the committed policy digest. Merge to unblock the production Router WAF gate; the receipt binds the exact account, Region, and policy digest."
2059
- `;
2060
- }
2061
- /**
2062
- * Trunk promotion: after a successful staging lifecycle on develop, the same
2063
- * run binds its own staging receipt, promotes the reviewed OCI indexes into
2064
- * production, deploys production, and fast-forwards main to the deployed
2065
- * commit. Every job carries the production environment so environment
2066
- * reviewers can still gate it, and every step reuses the promotion-pr scripts.
2067
- */
2068
- function renderTrunkPromotionJobs(options) {
2069
- const { actionPins, name, toolVersions } = options;
2070
- const checkoutAndInstall = (integrityStep) => ` - name: Check out immutable deployment source
2071
- uses: ${actionPins.checkout}
2072
- env:
2073
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2074
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2075
- with:
2076
- fetch-depth: 0
2077
- persist-credentials: false
2078
- ref: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
2079
- - uses: ${actionPins.pnpmSetup}
2080
- env:
2081
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2082
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2083
- - uses: ${actionPins.setupNode}
2084
- env:
2085
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2086
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2087
- with:
2088
- node-version: ${toolVersions.node}
2089
- cache: pnpm
2090
- - env:
2091
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2092
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2093
- run: pnpm install --frozen-lockfile --ignore-scripts --ignore-pnpmfile
2094
- - name: ${integrityStep}
2095
- env:
2096
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2097
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2098
- run: pnpm nx run ${name}:workspace-health`;
2099
- const revalidateTip = ` - name: Revalidate exact protected branch tip before OIDC
2100
- env:
2101
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2102
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2103
- EBK_SOURCE_BRANCH: \${{ env.EBK_DEPLOYMENT_SOURCE_BRANCH }}
2104
- EBK_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
2105
- GH_REPO: \${{ github.repository }}
2106
- GH_TOKEN: \${{ github.token }}
2107
- run: |
2108
- set -euo pipefail
2109
- [ "$(git rev-parse HEAD)" = "$EBK_SOURCE_COMMIT" ] || {
2110
- echo 'Deployment checkout differs from the exact protected source'; exit 1;
2111
- }
2112
- branch_tip="$(gh api "/repos/$GH_REPO/git/ref/heads/$EBK_SOURCE_BRANCH" --jq '.object.sha')"
2113
- [ "$branch_tip" = "$EBK_SOURCE_COMMIT" ] || {
2114
- echo 'Deployment source is no longer the exact protected branch tip'; exit 1;
2115
- }`;
2116
- const trunkPromotionGate = ` needs.prepare.outputs.action == 'deploy' &&
2117
- needs.prepare.outputs.stage == 'staging' &&
2118
- needs.prepare.outputs.profile != 'starter' &&
2119
- needs.prepare.outputs.has_slices == 'true'`;
2120
- return `
2121
- promote-production:
2122
- name: promote the staging-tested candidate to production
2123
- needs: [prepare, immutable-artifacts, container-assemble, execute]
2124
- if: >-
2125
- always() &&
2126
- needs.prepare.result == 'success' &&
2127
- needs.immutable-artifacts.result == 'success' &&
2128
- (needs.prepare.outputs.has_containers != 'true' || needs.container-assemble.result == 'success') &&
2129
- needs.execute.result == 'success' &&
2130
- ${trunkPromotionGate}
2131
- runs-on: ubuntu-latest
2132
- environment: production
2133
- permissions:
2134
- actions: read
2135
- contents: read
2136
- id-token: write
2137
- outputs:
2138
- artifact_digest: \${{ steps.retain.outputs.artifact-digest }}
2139
- artifact_id: \${{ steps.retain.outputs.artifact-id }}
2140
- candidate_artifact_digest: \${{ steps.staging.outputs.artifact_digest }}
2141
- candidate_artifact_id: \${{ steps.staging.outputs.artifact_id }}
2142
- candidate_material_digest: \${{ steps.staging.outputs.candidate_material_digest }}
2143
- candidate_producer_run_attempt: \${{ steps.staging.outputs.producer_run_attempt }}
2144
- candidate_producer_run_id: \${{ steps.staging.outputs.producer_run_id }}
2145
- env:
2146
- AWS_DEPLOY_ROLE_ARN: \${{ needs.prepare.outputs.production_deploy_role_arn }}
2147
- AWS_EXPECTED_ACCOUNT_ID: \${{ vars.AWS_EXPECTED_ACCOUNT_ID }}
2148
- AWS_PARTITION: \${{ needs.prepare.outputs.partition }}
2149
- AWS_REGION: \${{ vars.AWS_REGION }}
2150
- EBK_ACTION: deploy
2151
- EBK_DEPLOYMENT_PROFILE: \${{ needs.prepare.outputs.profile }}
2152
- EBK_POLICY_PRODUCTION_ACCOUNT_ID: \${{ needs.prepare.outputs.production_account_id }}
2153
- EBK_POLICY_REGION: \${{ needs.prepare.outputs.region }}
2154
- EBK_POLICY_STAGING_ACCOUNT_ID: \${{ needs.prepare.outputs.staging_account_id }}
2155
- EBK_RELEASE_SOURCE_COMMIT: \${{ needs.immutable-artifacts.outputs.source_commit }}
2156
- EBK_SOURCE_COMMIT: \${{ inputs.source_commit || github.sha }}
2157
- EBK_STAGE: production
2158
- EBK_SLICE_PROJECTS: \${{ needs.prepare.outputs.slice_projects }}
2159
- EBK_CONTAINER_PROJECTS: \${{ needs.prepare.outputs.container_projects }}
2160
- steps:
2161
- ${checkoutAndInstall('Verify managed workspace integrity before container authority')}
2162
- - id: staging-receipt
2163
- name: Select this run's staging deployment receipt
2164
- env:
2165
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2166
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2167
- EBK_DEPLOYMENT_RUN_ATTEMPT: \${{ github.run_attempt }}
2168
- EBK_DEPLOYMENT_RUN_ID: \${{ github.run_id }}
2169
- GH_REPO: \${{ github.repository }}
2170
- GH_TOKEN: \${{ github.token }}
2171
- run: |
2172
- set -euo pipefail
2173
- case "$EBK_DEPLOYMENT_RUN_ID:$EBK_DEPLOYMENT_RUN_ATTEMPT" in *[!0-9:]*|:*|*:) exit 1 ;; esac
2174
- artifacts="$(gh api "/repos/$GH_REPO/actions/runs/$EBK_DEPLOYMENT_RUN_ID/artifacts?per_page=100")"
2175
- receipt_name="deployment-receipt-staging-$EBK_DEPLOYMENT_RUN_ID-$EBK_DEPLOYMENT_RUN_ATTEMPT"
2176
- receipt="$(printf '%s' "$artifacts" | jq -c --arg name "$receipt_name" \\
2177
- '[.artifacts[] | select(.name == $name and .expired == false)] | if length == 1 then .[0] else empty end')"
2178
- [ -n "$receipt" ] || { echo 'This run retained no exact staging deployment receipt'; exit 1; }
2179
- artifact_id="$(printf '%s' "$receipt" | jq -r '.id // empty')"
2180
- artifact_digest="$(printf '%s' "$receipt" | jq -r '.digest // empty')"
2181
- case "$artifact_id" in ''|*[!0-9]*) exit 1 ;; esac
2182
- case "$artifact_digest" in sha256:????????????????????????????????????????????????????????????????) ;; *) exit 1 ;; esac
2183
- echo "artifact_digest=$artifact_digest" >> "$GITHUB_OUTPUT"
2184
- echo "artifact_id=$artifact_id" >> "$GITHUB_OUTPUT"
2185
- - name: Restore this run's staging deployment receipt
2186
- uses: ${actionPins.downloadArtifact}
2187
- env:
2188
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2189
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2190
- with:
2191
- artifact-ids: \${{ steps.staging-receipt.outputs.artifact_id }}
2192
- github-token: \${{ github.token }}
2193
- path: \${{ runner.temp }}/staging-deployment-receipt
2194
- - id: staging
2195
- name: Bind exact staging deployment and release evidence
2196
- env:
2197
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2198
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2199
- EBK_STAGING_DEPLOYMENT_RUN_ATTEMPT: \${{ github.run_attempt }}
2200
- EBK_STAGING_DEPLOYMENT_RUN_ID: \${{ github.run_id }}
2201
- EBK_EXPECTED_HAS_SLICES: \${{ needs.prepare.outputs.has_slices }}
2202
- EBK_EXPECTED_HAS_CONTAINERS: \${{ needs.prepare.outputs.has_containers }}
2203
- EBK_EXPECTED_DEPLOYMENT_PROFILE: \${{ needs.prepare.outputs.profile }}
2204
- EBK_EXPECTED_DEPLOYMENT_REGION: \${{ needs.prepare.outputs.region }}
2205
- EBK_EXPECTED_STAGING_ACCOUNT_ID: \${{ needs.prepare.outputs.staging_account_id }}
2206
- EBK_STAGING_RECEIPT_ARTIFACT_DIGEST: \${{ steps.staging-receipt.outputs.artifact_digest }}
2207
- EBK_STAGING_RECEIPT_ARTIFACT_ID: \${{ steps.staging-receipt.outputs.artifact_id }}
2208
- # The receipt artifact keeps .ebk/evidence as its root (EBK-INT-2026-074).
2209
- EBK_STAGING_RECEIPT_ROOT: \${{ runner.temp }}/staging-deployment-receipt/deployment
2210
- EBK_STAGING_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
2211
- GH_REPO: \${{ github.repository }}
2212
- GH_TOKEN: \${{ github.token }}
2213
- run: |
2214
- node --input-type=module <<'NODE'
2215
- ${indentedScript(stagingPromotionReceiptValidationScript(), 10)}
2216
- NODE
2217
- promotion="$EBK_STAGING_RECEIPT_ROOT/promotion.json"
2218
- candidate_run_id="$(jq -r '.candidate.producerRunId' "$promotion")"
2219
- candidate_run_attempt="$(jq -r '.candidate.producerRunAttempt' "$promotion")"
2220
- candidate_artifact_id="$(jq -r '.candidate.artifactId' "$promotion")"
2221
- candidate_artifact_digest="$(jq -r '.candidate.artifactDigest' "$promotion")"
2222
- candidate_run="$(gh api "/repos/$GH_REPO/actions/runs/$candidate_run_id")"
2223
- printf '%s' "$candidate_run" | jq -e \\
2224
- --arg source "$EBK_STAGING_SOURCE_COMMIT" \\
2225
- --arg attempt "$candidate_run_attempt" \\
2226
- '.head_sha == $source and .head_branch == "develop" and .event == "push" and .path == ".github/workflows/ci.yml" and .conclusion == "success" and (.run_attempt | tostring) == $attempt' >/dev/null
2227
- candidate_artifacts="$(gh api "/repos/$GH_REPO/actions/runs/$candidate_run_id/artifacts?per_page=100")"
2228
- printf '%s' "$candidate_artifacts" | jq -e \\
2229
- --arg id "$candidate_artifact_id" \\
2230
- --arg digest "$candidate_artifact_digest" \\
2231
- --arg name "release-candidate-$EBK_STAGING_SOURCE_COMMIT" \\
2232
- '[.artifacts[] | select((.id | tostring) == $id and .name == $name and .digest == $digest and .expired == false)] | length == 1' >/dev/null
2233
- - name: Restore exact immutable release candidate for promotion
2234
- uses: ${actionPins.downloadArtifact}
2235
- env:
2236
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2237
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2238
- with:
2239
- artifact-ids: \${{ steps.staging.outputs.artifact_id }}
2240
- github-token: \${{ github.token }}
2241
- path: .ebk/evidence/release-candidate
2242
- run-id: \${{ steps.staging.outputs.producer_run_id }}
2243
- - name: Restore this run's staging container bundle
2244
- if: needs.prepare.outputs.has_containers == 'true'
2245
- uses: ${actionPins.downloadArtifact}
2246
- env:
2247
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2248
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2249
- with:
2250
- artifact-ids: \${{ steps.staging.outputs.container_artifact_id }}
2251
- github-token: \${{ github.token }}
2252
- path: .ebk/evidence/container-release
2253
- ${revalidateTip}
2254
- - name: Assume exact staging registry pull role
2255
- if: needs.prepare.outputs.has_containers == 'true'
2256
- uses: ${actionPins.configureAwsCredentials}
2257
- with:
2258
- audience: \${{ needs.prepare.outputs.oidc_audience }}
2259
- aws-region: \${{ vars.AWS_STAGING_PROMOTION_REGION }}
2260
- role-session-name: ebk-staging-container-pull-\${{ github.run_id }}-\${{ github.run_attempt }}
2261
- role-to-assume: \${{ secrets.AWS_STAGING_PROMOTION_PULL_ROLE_ARN }}
2262
- - name: Authenticate exact staging source registry
2263
- if: needs.prepare.outputs.has_containers == 'true'
2264
- env:
2265
- AWS_STAGING_PROMOTION_PULL_ROLE_ARN: \${{ secrets.AWS_STAGING_PROMOTION_PULL_ROLE_ARN }}
2266
- EBK_STAGING_ACCOUNT_ID: \${{ vars.AWS_STAGING_PROMOTION_EXPECTED_ACCOUNT_ID }}
2267
- EBK_STAGING_REGION: \${{ vars.AWS_STAGING_PROMOTION_REGION }}
2268
- run: |
2269
- set -euo pipefail
2270
- [ "$EBK_STAGING_ACCOUNT_ID" = "$EBK_POLICY_STAGING_ACCOUNT_ID" ]
2271
- [ "$EBK_STAGING_REGION" = "$EBK_POLICY_REGION" ]
2272
- ${indentedScript(exactStagingPromotionPullGuardScript(), 10)}
2273
- [ "$EBK_STAGING_ACCOUNT_ID" != "$AWS_EXPECTED_ACCOUNT_ID" ]
2274
- registry_suffix=.com
2275
- case "$EBK_STAGING_REGION" in cn-*) registry_suffix=.com.cn ;; esac
2276
- aws ecr get-login-password --region "$EBK_STAGING_REGION" |
2277
- docker login --username AWS --password-stdin \\
2278
- "$EBK_STAGING_ACCOUNT_ID.dkr.ecr.$EBK_STAGING_REGION.amazonaws$registry_suffix"
2279
- ${revalidateTip}
2280
- - name: Assume the production deployment role for container promotion
2281
- if: needs.prepare.outputs.has_containers == 'true'
2282
- uses: ${actionPins.configureAwsCredentials}
2283
- with:
2284
- audience: \${{ needs.prepare.outputs.oidc_audience }}
2285
- aws-region: \${{ vars.AWS_REGION }}
2286
- role-session-name: ebk-production-container-push-\${{ github.run_id }}-\${{ github.run_attempt }}
2287
- role-to-assume: \${{ env.AWS_DEPLOY_ROLE_ARN }}
2288
- - name: Promote exact staging indexes without rebuilding
2289
- if: needs.prepare.outputs.has_containers == 'true'
2290
- env:
2291
- EBK_STAGING_PROMOTION_EXPECTED_ACCOUNT_ID: \${{ vars.AWS_STAGING_PROMOTION_EXPECTED_ACCOUNT_ID }}
2292
- EBK_STAGING_PROMOTION_REGION: \${{ vars.AWS_STAGING_PROMOTION_REGION }}
2293
- run: |
2294
- set -euo pipefail
2295
- [ "$AWS_EXPECTED_ACCOUNT_ID" = "$EBK_POLICY_PRODUCTION_ACCOUNT_ID" ]
2296
- [ "$AWS_REGION" = "$EBK_POLICY_REGION" ]
2297
- ${indentedScript(exactStageDeployerGuardScript('Container promotion', '$AWS_EXPECTED_ACCOUNT_ID'), 10)}
2298
- IFS=',' read -r -a projects <<< "$EBK_CONTAINER_PROJECTS"
2299
- for project in "\${projects[@]}"; do
2300
- test -n "$project" || continue
2301
- # Repository-relative for the container release tool (EBK-INT-2026-077).
2302
- export EBK_CONTAINER_PROMOTION_SOURCE_BINDING_PATH=".ebk/evidence/container-release/staging/packages/$project/binding.json"
2303
- export EBK_CONTAINER_PROMOTION_SOURCE_SIDECAR_PATH=".ebk/evidence/container-release/staging/packages/$project/release-bound-binding.json"
2304
- pnpm nx run "$project:container-release-promote"
2305
- done
2306
- - id: retain
2307
- name: Retain production target container binding
2308
- if: needs.prepare.outputs.has_containers == 'true'
2309
- uses: ${actionPins.uploadArtifact}
2310
- with:
2311
- name: container-release-production-\${{ github.run_id }}-\${{ github.run_attempt }}
2312
- if-no-files-found: error
2313
- include-hidden-files: true
2314
- retention-days: 90
2315
- path: .ebk/evidence/container-release
2316
-
2317
- execute-production:
2318
- name: native deploy production
2319
- needs: [prepare, immutable-artifacts, promote-production]
2320
- if: >-
2321
- always() &&
2322
- needs.prepare.result == 'success' &&
2323
- needs.immutable-artifacts.result == 'success' &&
2324
- needs.promote-production.result == 'success' &&
2325
- ${trunkPromotionGate}
2326
- runs-on: ubuntu-latest
2327
- environment: production
2328
- permissions:
2329
- actions: read
2330
- contents: read
2331
- id-token: write
2332
- env:
2333
- AWS_DEPLOY_ROLE_ARN: \${{ needs.prepare.outputs.production_deploy_role_arn }}
2334
- AWS_EXPECTED_ACCOUNT_ID: \${{ vars.AWS_EXPECTED_ACCOUNT_ID }}
2335
- AWS_PARTITION: \${{ needs.prepare.outputs.partition }}
2336
- AWS_REGION: \${{ vars.AWS_REGION }}
2337
- EBK_ACTION: deploy
2338
- EBK_ALLOW_PRODUCTION_REMOVE: \${{ vars.EBK_ALLOW_PRODUCTION_REMOVE }}
2339
- EBK_CANDIDATE_ARTIFACT_DIGEST: \${{ needs.promote-production.outputs.candidate_artifact_digest }}
2340
- EBK_CANDIDATE_ARTIFACT_ID: \${{ needs.promote-production.outputs.candidate_artifact_id }}
2341
- EBK_CANDIDATE_MATERIAL_DIGEST: \${{ needs.promote-production.outputs.candidate_material_digest }}
2342
- EBK_CANDIDATE_PRODUCER_RUN_ATTEMPT: \${{ needs.promote-production.outputs.candidate_producer_run_attempt }}
2343
- EBK_CANDIDATE_PRODUCER_RUN_ID: \${{ needs.promote-production.outputs.candidate_producer_run_id }}
2344
- EBK_DEPLOYMENT_PROFILE: \${{ needs.prepare.outputs.profile }}
2345
- EBK_ORDERED_PROJECTS: \${{ needs.prepare.outputs.ordered_projects }}
2346
- EBK_POLICY_ACCOUNT_ID: \${{ needs.prepare.outputs.production_account_id }}
2347
- EBK_POLICY_REGION: \${{ needs.prepare.outputs.region }}
2348
- EBK_RELEASE_SOURCE_COMMIT: \${{ needs.immutable-artifacts.outputs.source_commit || inputs.source_commit || github.sha }}
2349
- EBK_SITE_PROJECT: \${{ needs.prepare.outputs.site_project }}
2350
- EBK_SLICE_PROJECTS: \${{ needs.prepare.outputs.slice_projects }}
2351
- EBK_SOURCE_COMMIT: \${{ inputs.source_commit || github.sha }}
2352
- EBK_STAGE: production
2353
- # Production has no same-branch baseline receipt in this run; the
2354
- # full lifecycle keeps its evidence complete.
2355
- EBK_LIFECYCLE_SCOPE: full
2356
- EBK_BASELINE_FOUND: 'false'
2357
- EBK_BASELINE_RUN_ID: ''
2358
- steps:
2359
- ${checkoutAndInstall('Verify managed workspace integrity before AWS authority')}
2360
- - name: Restore exact immutable release candidate
2361
- uses: ${actionPins.downloadArtifact}
2362
- env:
2363
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2364
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2365
- with:
2366
- artifact-ids: \${{ needs.promote-production.outputs.candidate_artifact_id }}
2367
- github-token: \${{ github.token }}
2368
- path: .ebk/evidence/release-candidate
2369
- run-id: \${{ needs.promote-production.outputs.candidate_producer_run_id }}
2370
- - name: Restore exact promoted production container binding
2371
- if: needs.prepare.outputs.has_containers == 'true'
2372
- uses: ${actionPins.downloadArtifact}
2373
- env:
2374
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2375
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2376
- with:
2377
- name: container-release-production-\${{ github.run_id }}-\${{ github.run_attempt }}
2378
- path: .ebk/evidence/container-release
2379
- - name: Verify exact predeploy container binding inventory
2380
- if: needs.prepare.outputs.has_containers == 'true'
2381
- env:
2382
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2383
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2384
- EBK_CONTAINER_PROJECTS: \${{ needs.prepare.outputs.container_projects }}
2385
- run: |
2386
- set -euo pipefail
2387
- IFS=',' read -r -a projects <<< "$EBK_CONTAINER_PROJECTS"
2388
- for project in "\${projects[@]}"; do
2389
- test -n "$project" || continue
2390
- test -f ".ebk/evidence/container-release/$EBK_STAGE/packages/$project/binding.json" || {
2391
- echo "Exact predeploy container binding is absent for $project"
2392
- exit 1
2393
- }
2394
- done
2395
- - name: Verify exact restored staging-tested release candidate
2396
- env:
2397
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2398
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2399
- run: |
2400
- node --input-type=module <<'NODE'
2401
- ${indentedScript(restoredCandidateValidationScript(), 10)}
2402
- NODE
2403
- - name: Authorize deployed Blueprint trust before protected mutation
2404
- env:
2405
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2406
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2407
- EBK_PROTECTED_BLUEPRINT_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
2408
- run: |
2409
- set -euo pipefail
2410
- case "$EBK_PROTECTED_BLUEPRINT_COMMIT" in
2411
- ''|*[!0-9a-f]*) echo 'Protected Blueprint authority must be one full lowercase Git object ID'; exit 1 ;;
2412
- esac
2413
- test "\${#EBK_PROTECTED_BLUEPRINT_COMMIT}" -eq 40 ||
2414
- test "\${#EBK_PROTECTED_BLUEPRINT_COMMIT}" -eq 64 ||
2415
- { echo 'Protected Blueprint authority must be one full Git object ID'; exit 1; }
2416
- test "$(git rev-parse HEAD)" = "$EBK_PROTECTED_BLUEPRINT_COMMIT" ||
2417
- { echo 'Protected Blueprint authority differs from the exact workflow checkout'; exit 1; }
2418
- node tools/blueprint-trust-check.mjs \\
2419
- --operation=deploy \\
2420
- --protected-branch=main \\
2421
- --protected-ref="$EBK_PROTECTED_BLUEPRINT_COMMIT" \\
2422
- --output=.ebk/evidence/supply-chain/blueprint-trust.json
2423
- - name: Produce subject-bound protected scanner evidence
2424
- env:
2425
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2426
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2427
- run: pnpm nx run ${name}:supply-chain-scan
2428
- - name: Enforce protected supply-chain policy before mutation
2429
- env:
2430
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2431
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2432
- run: pnpm nx run ${name}:supply-chain-check-protected
2433
- - name: Install pinned Playwright Chromium for deployed smoke proofs
2434
- env:
2435
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2436
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2437
- run: |
2438
- ${indentedScript(protectedBrowserInstallScript(), 10)}
2439
- ${machineCredentialRequestStep()}
2440
- ${databaseCredentialRequestStep()}
2441
- ${revalidateTip}
2442
- - name: Assume the one stage deployment role
2443
- uses: ${actionPins.configureAwsCredentials}
2444
- with:
2445
- audience: \${{ needs.prepare.outputs.oidc_audience }}
2446
- aws-region: \${{ vars.AWS_REGION }}
2447
- role-session-name: ebk-native-\${{ github.run_id }}-\${{ github.run_attempt }}
2448
- role-to-assume: \${{ env.AWS_DEPLOY_ROLE_ARN }}
2449
- - name: Verify exact stage authority
2450
- run: |
2451
- set -euo pipefail
2452
- [ "$AWS_EXPECTED_ACCOUNT_ID" = "$EBK_POLICY_ACCOUNT_ID" ]
2453
- [ "$AWS_REGION" = "$EBK_POLICY_REGION" ]
2454
- ${indentedScript(exactStageDeployerGuardScript('Native lifecycle', '$EBK_POLICY_ACCOUNT_ID'), 10)}
2455
- - name: Run ordered native lifecycle targets
2456
- id: native-lifecycle
2457
- env:
2458
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2459
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2460
- EBK_GITHUB_JOB_WORKFLOW_REF: \${{ job.workflow_ref }}
2461
- GITHUB_TOKEN: \${{ github.token }}
2462
- run: |
2463
- set -euo pipefail
2464
- test -n "$AWS_DEPLOY_ROLE_ARN" || { echo 'Stage deployment role is absent'; exit 1; }
2465
- pnpm nx run ${name}:deploy-local -- \\
2466
- --stage="$EBK_STAGE" \\
2467
- --expectedRoleArn="$AWS_DEPLOY_ROLE_ARN" \\
2468
- --lifecycleScope="$EBK_LIFECYCLE_SCOPE"
2469
- - name: Prove temporary smoke admission removed
2470
- if: always() && steps.native-lifecycle.outcome != 'skipped'
2471
- env:
2472
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2473
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2474
- EBK_GITHUB_JOB_WORKFLOW_REF: \${{ job.workflow_ref }}
2475
- GITHUB_TOKEN: \${{ github.token }}
2476
- run: |
2477
- set -euo pipefail
2478
- ${indentedScript(exactStageDeployerGuardScript('Smoke access cleanup', '$EBK_POLICY_ACCOUNT_ID'), 10)}
2479
- [ "$(git rev-parse HEAD)" = "$EBK_SOURCE_COMMIT" ]
2480
- git diff --quiet HEAD
2481
- node --input-type=module <<'NODE'
2482
- import { cleanupGithubPrivateSmoke } from '@empire-builder-kit/nx/foundation';
2483
- await cleanupGithubPrivateSmoke({
2484
- account: process.env.EBK_POLICY_ACCOUNT_ID,
2485
- deploymentProfile: process.env.EBK_DEPLOYMENT_PROFILE,
2486
- root: process.cwd(),
2487
- source: process.env.EBK_SOURCE_COMMIT,
2488
- stage: process.env.EBK_STAGE,
2489
- workspace: '${name}',
2490
- });
2491
- NODE
2492
- - name: Seal exact postdeploy supply-chain binding
2493
- env:
2494
- ACTIONS_ID_TOKEN_REQUEST_TOKEN: ''
2495
- ACTIONS_ID_TOKEN_REQUEST_URL: ''
2496
- run: |
2497
- node --input-type=module <<'NODE'
2498
- ${indentedScript(postdeploySupplyChainBindingScript(), 10)}
2499
- NODE
2500
- - name: Retain bounded deployment receipt
2501
- if: always()
2502
- uses: ${actionPins.uploadArtifact}
2503
- with:
2504
- if-no-files-found: warn
2505
- name: deployment-receipt-production-\${{ github.run_id }}-\${{ github.run_attempt }}
2506
- path: |
2507
- .ebk/evidence/deployment/latest.json
2508
- .ebk/evidence/deployment/postdeploy-supply-chain.json
2509
- .ebk/evidence/deployment/promotion.json
2510
- .ebk/evidence/container-release/**
2511
- retention-days: 30
2512
-
2513
- record-main:
2514
- name: record the deployed commit on main
2515
- needs: [prepare, execute-production]
2516
- if: >-
2517
- always() &&
2518
- needs.prepare.result == 'success' &&
2519
- needs.execute-production.result == 'success' &&
2520
- ${trunkPromotionGate}
2521
- runs-on: ubuntu-latest
2522
- environment: production
2523
- # The fast-forward uses the scoped environment token, not the workflow token.
2524
- permissions:
2525
- contents: read
2526
- steps:
2527
- - name: Fast-forward protected main to the deployed commit
2528
- env:
2529
- EBK_RECORD_MAIN_TOKEN: \${{ secrets.${exports.EBK_RECORD_MAIN_TOKEN_SECRET} }}
2530
- EBK_SOURCE_BRANCH: \${{ env.EBK_DEPLOYMENT_SOURCE_BRANCH }}
2531
- EBK_SOURCE_COMMIT: \${{ env.EBK_DEPLOYMENT_SOURCE_COMMIT }}
2532
- GH_REPO: \${{ github.repository }}
2533
- run: |
2534
- set -euo pipefail
2535
- test -n "$EBK_RECORD_MAIN_TOKEN" || { echo '${exports.EBK_RECORD_MAIN_TOKEN_SECRET} is absent from the production environment'; exit 1; }
2536
- [ "$EBK_SOURCE_BRANCH" = develop ] || { echo 'Trunk promotion records main only from develop'; exit 1; }
2537
- case "$EBK_SOURCE_COMMIT" in ''|*[!0-9a-f]*) exit 1 ;; esac
2538
- export GH_TOKEN="$EBK_RECORD_MAIN_TOKEN"
2539
- develop_tip="$(gh api "/repos/$GH_REPO/git/ref/heads/develop" --jq '.object.sha')"
2540
- [ "$develop_tip" = "$EBK_SOURCE_COMMIT" ] || { echo 'Deployed commit is no longer the develop tip; leaving main unchanged'; exit 1; }
2541
- main_tip="$(gh api "/repos/$GH_REPO/git/ref/heads/main" --jq '.object.sha')"
2542
- if [ "$main_tip" = "$EBK_SOURCE_COMMIT" ]; then
2543
- echo 'main already records the deployed commit'
2544
- exit 0
2545
- fi
2546
- # GitHub refuses a non-fast-forward reference update unless force is
2547
- # requested; it is never requested here.
2548
- gh api -X PATCH "/repos/$GH_REPO/git/refs/heads/main" -f sha="$EBK_SOURCE_COMMIT" -F force=false >/dev/null
2549
- recorded="$(gh api "/repos/$GH_REPO/git/ref/heads/main" --jq '.object.sha')"
2550
- [ "$recorded" = "$EBK_SOURCE_COMMIT" ] || { echo 'main did not record the deployed commit'; exit 1; }
2551
- echo "main now records $EBK_SOURCE_COMMIT (previously $main_tip)"
2552
- `;
2553
- }
2554
- function renderThinDeployWorkflowFilePlan(options) {
2555
- assertOptions(options);
2556
- return {
2557
- files: {
2558
- [exports.THIN_DEPLOY_WORKFLOW_PATH]: renderThinDeployWorkflow(options),
2559
- },
2560
- managedPaths: [exports.THIN_DEPLOY_WORKFLOW_PATH],
2561
- };
2562
- }
2563
- //# sourceMappingURL=workspace-files-thin-deploy.js.map