@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.
- package/dist/apps/cli/src/apps/cli/commands/project/doctor/checkGithubReleaseWorkflow.d.ts +30 -0
- package/dist/apps/cli/src/apps/cli/commands/project/doctor/checkGithubReleaseWorkflow.js +89 -0
- package/dist/apps/cli/src/apps/cli/commands/project/doctor/checkGithubReleaseWorkflow.js.map +1 -0
- package/dist/apps/cli/src/apps/cli/commands/project/doctor/index.js +2 -0
- package/dist/apps/cli/src/apps/cli/commands/project/doctor/index.js.map +1 -1
- package/dist/apps/cli/src/apps/cli/commands/project/githubMergeGating.d.ts +4 -1
- package/dist/apps/cli/src/apps/cli/commands/project/githubMergeGating.js +4 -1
- package/dist/apps/cli/src/apps/cli/commands/project/githubMergeGating.js.map +1 -1
- package/dist/apps/cli/src/catci.js +13 -0
- package/dist/apps/cli/src/catci.js.map +1 -1
- package/dist/apps/cli/src/release/changesetsReleaseJob.js +20 -42
- package/dist/apps/cli/src/release/changesetsReleaseJob.js.map +1 -1
- package/dist/apps/cli/src/release/githubDeployKey.d.ts +36 -0
- package/dist/apps/cli/src/release/githubDeployKey.js +126 -0
- package/dist/apps/cli/src/release/githubDeployKey.js.map +1 -0
- package/dist/bundles/catci/index.js +5 -5
- package/dist/bundles/catenv/index.js +31 -7
- package/dist/bundles/cli/index.js +133 -8
- package/dist/bundles/runner-images/semantic-release/Dockerfile +3 -1
- package/dist/bundles/runner-images/semantic-release/scripts/semanticRelease +37 -4
- package/dist/bundles/skills/catladder-migrate-ci-backend/SKILL.md +15 -6
- package/dist/bundles/skills/catladder-pipelines/SKILL.md +3 -2
- package/dist/bundles/skills/catladder-releases/SKILL.md +14 -0
- package/dist/packages/pipeline/src/backends/github/GithubBackend.js +12 -3
- package/dist/packages/pipeline/src/backends/github/GithubBackend.js.map +1 -1
- package/dist/packages/pipeline/src/catci/shippedCatci.d.ts +8 -0
- package/dist/packages/pipeline/src/catci/shippedCatci.js +19 -4
- package/dist/packages/pipeline/src/catci/shippedCatci.js.map +1 -1
- package/dist/runner-images/semantic-release/Dockerfile +3 -1
- package/dist/runner-images/semantic-release/scripts/semanticRelease +37 -4
- package/dist/skills/catladder-migrate-ci-backend/SKILL.md +15 -6
- package/dist/skills/catladder-pipelines/SKILL.md +3 -2
- package/dist/skills/catladder-releases/SKILL.md +14 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/apps/cli/commands/project/__tests__/checkGithubReleaseWorkflow.test.ts +89 -0
- package/src/apps/cli/commands/project/doctor/checkGithubReleaseWorkflow.ts +125 -0
- package/src/apps/cli/commands/project/doctor/index.ts +2 -0
- package/src/apps/cli/commands/project/githubMergeGating.ts +4 -1
- package/src/catci.ts +15 -0
- package/src/release/__tests__/githubDeployKey.test.ts +148 -0
- package/src/release/changesetsReleaseJob.ts +28 -57
- package/src/release/githubDeployKey.ts +141 -0
|
@@ -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
|
|
187
|
-
`
|
|
188
|
-
|
|
189
|
-
|
|
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
|
|
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)
|
|
74
|
-
|
|
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
|