@catladder/cli 5.1.1 → 5.1.3

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 (43) hide show
  1. package/dist/apps/cli/src/apps/cli/commands/project/doctor/checkGithubReleaseWorkflow.d.ts +30 -0
  2. package/dist/apps/cli/src/apps/cli/commands/project/doctor/checkGithubReleaseWorkflow.js +89 -0
  3. package/dist/apps/cli/src/apps/cli/commands/project/doctor/checkGithubReleaseWorkflow.js.map +1 -0
  4. package/dist/apps/cli/src/apps/cli/commands/project/doctor/index.js +2 -0
  5. package/dist/apps/cli/src/apps/cli/commands/project/doctor/index.js.map +1 -1
  6. package/dist/apps/cli/src/apps/cli/commands/project/githubMergeGating.d.ts +4 -1
  7. package/dist/apps/cli/src/apps/cli/commands/project/githubMergeGating.js +4 -1
  8. package/dist/apps/cli/src/apps/cli/commands/project/githubMergeGating.js.map +1 -1
  9. package/dist/apps/cli/src/catci.js +13 -0
  10. package/dist/apps/cli/src/catci.js.map +1 -1
  11. package/dist/apps/cli/src/release/changesetsReleaseJob.js +20 -42
  12. package/dist/apps/cli/src/release/changesetsReleaseJob.js.map +1 -1
  13. package/dist/apps/cli/src/release/githubDeployKey.d.ts +36 -0
  14. package/dist/apps/cli/src/release/githubDeployKey.js +126 -0
  15. package/dist/apps/cli/src/release/githubDeployKey.js.map +1 -0
  16. package/dist/bundles/catci/index.js +5 -5
  17. package/dist/bundles/catenv/index.js +31 -7
  18. package/dist/bundles/cli/index.js +133 -8
  19. package/dist/bundles/runner-images/semantic-release/Dockerfile +3 -1
  20. package/dist/bundles/runner-images/semantic-release/scripts/semanticRelease +37 -4
  21. package/dist/bundles/skills/catladder-migrate-ci-backend/SKILL.md +15 -6
  22. package/dist/bundles/skills/catladder-pipelines/SKILL.md +3 -2
  23. package/dist/bundles/skills/catladder-releases/SKILL.md +14 -0
  24. package/dist/packages/pipeline/src/backends/github/GithubBackend.js +12 -3
  25. package/dist/packages/pipeline/src/backends/github/GithubBackend.js.map +1 -1
  26. package/dist/packages/pipeline/src/catci/shippedCatci.d.ts +8 -0
  27. package/dist/packages/pipeline/src/catci/shippedCatci.js +19 -4
  28. package/dist/packages/pipeline/src/catci/shippedCatci.js.map +1 -1
  29. package/dist/runner-images/semantic-release/Dockerfile +3 -1
  30. package/dist/runner-images/semantic-release/scripts/semanticRelease +37 -4
  31. package/dist/skills/catladder-migrate-ci-backend/SKILL.md +15 -6
  32. package/dist/skills/catladder-pipelines/SKILL.md +3 -2
  33. package/dist/skills/catladder-releases/SKILL.md +14 -0
  34. package/dist/tsconfig.tsbuildinfo +1 -1
  35. package/package.json +1 -1
  36. package/src/apps/cli/commands/project/__tests__/checkGithubReleaseWorkflow.test.ts +89 -0
  37. package/src/apps/cli/commands/project/doctor/checkGithubReleaseWorkflow.ts +125 -0
  38. package/src/apps/cli/commands/project/doctor/index.ts +2 -0
  39. package/src/apps/cli/commands/project/githubMergeGating.ts +4 -1
  40. package/src/catci.ts +15 -0
  41. package/src/release/__tests__/githubDeployKey.test.ts +148 -0
  42. package/src/release/changesetsReleaseJob.ts +28 -57
  43. package/src/release/githubDeployKey.ts +141 -0
@@ -2678,10 +2678,19 @@ const TRIGGER_WORKFLOWS = {
2678
2678
  },
2679
2679
  taggedRelease: {
2680
2680
  name: "🛠️ catladder release",
2681
- // tags pushed with the default GITHUB_TOKEN (as the release job
2682
- // does) don't trigger `on: push: tags` the release job therefore
2683
- // also dispatches this workflow explicitly for the new tag
2681
+ // tags pushed with the default GITHUB_TOKEN don't trigger `on:
2682
+ // push: tags`, and the release job's deploy-key push carries
2683
+ // [skip ci] the release job therefore dispatches this workflow
2684
+ // explicitly for the new tag (the only run for it)
2684
2685
  on: { push: { tags: ["v*"] }, workflow_dispatch: {} },
2686
+ // one run per tag at a time, never cancelled: should a second run
2687
+ // for the same tag ever start (a redispatch, or a project whose
2688
+ // own .releaserc drops the [skip ci] marker), it waits instead of
2689
+ // deploying on top of the first
2690
+ concurrency: {
2691
+ group: "catladder-release-${{ github.ref_name }}",
2692
+ "cancel-in-progress": false,
2693
+ },
2685
2694
  },
2686
2695
  };
2687
2696
  class GithubBackend {
@@ -7169,7 +7178,7 @@ exports.isOfBuildType = isOfBuildType;
7169
7178
  "use strict";
7170
7179
 
7171
7180
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7172
- exports.getCatciGeneratedFiles = exports.GENERATED_CATCI_FOLDER = void 0;
7181
+ exports.getCatciGeneratedFiles = exports.makeCatciGeneratedFiles = exports.GENERATED_CATCI_FOLDER = void 0;
7173
7182
  const fs_1 = __nccwpck_require__(79896);
7174
7183
  const path_1 = __nccwpck_require__(16928);
7175
7184
  exports.GENERATED_CATCI_FOLDER = ".catladder-generated/catci";
@@ -7197,14 +7206,29 @@ const getShippedCatciBundle = () => {
7197
7206
  return found;
7198
7207
  };
7199
7208
  /**
7200
- * the catci files to materialize into the generated folder
7209
+ * the files that make up the materialized catci folder for a given
7210
+ * bundle content
7201
7211
  */
7202
- const getCatciGeneratedFiles = () => [
7212
+ const makeCatciGeneratedFiles = (bundle) => [
7203
7213
  {
7204
7214
  path: (0, path_1.join)(exports.GENERATED_CATCI_FOLDER, "index.js"),
7205
- content: (0, fs_1.readFileSync)(getShippedCatciBundle(), "utf-8"),
7215
+ content: bundle,
7216
+ },
7217
+ {
7218
+ // the bundle is commonjs (ncc output using `__dirname`), but node
7219
+ // resolves the module format from the nearest package.json: a
7220
+ // consumer whose root package.json declares `"type": "module"`
7221
+ // would parse the bundle as ESM and crash on the first `__dirname`.
7222
+ // a sibling package.json pins the folder to commonjs regardless.
7223
+ path: (0, path_1.join)(exports.GENERATED_CATCI_FOLDER, "package.json"),
7224
+ content: `${JSON.stringify({ type: "commonjs" }, null, 2)}\n`,
7206
7225
  },
7207
7226
  ];
7227
+ exports.makeCatciGeneratedFiles = makeCatciGeneratedFiles;
7228
+ /**
7229
+ * the catci files to materialize into the generated folder
7230
+ */
7231
+ const getCatciGeneratedFiles = () => (0, exports.makeCatciGeneratedFiles)((0, fs_1.readFileSync)(getShippedCatciBundle(), "utf-8"));
7208
7232
  exports.getCatciGeneratedFiles = getCatciGeneratedFiles;
7209
7233
  //# sourceMappingURL=shippedCatci.js.map
7210
7234
 
@@ -869,6 +869,102 @@ exports.checkGithubImageCasing = checkGithubImageCasing;
869
869
 
870
870
  /***/ }),
871
871
 
872
+ /***/ 64286:
873
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
874
+
875
+ "use strict";
876
+
877
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
878
+ exports.checkGithubReleaseWorkflow = exports.findReleaseJobImageDrift = void 0;
879
+ const promises_1 = __nccwpck_require__(91943);
880
+ const path_1 = __nccwpck_require__(16928);
881
+ const pipeline_1 = __nccwpck_require__(53695);
882
+ const yaml_1 = __nccwpck_require__(99292);
883
+ const WORKFLOWS_FOLDER = ".github/workflows";
884
+ /** the job name of the release job, see githubReleaseJobs.ts */
885
+ const RELEASE_JOB_NAME = "create release";
886
+ const releaseJobImage = (workflow) => {
887
+ var _a;
888
+ const job = Object.values((_a = workflow.jobs) !== null && _a !== void 0 ? _a : {}).find((job) => (job === null || job === void 0 ? void 0 : job.name) === RELEASE_JOB_NAME);
889
+ const container = job === null || job === void 0 ? void 0 : job.container;
890
+ if (typeof container === "string")
891
+ return container;
892
+ if (container && typeof container === "object" && "image" in container) {
893
+ return `${container.image}`;
894
+ }
895
+ return null;
896
+ };
897
+ /**
898
+ * compares the release job image of every generated workflow carrying
899
+ * one against the committed workflow of the same name. The job images
900
+ * are tagged by a content hash of their definition, so a differing tag
901
+ * means the committed workflow runs an older release image.
902
+ */
903
+ const findReleaseJobImageDrift = (generated, committed) => Object.entries(generated).flatMap(([file, workflow]) => {
904
+ var _a;
905
+ const expected = releaseJobImage(workflow);
906
+ if (!expected)
907
+ return [];
908
+ const content = committed[file];
909
+ let committedImage = null;
910
+ if (content) {
911
+ try {
912
+ committedImage = releaseJobImage((_a = (0, yaml_1.parse)(content)) !== null && _a !== void 0 ? _a : {});
913
+ }
914
+ catch (_b) {
915
+ committedImage = null;
916
+ }
917
+ }
918
+ return committedImage === expected
919
+ ? []
920
+ : [{ file, expected, committed: committedImage }];
921
+ });
922
+ exports.findReleaseJobImageDrift = findReleaseJobImageDrift;
923
+ /**
924
+ * the release job image in the committed workflows must be the one this
925
+ * catladder version generates. The image tag encodes the image
926
+ * definition, so an older tag means an older release script — which is
927
+ * more than cosmetics: the semantic-release image before this check
928
+ * pushed with the workflow token and ignored the release deploy key,
929
+ * so every release on a repository with merge gating failed on GH013
930
+ * while `project setup` and the deploy-key checks reported all green.
931
+ *
932
+ * Needs no `gh` login — only the config and the committed files.
933
+ */
934
+ const checkGithubReleaseWorkflow = async (report, config) => {
935
+ if (!(0, pipeline_1.getEnabledPipelineTypes)(config).includes("github"))
936
+ return;
937
+ report.section("github release workflow");
938
+ let generated;
939
+ try {
940
+ const images = new pipeline_1.JobImagesPlan("github", config.images, await (0, pipeline_1.resolveGithubRegistryImage)(config));
941
+ generated = await new pipeline_1.GithubBackend().createWorkflows(config, images);
942
+ }
943
+ catch (e) {
944
+ report.warn(`could not generate the github workflows (${e.message})`);
945
+ return;
946
+ }
947
+ const files = Object.keys(generated).filter((file) => releaseJobImage(generated[file]));
948
+ const committed = {};
949
+ for (const file of files) {
950
+ committed[file] = await (0, promises_1.readFile)((0, path_1.join)(WORKFLOWS_FOLDER, file), "utf8").catch(() => null);
951
+ }
952
+ const drift = (0, exports.findReleaseJobImageDrift)(generated, committed);
953
+ if (drift.length === 0) {
954
+ report.ok(`release job image up to date in ${files.length} generated workflow(s)`);
955
+ return;
956
+ }
957
+ for (const { file, expected, committed } of drift) {
958
+ report.fail(committed
959
+ ? `${WORKFLOWS_FOLDER}/${file}: the release job runs ${committed}, this catladder version generates ${expected} — the committed workflow was generated by an older catladder (its release script may push with the workflow token, ignoring the release deploy key)`
960
+ : `${WORKFLOWS_FOLDER}/${file}: missing or without a '${RELEASE_JOB_NAME}' job (expected image ${expected})`, "run: catenv (and commit the regenerated workflows)");
961
+ }
962
+ };
963
+ exports.checkGithubReleaseWorkflow = checkGithubReleaseWorkflow;
964
+ //# sourceMappingURL=checkGithubReleaseWorkflow.js.map
965
+
966
+ /***/ }),
967
+
872
968
  /***/ 26904:
873
969
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
874
970
 
@@ -1014,6 +1110,7 @@ const getProjectConfig_1 = __nccwpck_require__(70478);
1014
1110
  const checkCloudRun_1 = __nccwpck_require__(55869);
1015
1111
  const checkGithub_1 = __nccwpck_require__(88480);
1016
1112
  const checkGithubImageCasing_1 = __nccwpck_require__(12668);
1113
+ const checkGithubReleaseWorkflow_1 = __nccwpck_require__(64286);
1017
1114
  const checkGitlab_1 = __nccwpck_require__(26904);
1018
1115
  const checkStore_1 = __nccwpck_require__(62878);
1019
1116
  const DoctorReport_1 = __nccwpck_require__(87354);
@@ -1050,6 +1147,7 @@ const doctorProject = async (instance, onlyComponents) => {
1050
1147
  }
1051
1148
  await (0, checkCloudRun_1.checkCloudRun)(report, contexts);
1052
1149
  await (0, checkGithubImageCasing_1.checkGithubImageCasing)(report, config);
1150
+ await (0, checkGithubReleaseWorkflow_1.checkGithubReleaseWorkflow)(report, config);
1053
1151
  await (0, checkGithub_1.checkGithub)(report, config);
1054
1152
  report.summarize();
1055
1153
  };
@@ -1094,7 +1192,10 @@ exports.MERGE_GATING_RULESET_NAME = "catladder merge gating";
1094
1192
  exports.RELEASE_DEPLOY_KEY_TITLE = "catladder release";
1095
1193
  /**
1096
1194
  * actions secret holding the deploy key's private half; the generated
1097
- * release jobs pass it to catci, which pushes over ssh when it is set
1195
+ * release jobs pass it into the job env and both release methods push
1196
+ * over ssh with it when it is set — changesets from catci itself,
1197
+ * semantic-release via the ssh repository url catci prepares for it
1198
+ * (see src/release/githubDeployKey.ts)
1098
1199
  */
1099
1200
  exports.RELEASE_DEPLOY_KEY_SECRET = "CATLADDER_RELEASE_KEY";
1100
1201
  /** the ruleset `project setup` creates (and restores on drift) */
@@ -9129,10 +9230,19 @@ const TRIGGER_WORKFLOWS = {
9129
9230
  },
9130
9231
  taggedRelease: {
9131
9232
  name: "🛠️ catladder release",
9132
- // tags pushed with the default GITHUB_TOKEN (as the release job
9133
- // does) don't trigger `on: push: tags` the release job therefore
9134
- // also dispatches this workflow explicitly for the new tag
9233
+ // tags pushed with the default GITHUB_TOKEN don't trigger `on:
9234
+ // push: tags`, and the release job's deploy-key push carries
9235
+ // [skip ci] the release job therefore dispatches this workflow
9236
+ // explicitly for the new tag (the only run for it)
9135
9237
  on: { push: { tags: ["v*"] }, workflow_dispatch: {} },
9238
+ // one run per tag at a time, never cancelled: should a second run
9239
+ // for the same tag ever start (a redispatch, or a project whose
9240
+ // own .releaserc drops the [skip ci] marker), it waits instead of
9241
+ // deploying on top of the first
9242
+ concurrency: {
9243
+ group: "catladder-release-${{ github.ref_name }}",
9244
+ "cancel-in-progress": false,
9245
+ },
9136
9246
  },
9137
9247
  };
9138
9248
  class GithubBackend {
@@ -13620,7 +13730,7 @@ exports.isOfBuildType = isOfBuildType;
13620
13730
  "use strict";
13621
13731
 
13622
13732
  Object.defineProperty(exports, "__esModule", ({ value: true }));
13623
- exports.getCatciGeneratedFiles = exports.GENERATED_CATCI_FOLDER = void 0;
13733
+ exports.getCatciGeneratedFiles = exports.makeCatciGeneratedFiles = exports.GENERATED_CATCI_FOLDER = void 0;
13624
13734
  const fs_1 = __nccwpck_require__(79896);
13625
13735
  const path_1 = __nccwpck_require__(16928);
13626
13736
  exports.GENERATED_CATCI_FOLDER = ".catladder-generated/catci";
@@ -13648,14 +13758,29 @@ const getShippedCatciBundle = () => {
13648
13758
  return found;
13649
13759
  };
13650
13760
  /**
13651
- * the catci files to materialize into the generated folder
13761
+ * the files that make up the materialized catci folder for a given
13762
+ * bundle content
13652
13763
  */
13653
- const getCatciGeneratedFiles = () => [
13764
+ const makeCatciGeneratedFiles = (bundle) => [
13654
13765
  {
13655
13766
  path: (0, path_1.join)(exports.GENERATED_CATCI_FOLDER, "index.js"),
13656
- content: (0, fs_1.readFileSync)(getShippedCatciBundle(), "utf-8"),
13767
+ content: bundle,
13768
+ },
13769
+ {
13770
+ // the bundle is commonjs (ncc output using `__dirname`), but node
13771
+ // resolves the module format from the nearest package.json: a
13772
+ // consumer whose root package.json declares `"type": "module"`
13773
+ // would parse the bundle as ESM and crash on the first `__dirname`.
13774
+ // a sibling package.json pins the folder to commonjs regardless.
13775
+ path: (0, path_1.join)(exports.GENERATED_CATCI_FOLDER, "package.json"),
13776
+ content: `${JSON.stringify({ type: "commonjs" }, null, 2)}\n`,
13657
13777
  },
13658
13778
  ];
13779
+ exports.makeCatciGeneratedFiles = makeCatciGeneratedFiles;
13780
+ /**
13781
+ * the catci files to materialize into the generated folder
13782
+ */
13783
+ const getCatciGeneratedFiles = () => (0, exports.makeCatciGeneratedFiles)((0, fs_1.readFileSync)(getShippedCatciBundle(), "utf-8"));
13659
13784
  exports.getCatciGeneratedFiles = getCatciGeneratedFiles;
13660
13785
  //# sourceMappingURL=shippedCatci.js.map
13661
13786
 
@@ -4,7 +4,9 @@
4
4
  # (@semantic-release/git and @semantic-release/changelog need node >=24.15).
5
5
  FROM node:24-alpine
6
6
 
7
- RUN apk add --no-cache bash git git-lfs
7
+ # openssh: on github the release job pushes with the release deploy key
8
+ # over ssh (see scripts/semanticRelease)
9
+ RUN apk add --no-cache bash git git-lfs openssh-client
8
10
 
9
11
  # add semantic release
10
12
  # NOTE: pin every dependency exactly. These are the semantic-release@25 line
@@ -39,7 +39,34 @@ fi
39
39
 
40
40
  echo "doing semantic release"
41
41
 
42
+ SEMANTIC_RELEASE_ARGS=()
43
+ # the commit message suffix, see the @semantic-release/git config below
44
+ RELEASE_COMMIT_SUFFIX=""
42
45
  if [ "$GITHUB_ACTIONS" = "true" ]; then
46
+ # [skip ci] on github only: a push with the deploy key triggers
47
+ # workflows (unlike a push with GITHUB_TOKEN), and neither the release
48
+ # commit nor the tag needs a push-triggered run — the taggedRelease
49
+ # workflow is dispatched explicitly at the end, the marker keeps it
50
+ # the only run (same as the changesets path). On gitlab the tag
51
+ # pipeline MUST fire natively, so no marker there.
52
+ RELEASE_COMMIT_SUFFIX=" [skip ci]"
53
+
54
+ if [ -n "$CATLADDER_RELEASE_KEY" ]; then
55
+ # merge gating (a ruleset requiring the `catladder ✅` check on the
56
+ # default branch) rejects the release push unless it comes from the
57
+ # release deploy key — the workflow token can never bypass a
58
+ # ruleset. catci writes the key, points git's ssh at it and checks
59
+ # that the key reaches the repository (a clear failure here instead
60
+ # of a GH013 inside @semantic-release/git). The ssh url has to be
61
+ # passed explicitly: semantic-release takes package.json's
62
+ # `repository` over origin, and origin is the token-authenticated
63
+ # https url actions/checkout left behind.
64
+ RELEASE_REPOSITORY_URL=$(node "$CATCI" release github-deploy-key-remote)
65
+ SEMANTIC_RELEASE_ARGS+=(--repository-url "$RELEASE_REPOSITORY_URL")
66
+ else
67
+ echo "CATLADDER_RELEASE_KEY not set — pushing with the workflow token (fails on a repository with merge gating: run 'catladder project setup')"
68
+ fi
69
+
43
70
  # the github counterpart of the gitlab plugin below: it creates the
44
71
  # entry on the releases page with the generated notes. Everything
45
72
  # beyond that is switched off on purpose — commenting on the
@@ -62,6 +89,10 @@ else
62
89
  "@semantic-release/gitlab"'
63
90
  fi
64
91
 
92
+ # NOTE: a project bringing its own .releaserc has to keep "[skip ci]" in
93
+ # the git plugin's commit message on github (see RELEASE_COMMIT_SUFFIX),
94
+ # otherwise a deploy-key push starts the main workflow for the release
95
+ # commit and a second taggedRelease run for the tag.
65
96
  if [ ! -e .releaserc ]; then
66
97
  cat >.releaserc <<EOF
67
98
  {
@@ -98,7 +129,7 @@ if [ ! -e .releaserc ]; then
98
129
  # loop-prevention rule keys on the literal "chore(release)" prefix, so keep
99
130
  # this literal. Don't "fix" it back to \${branch.type}.
100
131
  ["@semantic-release/git", {
101
- "message": "chore(release): \${nextRelease.version}\n\n\${nextRelease.notes}"
132
+ "message": "chore(release): \${nextRelease.version}${RELEASE_COMMIT_SUFFIX}\n\n\${nextRelease.notes}"
102
133
  }]${PUBLISH_PLUGIN}
103
134
  ],
104
135
  "branches": [
@@ -124,11 +155,13 @@ if [ "$GITHUB_ACTIONS" = "true" ]; then
124
155
  TAGS_BEFORE=$(git tag --list 'v[0-9]*')
125
156
  fi
126
157
 
127
- semantic-release
158
+ semantic-release "${SEMANTIC_RELEASE_ARGS[@]}"
128
159
 
129
160
  # tags pushed with the default GITHUB_TOKEN don't trigger `on: push:
130
- # tags` workflows (github's recursion guard) dispatch the
131
- # taggedRelease workflow explicitly for a tag semantic-release created
161
+ # tags` workflows (github's recursion guard), and a deploy-key push
162
+ # carries [skip ci] (see above) dispatch the taggedRelease workflow
163
+ # explicitly for a tag semantic-release created, whichever way it was
164
+ # pushed
132
165
  if [ "$GITHUB_ACTIONS" = "true" ] && [ -f "$CATCI" ]; then
133
166
  if [ -z "$TAGS_BEFORE" ]; then
134
167
  NEW_TAG=$(git tag --list 'v[0-9]*' | tail -n1)
@@ -183,10 +183,15 @@ skill for the exact command surface.
183
183
  - **GitLab** needs a `GL_TOKEN` project access token (named
184
184
  `semantic-release`) to push the release commit and tag. It is created
185
185
  and rotated by `yarn catladder project setup`.
186
- - **GitHub** needs nothing extra the release jobs use the built-in
187
- `github.token`. Tags pushed by that token do not retrigger workflows,
188
- so the release job dispatches the tagged-release workflow explicitly;
189
- that is built in and needs no configuration.
186
+ - **GitHub** needs the release deploy key that `yarn catladder project
187
+ setup` provisions together with the merge gating (Step 9): the release
188
+ job pushes the release commit and tag over ssh with it, because the
189
+ built-in `github.token` can never bypass the required `catladder ✅`
190
+ check on the default branch (the push fails with GH013 otherwise).
191
+ Without merge gating the job falls back to the token. The release
192
+ commit carries `[skip ci]` and the release job dispatches the
193
+ tagged-release workflow explicitly (one run per tag); that is built
194
+ in and needs no configuration.
190
195
  - **Only one backend should own releases at a time.** Both backends
191
196
  generate release jobs, and with `releases: { when: "auto" }` both would
192
197
  try to tag the same commit. During the parallel phase, agree with the
@@ -287,9 +292,13 @@ now-wrong `gitRemote`, regenerate once more, and finish with
287
292
  token bypass rulesets, so setup provisions a write deploy key
288
293
  ("catladder release", private half in the `CATLADDER_RELEASE_KEY`
289
294
  actions secret; deploy keys never expire) that the release job
290
- pushes with over ssh. Classic branch protection has no bypass list
295
+ pushes with over ssh with both release methods, semantic-release
296
+ and changesets. Classic branch protection has no bypass list
291
297
  at all, which is why setup uses a ruleset and migrates old
292
- classic-protection gating away. `project doctor` verifies all of it.
298
+ classic-protection gating away. `project doctor` verifies all of it,
299
+ including that the committed release workflow runs the release image
300
+ of the installed catladder (an older semantic-release image pushed
301
+ with the token and ignored the key — regenerate with `catenv`).
293
302
  Required reviews stay a human choice.
294
303
  - Tell the team where the pipeline lives now and how manual actions
295
304
  work there (on GitHub, manual jobs are dispatch workflows in the
@@ -70,8 +70,9 @@ jobs). Their definitions are materialized into
70
70
  `.catladder-generated/images/` and built in the project's own registry
71
71
  under `catladder/` (content-hashed, rebuilt only on change).
72
72
  `.catladder-generated/catci/` holds a small bundled CI companion used by
73
- generated jobs (e.g. the release security audit) all generated, never
74
- edit.
73
+ generated jobs (e.g. the release security audit) plus a `package.json`
74
+ pinning the folder to CommonJS (needed when the project's root
75
+ `package.json` has `"type": "module"`) — all generated, never edit.
75
76
 
76
77
  Projects can declare their own job images under `images` in
77
78
  `catladder.ts` (`🐳 image <name>` build jobs, pushed to `job-images/` in
@@ -128,6 +128,20 @@ the `security` commands in the `catladder-cli` reference.
128
128
  MR adding a changeset describing the accumulated work.
129
129
  - Wrong version bump → check commit types (semantic-release) or the bump
130
130
  levels in the changeset files (changesets).
131
+ - GitHub: the push is rejected with `GH013 … Required status check
132
+ "catladder ✅" is expected` (or GH006) → the release push has to use
133
+ the release deploy key, the only actor that bypasses the merge-gating
134
+ ruleset. `yarn catladder project setup` provisions it (deploy key
135
+ `catladder release` + secret `CATLADDER_RELEASE_KEY`), `yarn catladder
136
+ project doctor` verifies it — including that the committed release
137
+ workflow runs the current release image; an older semantic-release
138
+ image pushed with the workflow token and ignored the key (regenerate
139
+ with `yarn catenv` and commit).
140
+ - GitHub, semantic-release with a project-provided `.releaserc`: keep
141
+ `[skip ci]` in the `@semantic-release/git` commit message. The
142
+ deploy-key push triggers workflows, and without the marker the release
143
+ commit starts a main run and the tag a second tagged run next to the
144
+ one the release job dispatches.
131
145
  - Tag pushed but nothing on the releases page → with `changesets` the
132
146
  entry is created via the host api after the push and never fails the
133
147
  job (the release itself is done); look for the `could not create the
@@ -42,10 +42,19 @@ const TRIGGER_WORKFLOWS = {
42
42
  },
43
43
  taggedRelease: {
44
44
  name: "🛠️ catladder release",
45
- // tags pushed with the default GITHUB_TOKEN (as the release job
46
- // does) don't trigger `on: push: tags` the release job therefore
47
- // also dispatches this workflow explicitly for the new tag
45
+ // tags pushed with the default GITHUB_TOKEN don't trigger `on:
46
+ // push: tags`, and the release job's deploy-key push carries
47
+ // [skip ci] the release job therefore dispatches this workflow
48
+ // explicitly for the new tag (the only run for it)
48
49
  on: { push: { tags: ["v*"] }, workflow_dispatch: {} },
50
+ // one run per tag at a time, never cancelled: should a second run
51
+ // for the same tag ever start (a redispatch, or a project whose
52
+ // own .releaserc drops the [skip ci] marker), it waits instead of
53
+ // deploying on top of the first
54
+ concurrency: {
55
+ group: "catladder-release-${{ github.ref_name }}",
56
+ "cancel-in-progress": false,
57
+ },
49
58
  },
50
59
  };
51
60
  class GithubBackend {
@@ -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;AAE7D,+CAA2D;AAI3D,+CAA6D;AAC7D,mDAA6D;AAC7D,oCAA8C;AAC9C,yDAI4B;AAC5B,oEAAiE;AACjE,uDAA8D;AAC9D,2DAA4D;AAC5D,2DAAkE;AAClE,2DAK6B;AAC7B,+CAAyE;AAEzE,MAAM,gBAAgB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I;YACP,OAAO,YAAY,CAAC;QACtB,KAAK,YAAY;YACf,OAAO,UAAU,CAAC;QACpB,KAAK,eAAe;YAClB,OAAO,aAAa,CAAC;IACzB,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,mBAAmB,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,eAAe,GAAG,CAAC,OAAgB,EAAE,GAAiB,EAAE,EAAE;;IAC9D,OAAA,CAAA,MAAA,GAAG,CAAC,WAAW,0CAAE,MAAM,MAAK,MAAM;QAClC,OAAO,CAAC,IAAI,KAAK,WAAW;QAC5B,OAAO,CAAC,WAAW,CAAC,OAAO,KAAK,QAAQ,CAAA;CAAA,CAAC;AAE3C;;;;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"}
1
+ {"version":3,"file":"GithubBackend.js","sourceRoot":"","sources":["../../../../../../../../packages/pipeline/src/backends/github/GithubBackend.ts"],"names":[],"mappings":";;;AAAA,0CAAkD;AAClD,+BAA4B;AAC5B,gEAA6D;AAE7D,+CAA2D;AAI3D,+CAA6D;AAC7D,mDAA6D;AAC7D,oCAA8C;AAC9C,yDAI4B;AAC5B,oEAAiE;AACjE,uDAA8D;AAC9D,2DAA4D;AAC5D,2DAAkE;AAClE,2DAK6B;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AAW,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE;CACrD,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAAG,CAAC,OAAwB,EAAU,EAAE;IAC5D,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,IAAI;YACP,OAAO,YAAY,CAAC;QACtB,KAAK,YAAY;YACf,OAAO,UAAU,CAAC;QACpB,KAAK,eAAe;YAClB,OAAO,aAAa,CAAC;IACzB,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,mBAAmB,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,eAAe,GAAG,CAAC,OAAgB,EAAE,GAAiB,EAAE,EAAE;;IAC9D,OAAA,CAAA,MAAA,GAAG,CAAC,WAAW,0CAAE,MAAM,MAAK,MAAM;QAClC,OAAO,CAAC,IAAI,KAAK,WAAW;QAC5B,OAAO,CAAC,WAAW,CAAC,OAAO,KAAK,QAAQ,CAAA;CAAA,CAAC;AAE3C;;;;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"}
@@ -1,4 +1,12 @@
1
1
  export declare const GENERATED_CATCI_FOLDER = ".catladder-generated/catci";
2
+ /**
3
+ * the files that make up the materialized catci folder for a given
4
+ * bundle content
5
+ */
6
+ export declare const makeCatciGeneratedFiles: (bundle: string) => Array<{
7
+ path: string;
8
+ content: string;
9
+ }>;
2
10
  /**
3
11
  * the catci files to materialize into the generated folder
4
12
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCatciGeneratedFiles = exports.GENERATED_CATCI_FOLDER = void 0;
3
+ exports.getCatciGeneratedFiles = exports.makeCatciGeneratedFiles = exports.GENERATED_CATCI_FOLDER = void 0;
4
4
  const fs_1 = require("fs");
5
5
  const path_1 = require("path");
6
6
  exports.GENERATED_CATCI_FOLDER = ".catladder-generated/catci";
@@ -28,13 +28,28 @@ const getShippedCatciBundle = () => {
28
28
  return found;
29
29
  };
30
30
  /**
31
- * the catci files to materialize into the generated folder
31
+ * the files that make up the materialized catci folder for a given
32
+ * bundle content
32
33
  */
33
- const getCatciGeneratedFiles = () => [
34
+ const makeCatciGeneratedFiles = (bundle) => [
34
35
  {
35
36
  path: (0, path_1.join)(exports.GENERATED_CATCI_FOLDER, "index.js"),
36
- content: (0, fs_1.readFileSync)(getShippedCatciBundle(), "utf-8"),
37
+ content: bundle,
38
+ },
39
+ {
40
+ // the bundle is commonjs (ncc output using `__dirname`), but node
41
+ // resolves the module format from the nearest package.json: a
42
+ // consumer whose root package.json declares `"type": "module"`
43
+ // would parse the bundle as ESM and crash on the first `__dirname`.
44
+ // a sibling package.json pins the folder to commonjs regardless.
45
+ path: (0, path_1.join)(exports.GENERATED_CATCI_FOLDER, "package.json"),
46
+ content: `${JSON.stringify({ type: "commonjs" }, null, 2)}\n`,
37
47
  },
38
48
  ];
49
+ exports.makeCatciGeneratedFiles = makeCatciGeneratedFiles;
50
+ /**
51
+ * the catci files to materialize into the generated folder
52
+ */
53
+ const getCatciGeneratedFiles = () => (0, exports.makeCatciGeneratedFiles)((0, fs_1.readFileSync)(getShippedCatciBundle(), "utf-8"));
39
54
  exports.getCatciGeneratedFiles = getCatciGeneratedFiles;
40
55
  //# sourceMappingURL=shippedCatci.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shippedCatci.js","sourceRoot":"","sources":["../../../../../../../packages/pipeline/src/catci/shippedCatci.ts"],"names":[],"mappings":";;;AAAA,2BAA8C;AAC9C,+BAA4B;AAEf,QAAA,sBAAsB,GAAG,4BAA4B,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,qBAAqB,GAAG,GAAW,EAAE;IACzC,MAAM,UAAU,GAAG;QACjB,8EAA8E;QAC9E,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC;QAC1C,oFAAoF;QACpF,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC;QACvE,+EAA+E;QAC/E,IAAA,WAAI,EACF,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,UAAU,CACX;KACF,CAAC;IACF,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAA,eAAU,EAAC,SAAS,CAAC,CAAC,CAAC;IACpE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;GAEG;AACI,MAAM,sBAAsB,GAAG,GAGnC,EAAE,CAAC;IACJ;QACE,IAAI,EAAE,IAAA,WAAI,EAAC,8BAAsB,EAAE,UAAU,CAAC;QAC9C,OAAO,EAAE,IAAA,iBAAY,EAAC,qBAAqB,EAAE,EAAE,OAAO,CAAC;KACxD;CACF,CAAC;AARW,QAAA,sBAAsB,0BAQjC"}
1
+ {"version":3,"file":"shippedCatci.js","sourceRoot":"","sources":["../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E,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI;KAC9D;CACF,CAAC;AAhBW,QAAA,uBAAuB,2BAgBlC;AAEF;;GAEG;AACI,MAAM,sBAAsB,GAAG,GAGnC,EAAE,CAAC,IAAA,+BAAuB,EAAC,IAAA,iBAAY,EAAC,qBAAqB,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;AAHjE,QAAA,sBAAsB,0BAG2C"}
@@ -4,7 +4,9 @@
4
4
  # (@semantic-release/git and @semantic-release/changelog need node >=24.15).
5
5
  FROM node:24-alpine
6
6
 
7
- RUN apk add --no-cache bash git git-lfs
7
+ # openssh: on github the release job pushes with the release deploy key
8
+ # over ssh (see scripts/semanticRelease)
9
+ RUN apk add --no-cache bash git git-lfs openssh-client
8
10
 
9
11
  # add semantic release
10
12
  # NOTE: pin every dependency exactly. These are the semantic-release@25 line
@@ -39,7 +39,34 @@ fi
39
39
 
40
40
  echo "doing semantic release"
41
41
 
42
+ SEMANTIC_RELEASE_ARGS=()
43
+ # the commit message suffix, see the @semantic-release/git config below
44
+ RELEASE_COMMIT_SUFFIX=""
42
45
  if [ "$GITHUB_ACTIONS" = "true" ]; then
46
+ # [skip ci] on github only: a push with the deploy key triggers
47
+ # workflows (unlike a push with GITHUB_TOKEN), and neither the release
48
+ # commit nor the tag needs a push-triggered run — the taggedRelease
49
+ # workflow is dispatched explicitly at the end, the marker keeps it
50
+ # the only run (same as the changesets path). On gitlab the tag
51
+ # pipeline MUST fire natively, so no marker there.
52
+ RELEASE_COMMIT_SUFFIX=" [skip ci]"
53
+
54
+ if [ -n "$CATLADDER_RELEASE_KEY" ]; then
55
+ # merge gating (a ruleset requiring the `catladder ✅` check on the
56
+ # default branch) rejects the release push unless it comes from the
57
+ # release deploy key — the workflow token can never bypass a
58
+ # ruleset. catci writes the key, points git's ssh at it and checks
59
+ # that the key reaches the repository (a clear failure here instead
60
+ # of a GH013 inside @semantic-release/git). The ssh url has to be
61
+ # passed explicitly: semantic-release takes package.json's
62
+ # `repository` over origin, and origin is the token-authenticated
63
+ # https url actions/checkout left behind.
64
+ RELEASE_REPOSITORY_URL=$(node "$CATCI" release github-deploy-key-remote)
65
+ SEMANTIC_RELEASE_ARGS+=(--repository-url "$RELEASE_REPOSITORY_URL")
66
+ else
67
+ echo "CATLADDER_RELEASE_KEY not set — pushing with the workflow token (fails on a repository with merge gating: run 'catladder project setup')"
68
+ fi
69
+
43
70
  # the github counterpart of the gitlab plugin below: it creates the
44
71
  # entry on the releases page with the generated notes. Everything
45
72
  # beyond that is switched off on purpose — commenting on the
@@ -62,6 +89,10 @@ else
62
89
  "@semantic-release/gitlab"'
63
90
  fi
64
91
 
92
+ # NOTE: a project bringing its own .releaserc has to keep "[skip ci]" in
93
+ # the git plugin's commit message on github (see RELEASE_COMMIT_SUFFIX),
94
+ # otherwise a deploy-key push starts the main workflow for the release
95
+ # commit and a second taggedRelease run for the tag.
65
96
  if [ ! -e .releaserc ]; then
66
97
  cat >.releaserc <<EOF
67
98
  {
@@ -98,7 +129,7 @@ if [ ! -e .releaserc ]; then
98
129
  # loop-prevention rule keys on the literal "chore(release)" prefix, so keep
99
130
  # this literal. Don't "fix" it back to \${branch.type}.
100
131
  ["@semantic-release/git", {
101
- "message": "chore(release): \${nextRelease.version}\n\n\${nextRelease.notes}"
132
+ "message": "chore(release): \${nextRelease.version}${RELEASE_COMMIT_SUFFIX}\n\n\${nextRelease.notes}"
102
133
  }]${PUBLISH_PLUGIN}
103
134
  ],
104
135
  "branches": [
@@ -124,11 +155,13 @@ if [ "$GITHUB_ACTIONS" = "true" ]; then
124
155
  TAGS_BEFORE=$(git tag --list 'v[0-9]*')
125
156
  fi
126
157
 
127
- semantic-release
158
+ semantic-release "${SEMANTIC_RELEASE_ARGS[@]}"
128
159
 
129
160
  # tags pushed with the default GITHUB_TOKEN don't trigger `on: push:
130
- # tags` workflows (github's recursion guard) dispatch the
131
- # taggedRelease workflow explicitly for a tag semantic-release created
161
+ # tags` workflows (github's recursion guard), and a deploy-key push
162
+ # carries [skip ci] (see above) dispatch the taggedRelease workflow
163
+ # explicitly for a tag semantic-release created, whichever way it was
164
+ # pushed
132
165
  if [ "$GITHUB_ACTIONS" = "true" ] && [ -f "$CATCI" ]; then
133
166
  if [ -z "$TAGS_BEFORE" ]; then
134
167
  NEW_TAG=$(git tag --list 'v[0-9]*' | tail -n1)