@catladder/cli 5.4.1 → 5.6.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.
- package/dist/bundles/catenv/index.js +390 -53
- package/dist/bundles/catenv/xdg-open +0 -0
- package/dist/bundles/cli/clipboard_i686.exe +0 -0
- package/dist/bundles/cli/clipboard_x86_64.exe +0 -0
- package/dist/bundles/cli/index.js +390 -53
- package/dist/bundles/cli/xdg-open +0 -0
- package/dist/bundles/cli/xsel +0 -0
- package/dist/bundles/runner-images/changesets/scripts/changesetsRelease +0 -0
- package/dist/bundles/runner-images/kubernetes/scripts/kubernetesCreateSecret +0 -0
- package/dist/bundles/runner-images/kubernetes/scripts/kubernetesDelete +0 -0
- package/dist/bundles/runner-images/kubernetes/scripts/kubernetesDeploy +0 -0
- package/dist/bundles/runner-images/kubernetes/scripts/kubernetesRollback +0 -0
- package/dist/bundles/skills/catladder-builds/SKILL.md +50 -2
- package/dist/bundles/skills/catladder-builds/references/build-types.md +10 -2
- package/dist/bundles/skills/catladder-config/SKILL.md +18 -7
- package/dist/bundles/skills/catladder-pipelines/SKILL.md +39 -20
- package/dist/packages/pipeline/src/backends/github/artifactArchive.d.ts +22 -0
- package/dist/packages/pipeline/src/backends/github/artifactArchive.js +84 -0
- package/dist/packages/pipeline/src/backends/github/artifactArchive.js.map +1 -0
- package/dist/packages/pipeline/src/backends/github/createGithubJobs.js +12 -29
- package/dist/packages/pipeline/src/backends/github/createGithubJobs.js.map +1 -1
- package/dist/packages/pipeline/src/backends/gitlab/GitlabBackend.js +3 -1
- package/dist/packages/pipeline/src/backends/gitlab/GitlabBackend.js.map +1 -1
- package/dist/packages/pipeline/src/backends/gitlab/getPipelineStages.d.ts +4 -1
- package/dist/packages/pipeline/src/backends/gitlab/getPipelineStages.js +11 -2
- package/dist/packages/pipeline/src/backends/gitlab/getPipelineStages.js.map +1 -1
- package/dist/packages/pipeline/src/build/types.d.ts +4 -3
- package/dist/packages/pipeline/src/build/types.js.map +1 -1
- package/dist/packages/pipeline/src/config/configruedEnvs.js +7 -1
- package/dist/packages/pipeline/src/config/configruedEnvs.js.map +1 -1
- package/dist/packages/pipeline/src/context/getEnvInherit.d.ts +2 -2
- package/dist/packages/pipeline/src/context/getEnvInherit.js +5 -2
- package/dist/packages/pipeline/src/context/getEnvInherit.js.map +1 -1
- package/dist/packages/pipeline/src/context/getEnvInstance.d.ts +2 -2
- package/dist/packages/pipeline/src/context/getEnvInstance.js.map +1 -1
- package/dist/packages/pipeline/src/context/getEnvOn.d.ts +2 -2
- package/dist/packages/pipeline/src/context/getEnvOn.js +1 -1
- package/dist/packages/pipeline/src/context/getEnvOn.js.map +1 -1
- package/dist/packages/pipeline/src/context/getEnvType.d.ts +3 -3
- package/dist/packages/pipeline/src/context/getEnvType.js +1 -1
- package/dist/packages/pipeline/src/context/getEnvType.js.map +1 -1
- package/dist/packages/pipeline/src/context/getEnvironmentContext.js +3 -2
- package/dist/packages/pipeline/src/context/getEnvironmentContext.js.map +1 -1
- package/dist/packages/pipeline/src/deploy/base/deploy.js +15 -9
- package/dist/packages/pipeline/src/deploy/base/deploy.js.map +1 -1
- package/dist/packages/pipeline/src/index.d.ts +1 -0
- package/dist/packages/pipeline/src/index.js +1 -0
- package/dist/packages/pipeline/src/index.js.map +1 -1
- package/dist/packages/pipeline/src/pipeline/createJobsForComponent.js +12 -2
- package/dist/packages/pipeline/src/pipeline/createJobsForComponent.js.map +1 -1
- package/dist/packages/pipeline/src/pipeline/createJobsForWorkspace.js +7 -2
- package/dist/packages/pipeline/src/pipeline/createJobsForWorkspace.js.map +1 -1
- package/dist/packages/pipeline/src/pipeline/resolveRequirements.js +1 -0
- package/dist/packages/pipeline/src/pipeline/resolveRequirements.js.map +1 -1
- package/dist/packages/pipeline/src/postBuildTest/createPostBuildTestJobs.d.ts +16 -0
- package/dist/packages/pipeline/src/postBuildTest/createPostBuildTestJobs.js +167 -0
- package/dist/packages/pipeline/src/postBuildTest/createPostBuildTestJobs.js.map +1 -0
- package/dist/packages/pipeline/src/postBuildTest/index.d.ts +2 -0
- package/dist/packages/pipeline/src/postBuildTest/index.js +19 -0
- package/dist/packages/pipeline/src/postBuildTest/index.js.map +1 -0
- package/dist/packages/pipeline/src/postBuildTest/types.d.ts +61 -0
- package/dist/packages/pipeline/src/postBuildTest/types.js +3 -0
- package/dist/packages/pipeline/src/postBuildTest/types.js.map +1 -0
- package/dist/packages/pipeline/src/types/config.d.ts +20 -2
- package/dist/packages/pipeline/src/types/config.js +9 -1
- package/dist/packages/pipeline/src/types/config.js.map +1 -1
- package/dist/packages/pipeline/src/types/jobs.d.ts +2 -2
- package/dist/packages/pipeline/src/types/jobs.js +1 -0
- package/dist/packages/pipeline/src/types/jobs.js.map +1 -1
- package/dist/runner-images/changesets/scripts/changesetsRelease +0 -0
- package/dist/runner-images/kubernetes/scripts/kubernetesCreateSecret +0 -0
- package/dist/runner-images/kubernetes/scripts/kubernetesDelete +0 -0
- package/dist/runner-images/kubernetes/scripts/kubernetesDeploy +0 -0
- package/dist/runner-images/kubernetes/scripts/kubernetesRollback +0 -0
- package/dist/skills/catladder-builds/SKILL.md +50 -2
- package/dist/skills/catladder-builds/references/build-types.md +10 -2
- package/dist/skills/catladder-config/SKILL.md +18 -7
- package/dist/skills/catladder-pipelines/SKILL.md +39 -20
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -11,12 +11,12 @@ generated YAML.
|
|
|
11
11
|
|
|
12
12
|
## Triggers and environments
|
|
13
13
|
|
|
14
|
-
| Trigger
|
|
15
|
-
|
|
16
|
-
| `mainBranch`
|
|
17
|
-
| `mr`
|
|
18
|
-
| `taggedRelease`
|
|
19
|
-
| `{ branch: "<name>" }` | push to that branch
|
|
14
|
+
| Trigger | Runs on | Deploys to (default) |
|
|
15
|
+
| ---------------------- | ----------------------- | ---------------------------- |
|
|
16
|
+
| `mainBranch` | push to the main branch | `dev` |
|
|
17
|
+
| `mr` | merge/pull requests | `review` (one app per MR/PR) |
|
|
18
|
+
| `taggedRelease` | git tags | `stage`, `prod` |
|
|
19
|
+
| `{ branch: "<name>" }` | push to that branch | envs declaring it via `on` |
|
|
20
20
|
|
|
21
21
|
The trigger of each env is its `on` in the top-level `environments`
|
|
22
22
|
config (project-wide — components cannot diverge), defaulting from the
|
|
@@ -25,6 +25,9 @@ own pipeline (gitlab: rules on `$CI_COMMIT_BRANCH`; github: a
|
|
|
25
25
|
`catladder-branch-<name>.yml` workflow) and deploys as one stable,
|
|
26
26
|
branch-tracking environment — unlike review apps, it is not
|
|
27
27
|
per-instance and is stopped via the manual stop job/workflow.
|
|
28
|
+
`on: false` keeps an env out of every pipeline but the env still exists
|
|
29
|
+
(setup, secrets, catenv); `environments: { <name>: false }` removes it
|
|
30
|
+
entirely.
|
|
28
31
|
|
|
29
32
|
Generated layout:
|
|
30
33
|
|
|
@@ -34,39 +37,40 @@ Generated layout:
|
|
|
34
37
|
"generated by catladder" header; others are unmanaged). Manual
|
|
35
38
|
actions are per-kind `workflow_dispatch` workflows, visually grouped
|
|
36
39
|
by their emoji prefix in the Actions sidebar: `🚀 catladder create
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
release`, `▶️ catladder deploy` (manual-gated deploys), `🛑 catladder
|
|
41
|
+
stop`, `↩️ catladder rollback` — when all of a kind's tasks target one
|
|
39
42
|
env the name carries it (e.g. `▶️ catladder deploy prod`); otherwise
|
|
40
43
|
pick the task from the workflow's dropdown. Review apps are stopped
|
|
41
44
|
automatically when their pull request closes (`🛑 catladder stop
|
|
42
|
-
|
|
45
|
+
review app`); the same workflow can be dispatched with a PR number to
|
|
43
46
|
tear one down while the pull request is still open (gitlab runs these as manual jobs inside the pipeline
|
|
44
47
|
instead).
|
|
45
48
|
|
|
46
|
-
Stages: setup → test → build →
|
|
47
|
-
|
|
49
|
+
Stages: setup → test → build → post-build (`postBuildTests` against
|
|
50
|
+
the build output, block the deploy) → deploy → verify (post-deploy
|
|
51
|
+
checks), plus stop jobs for review-app teardown.
|
|
48
52
|
|
|
49
53
|
## Superseded pipelines are cancelled
|
|
50
54
|
|
|
51
55
|
Pushing a new commit cancels the pipeline of the previous one, so the
|
|
52
56
|
runners are not busy with results nobody will read.
|
|
53
57
|
|
|
54
|
-
| Pipeline
|
|
55
|
-
|
|
56
|
-
| `mr`
|
|
57
|
-
| `mainBranch` (dev)
|
|
58
|
-
| `taggedRelease`
|
|
59
|
-
| agent runs (`trigger`) | **runs through** — never cancelled
|
|
58
|
+
| Pipeline | On a new commit |
|
|
59
|
+
| ---------------------- | ------------------------------------------- |
|
|
60
|
+
| `mr` | cancelled |
|
|
61
|
+
| `mainBranch` (dev) | cancelled, except a release already running |
|
|
62
|
+
| `taggedRelease` | **runs through** — never cancelled |
|
|
63
|
+
| agent runs (`trigger`) | **runs through** — never cancelled |
|
|
60
64
|
|
|
61
65
|
- **GitHub**: the generated MR workflow sets `concurrency` with
|
|
62
66
|
`cancel-in-progress: true`.
|
|
63
67
|
- **GitLab**: generated `workflow:auto_cancel:on_new_commit:
|
|
64
|
-
|
|
68
|
+
interruptible`, with per-rule `none` for tags and agent runs. Every
|
|
65
69
|
job carries an explicit `interruptible`, jobs that must finish
|
|
66
70
|
(release jobs, agent jobs) carry `interruptible: false`.
|
|
67
71
|
|
|
68
72
|
**GitLab requires the project setting too.** The generated YAML only
|
|
69
|
-
tunes
|
|
73
|
+
tunes _how_ redundant pipelines are cancelled — it does not switch the
|
|
70
74
|
feature on. If old pipelines keep running, check **Settings > CI/CD >
|
|
71
75
|
General pipelines > Auto-cancel redundant pipelines**; with that
|
|
72
76
|
checkbox off nothing is ever cancelled. (`catladder project-doctor`
|
|
@@ -74,7 +78,7 @@ does not check this.)
|
|
|
74
78
|
|
|
75
79
|
**Adding a hand-written GitLab job?** Set `interruptible` explicitly.
|
|
76
80
|
GitLab defaults it to `false`, and a non-interruptible job that has
|
|
77
|
-
started keeps
|
|
81
|
+
started keeps _itself_ alive — under gitlab's own default
|
|
78
82
|
(`conservative`, which catladder overrides) it would shield the whole
|
|
79
83
|
pipeline from cancellation.
|
|
80
84
|
|
|
@@ -148,6 +152,21 @@ pipelines: { github: { repository: "AcmeCorp/Nautilus" } },
|
|
|
148
152
|
`yarn catladder project doctor` reports a mixed-case repository whose
|
|
149
153
|
generated workflows still carry the expression.
|
|
150
154
|
|
|
155
|
+
### Artifacts between jobs (GitHub)
|
|
156
|
+
|
|
157
|
+
A job's `artifacts.paths` are handed to the jobs that need them as one
|
|
158
|
+
tar archive (`catladder-artifacts-<job-id>.tar`): an "Archive
|
|
159
|
+
artifacts" step tars them after the job, `upload-artifact` uploads the
|
|
160
|
+
archive under the job id, and the consumers get a matching "Extract
|
|
161
|
+
artifacts" step after `download-artifact`. The tar keeps symlinks, file
|
|
162
|
+
modes and repo-relative paths, as GitLab artifacts do. Plain
|
|
163
|
+
`upload-artifact` loses them, which breaks Next.js/Turbopack builds in
|
|
164
|
+
pnpm workspaces: `.next/node_modules/<pkg>-<hash>` are symlinks into
|
|
165
|
+
the pnpm store, and as copied directories they fail at runtime with
|
|
166
|
+
`ERR_MODULE_NOT_FOUND`. If a deployed app shows that error, check that
|
|
167
|
+
the committed workflows contain the archive steps and regenerate if
|
|
168
|
+
they don't.
|
|
169
|
+
|
|
151
170
|
## Caching
|
|
152
171
|
|
|
153
172
|
Cache configuration is generated per build type. **yarn** node builds
|