@catladder/cli 5.6.0 → 5.7.0

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 (64) hide show
  1. package/dist/apps/cli/src/catci.js +22 -0
  2. package/dist/apps/cli/src/catci.js.map +1 -1
  3. package/dist/apps/cli/src/commands/index.d.ts +1 -0
  4. package/dist/apps/cli/src/commands/index.js +4 -1
  5. package/dist/apps/cli/src/commands/index.js.map +1 -1
  6. package/dist/apps/cli/src/commands/project/commandMrPin.d.ts +9 -0
  7. package/dist/apps/cli/src/commands/project/commandMrPin.js +11 -13
  8. package/dist/apps/cli/src/commands/project/commandMrPin.js.map +1 -1
  9. package/dist/apps/cli/src/commands/project/commandMrReviewApp.d.ts +21 -0
  10. package/dist/apps/cli/src/commands/project/commandMrReviewApp.js +102 -0
  11. package/dist/apps/cli/src/commands/project/commandMrReviewApp.js.map +1 -0
  12. package/dist/apps/cli/src/reviewApps/github.d.ts +10 -0
  13. package/dist/apps/cli/src/reviewApps/github.js +196 -0
  14. package/dist/apps/cli/src/reviewApps/github.js.map +1 -0
  15. package/dist/bundles/catci/index.js +4 -4
  16. package/dist/bundles/catenv/index.js +897 -25
  17. package/dist/bundles/cli/index.js +1021 -39
  18. package/dist/bundles/skills/catladder-cli/references/commands.md +13 -0
  19. package/dist/bundles/skills/catladder-config/SKILL.md +4 -0
  20. package/dist/bundles/skills/catladder-deploys/SKILL.md +6 -0
  21. package/dist/bundles/skills/catladder-pipelines/SKILL.md +79 -1
  22. package/dist/packages/pipeline/src/backends/github/GithubBackend.js +60 -3
  23. package/dist/packages/pipeline/src/backends/github/GithubBackend.js.map +1 -1
  24. package/dist/packages/pipeline/src/backends/github/aggregateCheckJob.d.ts +1 -1
  25. package/dist/packages/pipeline/src/backends/github/aggregateCheckJob.js +22 -8
  26. package/dist/packages/pipeline/src/backends/github/aggregateCheckJob.js.map +1 -1
  27. package/dist/packages/pipeline/src/backends/github/reviewDeployWorkflow.d.ts +128 -0
  28. package/dist/packages/pipeline/src/backends/github/reviewDeployWorkflow.js +510 -0
  29. package/dist/packages/pipeline/src/backends/github/reviewDeployWorkflow.js.map +1 -0
  30. package/dist/packages/pipeline/src/backends/gitlab/GitlabBackend.js +29 -4
  31. package/dist/packages/pipeline/src/backends/gitlab/GitlabBackend.js.map +1 -1
  32. package/dist/packages/pipeline/src/backends/gitlab/createGitlabPipeline.d.ts +11 -1
  33. package/dist/packages/pipeline/src/backends/gitlab/createGitlabPipeline.js +17 -5
  34. package/dist/packages/pipeline/src/backends/gitlab/createGitlabPipeline.js.map +1 -1
  35. package/dist/packages/pipeline/src/backends/gitlab/reviewDeployGate.d.ts +26 -0
  36. package/dist/packages/pipeline/src/backends/gitlab/reviewDeployGate.js +94 -0
  37. package/dist/packages/pipeline/src/backends/gitlab/reviewDeployGate.js.map +1 -0
  38. package/dist/packages/pipeline/src/deploy/base/deploy.js +10 -3
  39. package/dist/packages/pipeline/src/deploy/base/deploy.js.map +1 -1
  40. package/dist/packages/pipeline/src/index.d.ts +1 -0
  41. package/dist/packages/pipeline/src/index.js +1 -0
  42. package/dist/packages/pipeline/src/index.js.map +1 -1
  43. package/dist/packages/pipeline/src/pipeline/resolveRequirements.d.ts +2 -0
  44. package/dist/packages/pipeline/src/pipeline/resolveRequirements.js +3 -2
  45. package/dist/packages/pipeline/src/pipeline/resolveRequirements.js.map +1 -1
  46. package/dist/packages/pipeline/src/reviewApps.d.ts +38 -0
  47. package/dist/packages/pipeline/src/reviewApps.js +86 -0
  48. package/dist/packages/pipeline/src/reviewApps.js.map +1 -0
  49. package/dist/packages/pipeline/src/reviewAppsPolicy.d.ts +46 -0
  50. package/dist/packages/pipeline/src/reviewAppsPolicy.js +37 -0
  51. package/dist/packages/pipeline/src/reviewAppsPolicy.js.map +1 -0
  52. package/dist/packages/pipeline/src/types/config.d.ts +55 -0
  53. package/dist/packages/pipeline/src/types/config.js.map +1 -1
  54. package/dist/skills/catladder-cli/references/commands.md +13 -0
  55. package/dist/skills/catladder-config/SKILL.md +4 -0
  56. package/dist/skills/catladder-deploys/SKILL.md +6 -0
  57. package/dist/skills/catladder-pipelines/SKILL.md +79 -1
  58. package/dist/tsconfig.tsbuildinfo +1 -1
  59. package/package.json +1 -1
  60. package/src/catci.ts +29 -0
  61. package/src/commands/index.ts +4 -0
  62. package/src/commands/project/commandMrPin.ts +15 -14
  63. package/src/commands/project/commandMrReviewApp.ts +143 -0
  64. package/src/reviewApps/github.ts +253 -0
@@ -86,6 +86,19 @@ pin the review apps of a merge request (disable their auto-stop) by adding the p
86
86
  - `mr` (positional): merge request IID (defaults to the open MR of the current branch)
87
87
  - `--pipeline`: trigger a merge-request pipeline so the pin takes effect immediately
88
88
 
89
+ ## `catladder mr review-app-off [mr]`
90
+
91
+ stop deploying the review apps of a merge request: switches the reviewApps label off (opt-in: removes it, opt-out: adds the skip label). Running review apps stay until the MR closes or they auto-stop
92
+
93
+ - `mr` (positional): merge request IID (defaults to the open MR of the current branch)
94
+
95
+ ## `catladder mr review-app-on [mr]`
96
+
97
+ deploy the review apps of a merge request: switches the reviewApps label on (opt-in: adds it, opt-out: removes the skip label) and triggers a pipeline, since gitlab doesn't start one for label changes
98
+
99
+ - `mr` (positional): merge request IID (defaults to the open MR of the current branch)
100
+ - `--pipeline`: trigger a merge-request pipeline so the review apps deploy now
101
+
89
102
  ## `catladder mr unpin [mr]`
90
103
 
91
104
  unpin the review apps of a merge request — the auto-stop timer re-arms with the next deploy
@@ -104,6 +104,10 @@ Key concepts:
104
104
  affects both). The object form separates the axes:
105
105
  `inherit: { config: "dev" }` inherits config only,
106
106
  `inherit: { config: "dev", secrets: "dev" }` both.
107
+ - **Review apps**: top-level `reviewApps: { deploy, label, skipLabel,
108
+ drafts }` decides whether merge/pull requests deploy their review
109
+ apps — every MR/PR (default), opt-in or opt-out by label, or on
110
+ request; and what drafts run. See the `catladder-pipelines` skill.
107
111
  - **Pipelines**: `pipelines: { gitlab: true, github: true }` selects
108
112
  which CI systems get generated files. Options objects instead of
109
113
  `true` allow per-pipeline settings (e.g. `runnerVariables`,
@@ -46,6 +46,12 @@ is `auto`.** Set per component or per environment (`env.<name>.deploy`).
46
46
  `waitFor: ["otherComponent"]` (experimental) makes a deploy wait for
47
47
  another component to deploy first.
48
48
 
49
+ Whether merge/pull requests deploy review apps at all (opt-in/opt-out
50
+ by label, drafts, deploy on request for all components at once) is the
51
+ project-wide top-level `reviewApps` config — see the
52
+ `catladder-pipelines` skill. With it set, per-component `when` of the
53
+ review env is ignored.
54
+
49
55
  ## Environment lifetimes
50
56
 
51
57
  Review apps auto-stop after 1 week, dev environments after 4 weeks
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: catladder-pipelines
3
- description: Understanding and debugging the CI/CD pipelines catladder generates (GitLab CI and GitHub Actions) — pipeline triggers, stages, environments, caching, job images, releases, and infrastructure drift. Use when investigating failing CI jobs, when asked why/when a job runs, when changing caching or job behavior, when deployments misbehave, or when a review app stopped/expired or should be kept alive (pinning). Triggers on "pipeline", "CI job", "gitlab-ci", "workflow", "deploy failed", "cache", "release", "auto-stop", "review app stopped", "pin review app", "keep review app".
3
+ description: Understanding and debugging the CI/CD pipelines catladder generates (GitLab CI and GitHub Actions) — pipeline triggers, stages, environments, caching, job images, releases, and infrastructure drift. Use when investigating failing CI jobs, when asked why/when a job runs, when changing caching or job behavior, when deployments misbehave, when a review app should (not) be deployed for a merge/pull request (opt-in/opt-out labels, drafts, deploy on request), or when a review app stopped/expired or should be kept alive (pinning). Triggers on "pipeline", "CI job", "gitlab-ci", "workflow", "deploy failed", "cache", "release", "auto-stop", "review app stopped", "pin review app", "keep review app", "deploy review app", "review app label", "skip review app", "draft PR", "reviewApps".
4
4
  ---
5
5
 
6
6
  # How catladder pipelines work
@@ -82,6 +82,84 @@ started keeps _itself_ alive — under gitlab's own default
82
82
  (`conservative`, which catladder overrides) it would shield the whole
83
83
  pipeline from cancellation.
84
84
 
85
+ ## When review apps deploy (`reviewApps`)
86
+
87
+ By default every merge/pull request deploys its review apps. Projects
88
+ with many MRs/PRs (e.g. opened by agents) can put the review delivery
89
+ chains — docker image → deploy → verify, for all components — behind
90
+ ONE switch per MR/PR with the top-level `reviewApps` config. Tests,
91
+ lint and audit always run; only the delivery waits.
92
+
93
+ ```ts
94
+ reviewApps: {
95
+ deploy: "optIn", // auto (default) | manual | optIn | optOut
96
+ // label: "catladder:review-app", // optIn label (default)
97
+ // skipLabel: "catladder:no-review-app", // optOut label (default)
98
+ drafts: "checksOnly", // likeReady (default) | checksOnly (no review apps) | skip (no pipeline)
99
+ },
100
+ ```
101
+
102
+ - `optIn`: deploys only while the MR/PR carries `label`.
103
+ - `optOut`: deploys unless it carries `skipLabel`.
104
+ - `manual`: never on its own — only on request.
105
+ - `drafts: "checksOnly"`: drafts run tests, lint and audit only, the review apps deploy once the
106
+ MR/PR is marked ready; `"skip"`: drafts run nothing.
107
+ - Per-component `deploy.when` of the review env is ignored then.
108
+
109
+ **GitHub** — like gitlab, the review workflow decides at its start
110
+ from the PR's labels and draft state: when the policy says deploy, the
111
+ chains run in the same run (one app build). Whatever changes later goes
112
+ through the `▶️ catladder deploy review` workflow
113
+ (`catladder-deploy-review.yml`, which rebuilds the app):
114
+
115
+ - when the review workflow is green but didn't deploy, its last job
116
+ (`▶️ trigger review deploy`) reads the PR's labels/draft state again
117
+ and dispatches the deploy if the policy now says so — a label set
118
+ while CI ran counts;
119
+ - switching the label on (opt-in: add `label`, opt-out: remove
120
+ `skipLabel`) deploys right away if the PR's `catladder ✅` is green;
121
+ switching it off stops the review apps (`🛑 catladder stop review
122
+ app`), and so does closing the PR — the stop first waits for a
123
+ review run of the PR that may still be deploying (on close it
124
+ cancels it), so a late deploy can't outlive the teardown;
125
+ - on request, any time (agents included):
126
+ `gh workflow run catladder-deploy-review.yml --ref <pr-branch> -f pr=<number>`
127
+ — explicit requests always deploy, but need the PR open and its CI
128
+ green (the run reuses the green CI instead of re-running tests);
129
+ - merge gates wait for **`catladder review app ✅`** (stable name,
130
+ independent of the components), the last job of whichever run
131
+ deploys. It also sets the commit status `catladder review app` on
132
+ the PR head (`success`/`failure`; the deploy workflow marks it
133
+ `pending` first) — dispatched runs are attached to the commit but not
134
+ listed on the pull request, the commit status is. A run that doesn't
135
+ deploy, or is cancelled (superseded, stopped), reports nothing — a
136
+ gate must treat a missing or `pending` status on the current head as
137
+ "wait". In the review run a skipped chain doesn't
138
+ fail `catladder ✅`, a failed one does;
139
+ - `gh pr edit <number> --add-label catladder:review-app` is the
140
+ agent-friendly opt-in. Labels set with the workflow's own
141
+ `GITHUB_TOKEN` (from inside a workflow) trigger nothing — use a user
142
+ or app token;
143
+ - the dispatch only works once the workflow exists on the default
144
+ branch (github rule) — the PR introducing `reviewApps` can't dispatch
145
+ yet.
146
+
147
+ A single component with `env.review.deploy.when: "manual"` (and no
148
+ `reviewApps`) uses the same workflow for just that component, without
149
+ the automatic trigger.
150
+
151
+ **GitLab** — a `🚀 deploy review` job in the MR pipeline is the
152
+ switch: the docker and deploy jobs of all components `need` it. The
153
+ policy decides whether it starts on its own (label set / opt-out not
154
+ set) or waits as a manual job; playing it any time deploys (early
155
+ clicks wait for builds and tests). It has `allow_failure: true`, so an
156
+ unplayed switch leaves the pipeline green. Label changes don't start
157
+ a pipeline on gitlab — use `yarn catladder mr review-app-on` (sets the
158
+ label and triggers a pipeline) / `mr review-app-off`. Drafts are
159
+ detected by their title prefix (`Draft:`, `[Draft]`, `(Draft)`); with
160
+ `drafts: "skip"` marking an MR ready starts no pipeline, the next push
161
+ does.
162
+
85
163
  ## Review-app auto-stop and pinning (GitLab)
86
164
 
87
165
  GitLab review environments stop automatically after 1 week, dev
@@ -16,6 +16,8 @@ const aggregateCheckJob_1 = require("./aggregateCheckJob");
16
16
  const shippedCatci_1 = require("../../catci/shippedCatci");
17
17
  const githubReleaseJobs_1 = require("./githubReleaseJobs");
18
18
  const scriptFiles_1 = require("./scriptFiles");
19
+ const reviewApps_1 = require("../../reviewApps");
20
+ const reviewDeployWorkflow_1 = require("./reviewDeployWorkflow");
19
21
  const WORKFLOWS_FOLDER = ".github/workflows";
20
22
  /**
21
23
  * generated workflow files are prefixed so that cleanup never touches
@@ -111,6 +113,7 @@ class GithubBackend {
111
113
  ...(0, ciVariables_1.getGithubInjectedWorkflowEnv)(images.registryImageRef()),
112
114
  ...(0, index_1.getPipelineOptions)(config, this.type).runnerVariables,
113
115
  };
116
+ const reviewApps = (0, reviewApps_1.getReviewAppsConfig)(config);
114
117
  const reviewStopJobs = {};
115
118
  // jobs routed to the per-kind workflow_dispatch workflows (deploy /
116
119
  // stop / rollback). A manual job and its build closure live there
@@ -153,6 +156,39 @@ class GithubBackend {
153
156
  triggerJobs.delete(id);
154
157
  }
155
158
  }
159
+ // review delivery chains behind the per-PR deploy switch move to
160
+ // their own workflow (reviewApps config, or manual review deploys)
161
+ // When the label/draft policy already decides at the start of the
162
+ // review run, the chains stay in it behind that condition (one
163
+ // run, one app build); the review deploy workflow handles whatever
164
+ // changes later. Manual review deploys only live there.
165
+ let inRunDeliveryIds = [];
166
+ const inRunCondition = (0, reviewApps_1.isReviewDeployGated)(reviewApps)
167
+ ? (0, reviewDeployWorkflow_1.getInRunDeployCondition)(reviewApps)
168
+ : undefined;
169
+ if (trigger === "mr") {
170
+ const deliveryIds = (0, reviewDeployWorkflow_1.getGatedReviewDeliveryJobIds)(triggerJobs, reviewApps);
171
+ if (deliveryIds.length > 0) {
172
+ workflows[reviewDeployWorkflow_1.REVIEW_DEPLOY_WORKFLOW_FILE] = (0, reviewDeployWorkflow_1.makeReviewDeployWorkflow)({
173
+ deliveryIds,
174
+ triggerJobs,
175
+ reviewApps,
176
+ images,
177
+ workflowEnv,
178
+ permissions: workflowPermissions(images).permissions,
179
+ });
180
+ if (inRunCondition) {
181
+ inRunDeliveryIds = deliveryIds;
182
+ for (const id of deliveryIds) {
183
+ const entry = triggerJobs.get(id);
184
+ entry.githubJob = (0, reviewDeployWorkflow_1.withInRunCondition)(entry.githubJob, inRunCondition);
185
+ }
186
+ }
187
+ else {
188
+ deliveryIds.forEach((id) => triggerJobs.delete(id));
189
+ }
190
+ }
191
+ }
156
192
  // leaf manual jobs: an explicit manual gate (e.g. a prod deploy) or
157
193
  // a stop/rollback task with no automatic trigger. Each becomes a
158
194
  // dispatch choice.
@@ -256,7 +292,7 @@ class GithubBackend {
256
292
  }
257
293
  if (Object.keys(jobs).length > 0) {
258
294
  const workflowJobs = { ...(0, ensureImageJobs_1.makeEnsureImageGithubJobs)(images), ...jobs };
259
- workflows[`${GENERATED_FILE_PREFIX}${workflowFileName(trigger)}`] = {
295
+ const workflow = {
260
296
  ...getTriggerWorkflow(trigger),
261
297
  ...workflowPermissions(images),
262
298
  env: workflowEnv,
@@ -268,13 +304,30 @@ class GithubBackend {
268
304
  // required. Added at finalization so its needs cover the
269
305
  // image-build jobs too.
270
306
  jobs: trigger === "mr"
271
- ? { ...workflowJobs, ...(0, aggregateCheckJob_1.makeAggregateCheckJob)(workflowJobs) }
307
+ ? {
308
+ ...workflowJobs,
309
+ ...(0, aggregateCheckJob_1.makeAggregateCheckJob)(workflowJobs, inRunDeliveryIds),
310
+ // the stable review app result of an in-run deploy
311
+ ...(inRunCondition && inRunDeliveryIds.length > 0
312
+ ? (0, reviewDeployWorkflow_1.makeReviewAppAggregateJob)(inRunDeliveryIds, inRunCondition)
313
+ : {}),
314
+ // once green, hand over to the review deploy workflow
315
+ // when the PR deploys but this run didn't
316
+ ...(workflows[reviewDeployWorkflow_1.REVIEW_DEPLOY_WORKFLOW_FILE] &&
317
+ (0, reviewApps_1.isReviewDeployGated)(reviewApps)
318
+ ? (0, reviewDeployWorkflow_1.makeReviewDeployTriggerJob)(reviewApps, inRunCondition)
319
+ : {}),
320
+ }
272
321
  : workflowJobs,
273
322
  };
323
+ workflows[`${GENERATED_FILE_PREFIX}${workflowFileName(trigger)}`] =
324
+ trigger === "mr" && reviewApps.drafts === "skip"
325
+ ? (0, reviewDeployWorkflow_1.withDraftsSkipped)(workflow)
326
+ : workflow;
274
327
  }
275
328
  }
276
329
  if (Object.keys(reviewStopJobs).length > 0) {
277
- workflows[`${GENERATED_FILE_PREFIX}review-stop.yml`] = {
330
+ const reviewStopWorkflow = {
278
331
  name: "🛑 catladder stop review app",
279
332
  on: {
280
333
  pull_request: { types: ["closed"] },
@@ -301,6 +354,10 @@ class GithubBackend {
301
354
  },
302
355
  jobs: { ...(0, ensureImageJobs_1.makeEnsureImageGithubJobs)(images), ...reviewStopJobs },
303
356
  };
357
+ workflows[`${GENERATED_FILE_PREFIX}review-stop.yml`] = workflows[reviewDeployWorkflow_1.REVIEW_DEPLOY_WORKFLOW_FILE]
358
+ ? (0, reviewDeployWorkflow_1.withReviewStopSwitch)(reviewStopWorkflow, reviewApps, (0, reviewApps_1.isReviewDeployGated)(reviewApps) &&
359
+ (0, reviewDeployWorkflow_1.getInRunDeployCondition)(reviewApps) !== undefined)
360
+ : reviewStopWorkflow;
304
361
  }
305
362
  for (const [kind, bucket] of Object.entries(manualKindBuckets)) {
306
363
  if (Object.keys(bucket.jobs).length === 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"GithubBackend.js","sourceRoot":"","sources":["../../../../../../../../packages/pipeline/src/backends/github/GithubBackend.ts"],"names":[],"mappings":";;;AAAA,0CAAkD;AAClD,+BAA4B;AAC5B,gEAA6D;AAO7D,+CAA4E;AAC5E,gEAA0E;AAI1E,+CAA6D;AAC7D,mDAA6D;AAC7D,oCAA8C;AAC9C,yDAI4B;AAC5B,oEAAiE;AACjE,uDAA8D;AAC9D,2DAA4D;AAC5D,2DAAkE;AAClE,2DAK6B;AAC7B,+CAAyE;AAEzE,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAE7C;;;GAGG;AACH,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAE3C,sEAAsE;AACtE,oEAAoE;AACpE,oEAAoE;AACpE,kEAAkE;AAClE,iEAAiE;AACjE,MAAM,iBAAiB,GAGnB;IACF,EAAE,EAAE;QACF,IAAI,EAAE,sBAAs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C7D,MAAM,EAAE,qBAAqB;IAC7B,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,uBAAuB;CAClC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,GAAiB,EAAc,EAAE,CACnD,GAAG,CAAC,KAAK,KAAK,MAAM;IAClB,CAAC,CAAC,MAAM;IACR,CAAC,CAAC,GAAG,CAAC,KAAK,KAAK,UAAU;QACxB,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,QAAQ,CAAC"}
1
+ {"version":3,"file":"GithubBackend.js","sourceRoot":"","sources":["../../../../../../../../packages/pipeline/src/backends/github/GithubBackend.ts"],"names":[],"mappings":";;;AAAA,0CAAkD;AAClD,+BAA4B;AAC5B,gEAA6D;AAO7D,+CAA4E;AAC5E,gEAA0E;AAI1E,+CAA6D;AAC7D,mDAA6D;AAC7D,oCAA8C;AAC9C,yDAI4B;AAC5B,oEAAiE;AACjE,uDAA8D;AAC9D,2DAA4D;AAC5D,2DAAkE;AAClE,2DAK6B;AAC7B,+CAAyE;AACzE,iDAA4E;AAC5E,iEAUgC;AAEhC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAE7C;;;GAGG;AACH,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAE3C,sEAAsE;AACtE,oEAAoE;AACpE,oEAAoE;AACpE,kEAAkE;AAClE,iEAAiE;AACjE,MAAM,iBAAiB,GAGnB;IACF,EAAE,EAAE;QACF,IAAI,EAAE,sBAAsB;QAC5B,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,UAAU,CAAC,EAAE,EAAE;QACtE,WAAW,EAAE;YACX,KAAK,EAAE,6CAA6C;YACpD,oBAAoB,EAAE,IAAI;SAC3B;KACF;IACD,UAAU,EAAE;QACV,IAAI,EAAE,oBAAoB;QAC1B,6CAA6C;QAC7C,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EA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iB,EAAE,EAAE;;IAC9D,OAAA,CAAA,MAAA,GAAG,CAAC,WAAW,0CAAE,MAAM,MAAK,MAAM;QAClC,OAAO,CAAC,IAAI,KAAK,WAAW;QAC5B,qEAAqE;QACrE,oEAAoE;QACpE,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAA;CAAA,CAAC;AAEjD;;;;GAIG;AACH,MAAM,eAAe,GAAG,CAAC,GAAiB,EAAE,EAAE,CAC5C,GAAG,CAAC,KAAK,KAAK,MAAM,IAAI,GAAG,CAAC,KAAK,KAAK,UAAU,CAAC;AAsBnD,MAAM,0BAA0B,GAA+B;IAC7D,MAAM,EAAE,qBAAqB;IAC7B,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,uBAAuB;CAClC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,GAAiB,EAAc,EAAE,CACnD,GAAG,CAAC,KAAK,KAAK,MAAM;IAClB,CAAC,CAAC,MAAM;IACR,CAAC,CAAC,GAAG,CAAC,KAAK,KAAK,UAAU;QACxB,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,QAAQ,CAAC"}
@@ -23,4 +23,4 @@ export declare const AGGREGATE_CHECK_JOB_NAME = "catladder \u2705";
23
23
  * `success` to `needs` even when red, so they stay non-blocking here
24
24
  * by the same mechanism that keeps their workflow green.
25
25
  */
26
- export declare const makeAggregateCheckJob: (reviewJobs: Record<string, GithubJob>) => Record<string, GithubJob>;
26
+ export declare const makeAggregateCheckJob: (reviewJobs: Record<string, GithubJob>, skippable?: string[]) => Record<string, GithubJob>;
@@ -25,7 +25,12 @@ exports.AGGREGATE_CHECK_JOB_NAME = "catladder ✅";
25
25
  * `success` to `needs` even when red, so they stay non-blocking here
26
26
  * by the same mechanism that keeps their workflow green.
27
27
  */
28
- const makeAggregateCheckJob = (reviewJobs) => ({
28
+ const makeAggregateCheckJob = (reviewJobs,
29
+ /**
30
+ * jobs that may be skipped on purpose (review delivery chains behind
31
+ * the reviewApps switch) — their skip is no failure, their failure is
32
+ */
33
+ skippable = []) => ({
29
34
  [exports.AGGREGATE_CHECK_JOB_ID]: {
30
35
  name: exports.AGGREGATE_CHECK_JOB_NAME,
31
36
  "runs-on": "ubuntu-latest",
@@ -36,13 +41,22 @@ const makeAggregateCheckJob = (reviewJobs) => ({
36
41
  name: exports.AGGREGATE_CHECK_JOB_NAME,
37
42
  // the needs context only interpolates inside the workflow file,
38
43
  // so this script stays inline
39
- run: [
40
- `results='\${{ toJSON(needs) }}'`,
41
- `echo "$results"`,
42
- `if echo "$results" | grep -qE '"result": "(failure|cancelled|skipped)"'; then`,
43
- ` echo "a required job did not succeed"; exit 1`,
44
- `fi`,
45
- ].join("\n"),
44
+ run: (skippable.length === 0
45
+ ? [
46
+ `results='\${{ toJSON(needs) }}'`,
47
+ `echo "$results"`,
48
+ `if echo "$results" | grep -qE '"result": "(failure|cancelled|skipped)"'; then`,
49
+ ` echo "a required job did not succeed"; exit 1`,
50
+ `fi`,
51
+ ]
52
+ : [
53
+ `results='\${{ toJSON(needs) }}'`,
54
+ `echo "$results"`,
55
+ `failed=$(echo "$results" | jq -r --arg skippable ' ${[...skippable].sort().join(" ")} ' 'to_entries[] | .key as $job | select(.value.result == "failure" or .value.result == "cancelled" or (.value.result == "skipped" and ($skippable | contains(" " + $job + " ") | not))) | $job')`,
56
+ `if [ -n "$failed" ]; then`,
57
+ ` echo "required jobs did not succeed: $failed"; exit 1`,
58
+ `fi`,
59
+ ]).join("\n"),
46
60
  shell: "bash",
47
61
  },
48
62
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"aggregateCheckJob.js","sourceRoot":"","sources":["../../../../../../../../packages/pipeline/src/backends/github/aggregateCheckJob.ts"],"names":[],"mappings":";;;AAEa,QAAA,sBAAsB,GAAG,cAAc,CAAC;AACxC,QAAA,wBAAwB,GAAG,aAAa,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACI,MAAM,qBAAqB,GAAG,CACnC,UAAqC,EACV,EAAE,CAAC,CAAC;IAC/B,CAAC,8BAAsB,CAAC,EAAE;QACxB,IAAI,EAAE,gCAAwB;QAC9B,SAAS,EAAE,eAAe;QAC1B,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE;QACrC,EAAE,EAAE,UAAU;QACd,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,gCAAwB;gBAC9B,gEAAgE;gBAChE,8BAA8B;gBAC9B,GAAG,EAAE;oBACH,iCAAiC;oBACjC,iBAAiB;oBACjB,+EAA+E;oBAC/E,iDAAiD;oBACjD,IAAI;iBACL,CAAC,IAAI,CAAC,IAAI,CAAC;gBACZ,KAAK,EAAE,MAAM;aACd;SACF;KACF;CACF,CAAC,CAAC;AAxBU,QAAA,qBAAqB,yBAwB/B"}
1
+ {"version":3,"file":"aggregateCheckJob.js","sourceRoot":"","sources":["../../../../../../../../packages/pipeline/src/backends/github/aggregateCheckJob.ts"],"names":[],"mappings":";;;AAEa,QAAA,sBAAsB,GAAG,cAAc,CAAC;AACxC,QAAA,wBAAwB,GAAG,aAAa,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACI,MAAM,qBAAqB,GAAG,CACnC,UAAqC;AACrC;;;GAGG;AACH,YAAsB,EAAE,EACG,EAAE,CAAC,CAAC;IAC/B,CAAC,8BAAsB,CAAC,EAAE;QACxB,IAAI,EAAE,gCAAwB;QAC9B,SAAS,EAAE,eAAe;QAC1B,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE;QACrC,EAAE,EAAE,UAAU;QACd,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,gCAAwB;gBAC9B,gEAAgE;gBAChE,8BAA8B;gBAC9B,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC;oBAC1B,CAAC,CAAC;wBACE,iCAAiC;wBACjC,iBAAiB;wBACjB,+EAA+E;wBAC/E,iDAAiD;wBACjD,IAAI;qBACL;oBACH,CAAC,CAAC;wBACE,iCAAiC;wBACjC,iBAAiB;wBACjB,sDAAsD,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,mMAAmM;wBACxR,2BAA2B;wBAC3B,yDAAyD;wBACzD,IAAI;qBACL,CACJ,CAAC,IAAI,CAAC,IAAI,CAAC;gBACZ,KAAK,EAAE,MAAM;aACd;SACF;KACF;CACF,CAAC,CAAC;AAvCU,QAAA,qBAAqB,yBAuC/B"}
@@ -0,0 +1,128 @@
1
+ import type { JobImagesPlan } from "../../customImages/jobImagesPlan";
2
+ import { type ResolvedReviewAppsConfig } from "../../reviewApps";
3
+ import type { Context } from "../../types";
4
+ import type { GithubJob, GithubStep, GithubWorkflow } from "../../types/github-types";
5
+ import type { CatladderJob } from "../../types/jobs";
6
+ /**
7
+ * the generated review deploy workflow. Keep in sync with
8
+ * GITHUB_REVIEW_DEPLOY_WORKFLOW in apps/cli/src/reviewApps/github.ts.
9
+ */
10
+ export declare const REVIEW_DEPLOY_WORKFLOW_FILE = "catladder-deploy-review.yml";
11
+ type TriggerJobs = Map<string, {
12
+ githubJob: GithubJob;
13
+ job: CatladderJob;
14
+ context: Context;
15
+ }>;
16
+ /**
17
+ * the condition under which the review workflow deploys the review apps
18
+ * ITSELF, decided from the pull request event at the start of the run
19
+ * (labels, draft) — the common case then needs one run and one app
20
+ * build, like gitlab's switch job. Whatever changes later (a label set
21
+ * during or after the run, a draft marked ready, an explicit request) is
22
+ * handled by the review deploy workflow. `deploy: "manual"` never
23
+ * deploys on its own: undefined.
24
+ */
25
+ export declare const getInRunDeployCondition: (reviewApps: ResolvedReviewAppsConfig) => string | undefined;
26
+ /** combine a job's `if` with the in-run deploy condition */
27
+ export declare const withInRunCondition: (job: GithubJob, condition: string) => {
28
+ if: string;
29
+ name?: string;
30
+ "runs-on": string;
31
+ needs?: string[];
32
+ container?: string | {
33
+ image: string;
34
+ credentials?: {
35
+ username: string;
36
+ password: string;
37
+ };
38
+ };
39
+ services?: Record<string, import("../../types/github-types").GithubService>;
40
+ environment?: string | {
41
+ name: string;
42
+ url?: string;
43
+ };
44
+ env?: Record<string, string>;
45
+ permissions?: Record<string, string>;
46
+ "continue-on-error"?: boolean;
47
+ outputs?: Record<string, string>;
48
+ steps: GithubStep[];
49
+ };
50
+ /**
51
+ * the review delivery jobs (docker → deploy → verify) that move out of
52
+ * the review workflow into the review deploy workflow:
53
+ * - all of them when the reviewApps config gates review deploys
54
+ * - otherwise those of components whose review deploy is manual
55
+ * (`deploy.when: "manual"`) — github has no manual jobs inside a run,
56
+ * and the generic manual-task dispatch can't carry the pull request
57
+ */
58
+ export declare const getGatedReviewDeliveryJobIds: (triggerJobs: TriggerJobs, reviewApps: ResolvedReviewAppsConfig) => string[];
59
+ /**
60
+ * the review deploy workflow (`▶️ catladder deploy review`): the review
61
+ * delivery chains of a pull request, behind a guard that decides
62
+ * whether this run deploys (see `catci review-app github-guard`).
63
+ *
64
+ * Started by
65
+ * - the review workflow, once it is green and the label/draft policy
66
+ * says the PR deploys (`source: ci`)
67
+ * - switching the label on (opt-in: adding it, opt-out: removing the
68
+ * skip label) or marking a draft ready (`drafts: "checksOnly"`)
69
+ * - a human or agent dispatching it with the PR number — explicit
70
+ * requests always deploy, provided the PR's CI is green
71
+ *
72
+ * Artifacts are scoped to a single run, so the run rebuilds what the
73
+ * chains need (the app build); tests are not rerun — the guard checks
74
+ * the PR's `catladder ✅` instead.
75
+ */
76
+ export declare const makeReviewDeployWorkflow: ({ deliveryIds, triggerJobs, reviewApps, images, workflowEnv, permissions, }: {
77
+ deliveryIds: string[];
78
+ triggerJobs: TriggerJobs;
79
+ reviewApps: ResolvedReviewAppsConfig;
80
+ images: JobImagesPlan;
81
+ workflowEnv: Record<string, string>;
82
+ permissions: GithubWorkflow["permissions"];
83
+ }) => GithubWorkflow;
84
+ export declare const REVIEW_APP_AGGREGATE_JOB_ID = "catladder-review-app-ok";
85
+ export declare const REVIEW_APP_AGGREGATE_JOB_NAME = "catladder review app \u2705";
86
+ /** the commit status context the aggregate job reports */
87
+ export declare const REVIEW_APP_STATUS_CONTEXT = "catladder review app";
88
+ /**
89
+ * one job with a STABLE name that succeeds exactly when the review apps
90
+ * of this run deployed and verified — the result a merge gate (a bot,
91
+ * or a branch rule for projects that deploy every PR) waits for,
92
+ * regardless of the project's components.
93
+ *
94
+ * It also reports a commit status on the PR head: runs started by a
95
+ * dispatch (the trigger job, or by hand) are attached to the commit but
96
+ * not shown on the pull request, a commit status always is.
97
+ *
98
+ * Runs only when the run deploys (the guard decided so, or the review
99
+ * workflow's start condition held) — a run that doesn't deploy says
100
+ * nothing about the review app (its check is skipped, the commit status
101
+ * untouched). Neither does a cancelled run (superseded by a newer
102
+ * deploy, or stopped): a gate keeps waiting instead of seeing red.
103
+ */
104
+ export declare const makeReviewAppAggregateJob: (needs: string[], deploysWhen: string) => Record<string, GithubJob>;
105
+ /**
106
+ * the last job of the review workflow: once it is green, dispatch the
107
+ * review deploy workflow when the label/draft policy says this PR
108
+ * deploys (read fresh from the PR, so a label set while CI ran counts).
109
+ * Only for policies that deploy on their own — `deploy: "manual"` waits
110
+ * for an explicit dispatch.
111
+ */
112
+ export declare const makeReviewDeployTriggerJob: (reviewApps: ResolvedReviewAppsConfig, inRunCondition?: string) => Record<string, GithubJob>;
113
+ /**
114
+ * the review stop workflow under a label policy: switching the label
115
+ * off (opt-in: removing it, opt-out: adding the skip label) stops the
116
+ * review apps, like closing the PR does. It shares the deploy
117
+ * workflow's concurrency group, so a deploy in flight is cancelled
118
+ * first.
119
+ */
120
+ export declare const withReviewStopSwitch: (workflow: GithubWorkflow, reviewApps: ResolvedReviewAppsConfig, reviewRunDeploys?: boolean) => GithubWorkflow;
121
+ /**
122
+ * `drafts: "skip"`: draft PRs run nothing — every job of the review
123
+ * workflow skips them, and marking the PR ready starts the run. A
124
+ * skipped `catladder ✅` can't let a draft through: drafts can't be
125
+ * merged.
126
+ */
127
+ export declare const withDraftsSkipped: (workflow: GithubWorkflow) => GithubWorkflow;
128
+ export {};