@catladder/cli 0.0.0-next-ebc933f2 → 0.0.0-next-12d216ae

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.
@@ -5588,7 +5588,7 @@ Object.defineProperty(exports, "__esModule", ({
5588
5588
  value: true
5589
5589
  }));
5590
5590
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
5591
- exports.PIPELINE_IMAGE_TAG = "next-ebc933f2" || 0;
5591
+ exports.PIPELINE_IMAGE_TAG = "next-12d216ae" || 0;
5592
5592
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
5593
5593
 
5594
5594
  /***/ }),
@@ -11636,7 +11636,7 @@ Object.defineProperty(exports, "__esModule", ({
11636
11636
  value: true
11637
11637
  }));
11638
11638
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
11639
- exports.PIPELINE_IMAGE_TAG = "next-ebc933f2" || 0;
11639
+ exports.PIPELINE_IMAGE_TAG = "next-12d216ae" || 0;
11640
11640
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
11641
11641
 
11642
11642
  /***/ }),
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: catladder-builds
3
+ description: Configuring how a component is built in a catladder project — the `build` config in catladder.ts (build types node / rails / meteor / custom, build & start commands, artifacts, caching, lint/test/audit jobs, the Docker image, and shared workspace builds). Use when adding or changing a component's build, choosing a build type, wiring a Dockerfile/nginx image, tuning the build/test/lint jobs, or setting up a monorepo workspace build. Triggers on "build config", "buildCommand", "build type", "Dockerfile", "docker image", "rails build", "monorepo build", "artifacts".
4
+ ---
5
+
6
+ # Component builds with catladder
7
+
8
+ Each component in `catladder.ts` has a `build` config that catladder
9
+ turns into the setup/lint/test/build CI jobs and the deployable Docker
10
+ image. Change the build in `catladder.ts` and regenerate
11
+ (`yarn catenv`) — never hand-edit generated pipeline files (see the
12
+ `catladder-config` skill).
13
+
14
+ ```ts
15
+ components: {
16
+ www: {
17
+ dir: "frontend",
18
+ build: {
19
+ type: "node", // node | rails | meteor | custom (+ deprecated node-static/storybook)
20
+ buildCommand: "yarn build",
21
+ startCommand: "yarn start",
22
+ },
23
+ deploy: { /* see catladder-deploys */ },
24
+ },
25
+ }
26
+ ```
27
+
28
+ Set `build: false` to disable building for a component (e.g. a
29
+ deploy-only or docker-tag component).
30
+
31
+ ## Build types
32
+
33
+ | Type | Use for | Notes |
34
+ |---|---|---|
35
+ | `node` | Node/JS apps (Next.js, Vite, plain node) | default `yarn build` + `yarn start`; `docker` selects the runtime image |
36
+ | `rails` | Ruby on Rails apps | Cloud Native Buildpacks when there is no `Dockerfile`; Postgres test DB |
37
+ | `meteor` | Meteor apps | starts `node main.js` |
38
+ | `custom` | anything else | you provide the `jobImage` and `docker` config (both required) |
39
+ | `node-static`, `storybook` | *deprecated* | use `type: "node"` + `docker: { type: "nginx" }` |
40
+
41
+ A component can also **reuse a shared workspace build** instead of a
42
+ type: `build: { from: "web" }` (see workspace builds below).
43
+
44
+ ## Common options (all standalone build types)
45
+
46
+ - `buildCommand` — the build step (`string | string[] | null | false`;
47
+ `false`/`null` skips building).
48
+ - `startCommand` — how the app is started at runtime.
49
+ - `postInstall` — commands run after `yarn install` (node family; needed
50
+ e.g. for Yarn PnP where `package.json` postinstall won't run).
51
+ - `lint` / `test` / `audit` — customize (`{ command, jobImage, … }`) or
52
+ set to `false` to disable that job.
53
+ - `artifactsPaths` / `artifactsExcludePaths` — extra build artifacts
54
+ (`dist` and `.next` are always included).
55
+ - `cache` — build caching (see the `catladder-pipelines` skill for the
56
+ caching model).
57
+ - `jobImage`, `jobTags`, `jobVars`, `runnerVariables` — the CI image,
58
+ runner tags, build-only env vars, and extra runner variables.
59
+ - `docker` — the image build strategy: a built-in
60
+ (`{ type: "nginx" | "node" | "meteor" }`) or
61
+ `{ type: "custom" }` (expects a `Dockerfile`).
62
+
63
+ ## Workspace builds (monorepos)
64
+
65
+ For a shared build across several components, declare it once at the top
66
+ level under `builds` and reference it from each component:
67
+
68
+ ```ts
69
+ builds: {
70
+ web: { type: "node", dir: "packages/web", buildCommand: "yarn build" },
71
+ },
72
+ components: {
73
+ www: { dir: "packages/web", build: { from: "web" }, deploy: { /* … */ } },
74
+ }
75
+ ```
76
+
77
+ Only `type: "node"` workspace builds exist today.
78
+
79
+ ## Full option reference
80
+
81
+ See [references/build-types.md](references/build-types.md) for every
82
+ build type's options, the `docker` sub-config, and the exact defaults.
83
+
84
+ ## Related skills
85
+
86
+ - `catladder-config` — catladder.ts structure and regeneration
87
+ - `catladder-deploys` — the matching `deploy` config
88
+ - `catladder-pipelines` — how build jobs, caching and job images work
89
+ - `catladder-secrets` — env vars available at build time
@@ -0,0 +1,72 @@
1
+ # catladder build config reference
2
+
3
+ Full options for `components.<name>.build` (and top-level `builds`).
4
+ Fix build problems in `catladder.ts` and regenerate — never edit the
5
+ generated pipeline files.
6
+
7
+ ## Shared base options (all standalone build types)
8
+
9
+ | Option | Type | Purpose / default |
10
+ |---|---|---|
11
+ | `buildCommand` | `string \| string[] \| null \| false` | build step; `false`/`null` skips it |
12
+ | `startCommand` | `string` | runtime start command |
13
+ | `postInstall` | `string \| string[]` | runs after `yarn install` (node family) |
14
+ | `lint` / `test` / `audit` | `false \| TestJobCustom` | customize or disable the job |
15
+ | `artifactsPaths` | `string[]` | extra artifacts (`dist`, `.next` always included) |
16
+ | `artifactsExcludePaths` | `string[]` | artifact excludes |
17
+ | `artifactsReports` | `{ junit?: string[] }` | CI test report paths |
18
+ | `cache` | `CacheConfig \| CacheConfig[]` | build caching (`jobCache` is deprecated) |
19
+ | `jobVars` | `EnvVars` | env vars only in build jobs |
20
+ | `runnerVariables` | `Record<string,string>` | extra runner vars (also for `services:`) |
21
+ | `jobTags` | `string[]` | runner tags |
22
+ | `jobImage` | `GitlabJobImage` | custom CI image for the build |
23
+ | `docker` | see below | the deployable image strategy |
24
+
25
+ `TestJobCustom` (for `lint`/`test`/`audit`): `command`, `jobImage`,
26
+ `artifactsReports`, `artifacts`, `runnerVariables`, `allowFailure`
27
+ (`allowFailure` defaults to `true` for `audit`).
28
+
29
+ ## Per-type options & defaults
30
+
31
+ ### `node`
32
+ - `docker?` — built-in node image `{ type: "node", yarnRebuildEnabled?: boolean (default true), additionsBegin?: string[], additionsEnd?: string[] }`, or a custom docker config.
33
+ - Defaults: `buildCommand: "yarn build"`, `startCommand: "yarn start"`, artifacts `["dist", ".next"]`, excludes `[".next/cache/**/*"]`.
34
+
35
+ ### `rails`
36
+ - `test?.databaseImage?` — test DB container image (Postgres only; default `docker.io/postgres:latest`).
37
+ - `cnbBuilder?` — Cloud Native Buildpacks config, used only when there is **no `Dockerfile`**:
38
+ - `image?` — builder image. **Actual runtime default `heroku/builder:24`** (the type's JSDoc saying `heroku/buildpacks:20` is stale).
39
+ - `packVersion?` — pack CLI version. **Actual runtime default `0.36.4`** (JSDoc `0.28.0` is stale).
40
+ - `packExtraArgs?: string[]` — extra args passed to `pack`.
41
+ - `buildVars?: Record<string, string | undefined>` — Bundler / Rails asset-precompile vars (`undefined` inherits from the component's env vars).
42
+
43
+ ### `meteor`
44
+ - `installScripts?: boolean` — run `yarn install` inside the source folder in the image (only needed with custom image scripts).
45
+ - `docker?` — meteor built-in or custom. Default `startCommand: "node main.js"`.
46
+
47
+ ### `custom`
48
+ - `type: "custom"` — **required**.
49
+ - `jobImage: GitlabJobImage` — **required** CI image.
50
+ - `docker: BuildConfigDocker` — **required** image build config.
51
+ - `jobServices?: Services` — services for lint/test/audit/build jobs.
52
+ - `lint?` / `test?` / `audit?: TestJobCustom` — disabled unless set.
53
+
54
+ ### `node-static` / `storybook` — deprecated
55
+ Use `type: "node"` with `docker: { type: "nginx" }` (and
56
+ `startCommand: ""` for a purely static app). `storybook` previously
57
+ defaulted `buildCommand: "yarn build-storybook --quiet -o ./dist"`.
58
+
59
+ ## `docker` sub-config
60
+
61
+ `BuildConfigDocker` is either:
62
+
63
+ - **built-in**: `{ type: "nginx" | "node" | "meteor", additionsBegin?: string[], additionsEnd?: string[] }` — `additionsBegin`/`additionsEnd` inject Dockerfile lines before/after the standard steps.
64
+ - **custom**: `{ type: "custom", buildContextLocation?: "root" | "component" (default "root"), dockerfileContent?: string[] }` — expects a `Dockerfile`. `dockerfileContent` is experimental and supports the `$DOCKER_COPY_WORKSPACE_FILES` / `$DOCKER_COPY_AND_INSTALL_APP` placeholders.
65
+
66
+ ## Workspace builds (`builds`)
67
+
68
+ Top-level `builds: Record<string, WorkspaceBuildConfig>`. Only
69
+ `type: "node"` is supported.
70
+
71
+ - Node workspace build: `dir?`, `buildCommand?` (default `yarn build`), `dockerDefaults?: { yarnRebuildEnabled }`, plus shared `lint?` (default `{ command: "yarn lint" }`), `test?` (default `{ command: "yarn test" }`), `audit?`, `runnerVariables?`, `artifactsReports?`, `jobImage?`, `jobTags?`, `cache?`.
72
+ - A component references it via `build: { from: "<name>", docker?, startCommand?, artifactsPaths?, artifactsExcludePaths?, cache? }` — the per-component overrides layer on top of the shared build.
@@ -49,5 +49,8 @@ it matches the installed version).
49
49
  ## Related skills
50
50
 
51
51
  - `catladder-config` — catladder.ts structure and regeneration
52
+ - `catladder-builds` — the component `build` config
53
+ - `catladder-deploys` — the component `deploy` config
52
54
  - `catladder-secrets` — env vars and secret management
55
+ - `catladder-releases` — releasing (semantic-release / changesets)
53
56
  - `catladder-pipelines` — pipeline behavior and CI debugging
@@ -37,8 +37,8 @@ const config = {
37
37
  www: {
38
38
  dir: "frontend", // working directory of this component
39
39
  vars: { public: {}, secret: [] }, // env vars (see catladder-secrets skill)
40
- build: { type: "node" }, // build types: node | rails | base
41
- deploy: { type: "kubernetes" }, // kubernetes | google-cloudrun | dockerTag | custom
40
+ build: { type: "node" }, // node | rails | meteor | custom — see catladder-builds
41
+ deploy: { type: "kubernetes" }, // kubernetes | google-cloudrun | dockerTag | custom — see catladder-deploys
42
42
  env: { // enable/customize per environment
43
43
  review: {},
44
44
  dev: {},
@@ -77,6 +77,9 @@ Key concepts:
77
77
 
78
78
  ## Related skills
79
79
 
80
+ - `catladder-builds` — the component `build` config (build types, Docker)
81
+ - `catladder-deploys` — the component `deploy` config (k8s, Cloud Run, …)
80
82
  - `catladder-secrets` — env vars and secret management
83
+ - `catladder-releases` — releasing (semantic-release / changesets)
81
84
  - `catladder-pipelines` — how the generated pipelines work, debugging CI
82
85
  - `catladder-cli` — non-interactive CLI usage and command reference
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: catladder-deploys
3
+ description: Configuring how a component is deployed in a catladder project — the `deploy` config in catladder.ts (deploy types kubernetes / google-cloudrun / dockerTag / custom, manual vs auto deploy, resources, autoscaling, health checks, CloudSQL/MongoDB, Cloud Run services/jobs/worker pools, cron jobs). Use when adding or changing a component's deploy, choosing a deploy target, setting resources/replicas/autoscaling, wiring a database, adding cron/scheduled jobs, or making a deploy manual. Triggers on "deploy config", "deploy type", "kubernetes", "cloud run", "cloudrun", "autoscale", "resources", "replicas", "cloudsql", "mongodb", "cronjob", "manual deploy".
4
+ ---
5
+
6
+ # Component deploys with catladder
7
+
8
+ Each component in `catladder.ts` has a `deploy` config that catladder
9
+ turns into the deploy (and stop) CI jobs and the cloud resources. Change
10
+ the deploy in `catladder.ts` and regenerate (`yarn catenv`) — never
11
+ hand-edit generated files (see the `catladder-config` skill). Cloud
12
+ resources themselves are provisioned separately with
13
+ `yarn catladder project setup` (see the `catladder-cli` skill).
14
+
15
+ ```ts
16
+ components: {
17
+ api: {
18
+ dir: "backend",
19
+ build: { /* see catladder-builds */ },
20
+ deploy: {
21
+ type: "kubernetes", // kubernetes | google-cloudrun | dockerTag | custom
22
+ cluster: { type: "gcloud", name: "…", projectId: "…", region: "…" },
23
+ values: { application: { replicas: 2 } },
24
+ },
25
+ },
26
+ }
27
+ ```
28
+
29
+ ## Deploy types
30
+
31
+ | Type | Deploys to | Requires |
32
+ |---|---|---|
33
+ | `kubernetes` | a GKE cluster via Helm | `cluster` |
34
+ | `google-cloudrun` | Google Cloud Run | `projectId`, `region` |
35
+ | `dockerTag` | tags an image (no runtime) | `tag` — rarely used, not generally recommended |
36
+ | `custom` | your own script | `requiresDocker`, `script` |
37
+
38
+ ## Manual vs automatic deploys
39
+
40
+ `when: "manual" | "auto"` controls whether the deploy job runs
41
+ automatically. **Default: `prod` is `manual`, every other environment
42
+ is `auto`.** Set per component or per environment (`env.<name>.deploy`).
43
+
44
+ `waitFor: ["otherComponent"]` (experimental) makes a deploy wait for
45
+ another component to deploy first.
46
+
47
+ ## Kubernetes essentials
48
+
49
+ `cluster` is required: `{ type: "gcloud", name, projectId, region, domainCanonical? }`.
50
+ Everything app-level lives under `values`:
51
+
52
+ - `application` — `replicas`, `autoscale` (`minReplicas`/`maxReplicas`/`metrics`),
53
+ `resources` (cpu/memory limits & requests), `healthRoute`,
54
+ `startupProbe`/`readinessProbe`/`livenessProbe`, `command`,
55
+ `redirects`, `worker` (a separate background deployment). Set
56
+ `application: false` for a component with no long-running deployment.
57
+ - `cloudsql` — attach an (unmanaged) CloudSQL Postgres instance.
58
+ - `mongodb` — a Bitnami MongoDB (`standalone` or `replicaset`).
59
+ - `jobs` — Helm post-install/upgrade jobs; `cronjobs` — scheduled jobs.
60
+
61
+ ## Cloud Run essentials
62
+
63
+ `projectId` and `region` are required. Then:
64
+
65
+ - `service` — the main service (`minInstances`, `maxInstances`, `cpu`,
66
+ `memory`, `timeout`, `allowUnauthenticated`, `ingress`, `healthCheck`,
67
+ …). `service: false` disables it (job-only deployments).
68
+ - `additionalServices`, `jobs`, `workerPools` — extra services, run-to-
69
+ completion jobs, and always-on background worker pools.
70
+ - `cloudSql` — attach an (unmanaged) CloudSQL instance; choose the
71
+ connection-string format (`prisma` default, `rails`, `jdbc`).
72
+ - `execute` — run a script/job/HTTP call at a deploy lifecycle point
73
+ (`preDeploy`/`postDeploy`/`preStop`/`postStop`) or on a `schedule`.
74
+ Prefer this over the deprecated `when`/`schedule` fields on `jobs`.
75
+
76
+ ## Full option reference
77
+
78
+ See [references/deploy-types.md](references/deploy-types.md) for every
79
+ deploy type's options, required fields, and defaults.
80
+
81
+ ## Related skills
82
+
83
+ - `catladder-config` — catladder.ts structure and regeneration
84
+ - `catladder-builds` — the matching `build` config
85
+ - `catladder-pipelines` — how deploy jobs, environments and review apps work
86
+ - `catladder-cli` — `project setup` (provision cloud resources) and `project doctor`
87
+ - `catladder-secrets` — env vars available at runtime
@@ -0,0 +1,62 @@
1
+ # catladder deploy config reference
2
+
3
+ Full options for `components.<name>.deploy` (and per-env
4
+ `env.<name>.deploy`). Fix deploy problems in `catladder.ts` and
5
+ regenerate — never edit generated files. Provision the underlying cloud
6
+ resources with `yarn catladder project setup`; detect drift with
7
+ `yarn catladder project doctor`.
8
+
9
+ ## Shared base (all deploy types)
10
+
11
+ | Option | Type | Purpose / default |
12
+ |---|---|---|
13
+ | `when` | `"manual" \| "auto"` | prod → `manual`, other envs → `auto` |
14
+ | `waitFor` | `string[]` | EXPERIMENTAL; wait for other components first |
15
+ | `jobTags` | `string[]` | runner tags |
16
+ | `jobVars` | `EnvVars` | env vars only in the deploy job |
17
+ | `runnerVariables` | `Record<string,string>` | extra runner vars |
18
+
19
+ (Cloud Run defines its own `execute`; otherwise the base applies to all.)
20
+
21
+ ## `kubernetes`
22
+
23
+ - `cluster` — **required**: `{ type: "gcloud", name, projectId, region, domainCanonical? }`.
24
+ - `debug?: boolean` — pass `--debug` to Helm.
25
+ - `additionalHelmArgs?: string[]`.
26
+ - `chartName?: string` — custom chart location (not recommended).
27
+ - `values?` — app configuration (unknown props allowed, forwarded to the chart):
28
+ - `application?: false | { command?, enabled? (default true), redirects?, hostAliases?, replicas?, autoscale?: { minReplicas, maxReplicas, metrics[] }, updateStrategy?, resources?: { limits/requests: { cpu, memory } }, healthRoute?, startupProbe? / readinessProbe? / livenessProbe? (httpGet shape), worker?, jobDefaults? }`.
29
+ - `cloudsql?: { type: "unmanaged", enabled, instanceConnectionName, dbUser?, dbNamePrefix?, dbBaseName? }`.
30
+ - `mongodb?: { enabled?, dbName?, persistence?, resources?, tolerations? } & ({ architecture: "standalone" } | { architecture: "replicaset", replicaCount? (default 2) })`.
31
+ - `mailhog?: { enabled }` — dev mail catcher (injects `MAIL_URL`).
32
+ - `jobs?: Record<string, false | { command, hook? }>` — Helm hook jobs (default hook `post-install,post-upgrade`).
33
+ - `cronjobs?: Record<string, false | { schedule, command, concurrencyPolicy?, timeZone? }>`.
34
+ - `secretsFromOtherComponent?: { [envVar]: string }` — load secrets from another component in the same cluster.
35
+ - `mapServiceUrlToEnv?: { [envVar]: string }` — map another service's internal endpoint to an env var.
36
+
37
+ ## `google-cloudrun`
38
+
39
+ - `projectId` — **required**.
40
+ - `region` — **required** (`Gcloudregion` enum, e.g. `europe-west6`).
41
+ - `service?: boolean | DeployConfigCloudRunService` (default enabled):
42
+ - `command?`, `args?`, `image?`, `minInstances?` (0), `maxInstances?` (100), `cpu?` (1|2|4|6|8), `memory?` (512MB), `timeout?` (5min), `noCpuThrottling?`, `allowUnauthenticated?` (true), `ingress?` (`all` | `internal` | `internal-and-cloud-load-balancing`, default `all`), `executionEnvironment?` (`gen1`|`gen2`), `http2?`, `gpu?`/`gpuType?`, `sessionAffinity?`, `healthCheck?` (`true` or `{ startupProbe, livenessProbe }`), plus cloud-storage volumes and VPC network config.
43
+ - `additionalServices?: Record<string, service | false | null>`.
44
+ - `jobs?: Record<string, DeployConfigCloudRunJob | false | null>` — `{ command, args?, image?, cpu?, memory? (512Mi), timeout? (10min), parallelism? (1), maxRetries? (0) }`. The per-job `when`/`schedule`/`waitForCompletion` fields are **deprecated** — use `execute`.
45
+ - `workerPools?: Record<string, DeployConfigCloudRunWorkerPool | false | null>` — always-on background work, no endpoint, no autoscaling: `{ command, instances? (1), cpu?, memory?, image?, args?, gpu?/gpuType? }`.
46
+ - `cloudSql?: DeployConfigCloudRunCloudSql | false` — `{ type: "unmanaged", instanceConnectionName, dbUser?, dbNamePrefix?, dbBaseName?, deleteDatabaseOnStop?, dbConnectionStringFormat? ("prisma" default | "rails" | "jdbc"), dbConnectionStringVariablesMode? ("environment" default | "embedded"), dbAdditionalQueryParams? }`.
47
+ - `execute?: Record<string, DeployConfigCloudRunExecute | null>` — run a script / job / HTTP call at a lifecycle point (`when`: `preDeploy` | `postDeploy` | `preStop` | `postStop`) or on a `schedule`.
48
+ - `debug?: boolean`.
49
+
50
+ ## `dockerTag`
51
+
52
+ - `type: "dockerTag"`, `tag: string` — **required**. Adds a custom tag on the image repo to deploy it. Only used in one project historically; not generally recommended (runtime env vars must be coordinated manually).
53
+
54
+ ## `custom`
55
+
56
+ - `type: "custom"` — **required**.
57
+ - `requiresDocker: boolean` — **required**; whether the deploy needs a built Docker image.
58
+ - `script: string[]` — **required**; the deploy script.
59
+ - `requiresYarnInstall?: boolean` — whether the script needs `yarn install`.
60
+ - `stopScript?: string[]` — script to stop/tear down the environment.
61
+ - `jobImage?: GitlabJobImage`.
62
+ - Also accepts `cache` (via `WithCacheConfig`).
@@ -49,7 +49,8 @@ not in the YAML.
49
49
 
50
50
  With `releases` configured, tagged releases are created by a release
51
51
  job (method: `semantic-release` or `changesets`). The release job also
52
- runs a dependency security audit via catci.
52
+ runs a dependency security audit that gates the release. See the
53
+ `catladder-releases` skill for the full flow.
53
54
 
54
55
  ## Debugging CI
55
56
 
@@ -68,5 +69,8 @@ Useful CLI commands (see the `catladder-cli` skill for invocation):
68
69
  ## Related skills
69
70
 
70
71
  - `catladder-config` — catladder.ts structure and regeneration
72
+ - `catladder-builds` — build jobs and Docker images
73
+ - `catladder-deploys` — deploy jobs, environments and review apps
74
+ - `catladder-releases` — the `taggedRelease` flow and security-audit gate
71
75
  - `catladder-secrets` — env vars and secret management
72
76
  - `catladder-cli` — non-interactive CLI usage and command reference
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: catladder-releases
3
+ description: How releases work in a catladder project — the `releases` config in catladder.ts (manual vs automatic releasing, and the release method: semantic-release from conventional commits, or changesets from `.changeset/*.md` files), the version/tag/changelog flow, and the security-audit gate that every release must pass. Use when enabling or changing releases, deciding between semantic-release and changesets, writing changesets, cutting or debugging a release, or when a release job fails on the security audit. Triggers on "release", "releases config", "semantic-release", "changesets", "changeset", "version bump", "tag a release", "security audit", "release failed".
4
+ ---
5
+
6
+ # Releases with catladder
7
+
8
+ A release is what produces a `vX.Y.Z` git tag (with a changelog), which
9
+ in turn triggers the `taggedRelease` pipeline that deploys to `stage`
10
+ and `prod` (see the `catladder-pipelines` skill). Enable it in
11
+ `catladder.ts`:
12
+
13
+ ```ts
14
+ releases: {
15
+ when: "auto", // "manual" (default) | "auto"
16
+ method: "semantic-release", // "semantic-release" (default) | "changesets"
17
+ }
18
+ ```
19
+
20
+ Change `catladder.ts` and regenerate (`yarn catenv`) — the release jobs
21
+ are generated, never hand-edited.
22
+
23
+ ## `when` — who triggers the release
24
+
25
+ - **`manual`** (default) — the `create release` job on the main branch
26
+ is manual; someone runs it to cut a release.
27
+ - **`auto`** — the release job runs automatically on every main-branch
28
+ pipeline (it still no-ops when there is nothing to release).
29
+
30
+ There is always also a manual **`⚠️ force create release`** job as an
31
+ escape hatch.
32
+
33
+ ## `method` — how the version is decided
34
+
35
+ ### `semantic-release` (default)
36
+ The version is derived automatically from **conventional commit
37
+ messages** since the last release (`fix:` → patch, `feat:` → minor,
38
+ `BREAKING CHANGE` → major). Nothing to declare by hand — just write
39
+ conventional commits.
40
+
41
+ ### `changesets`
42
+ Developers declare changes intentionally as **`.changeset/*.md` files**
43
+ (the official changesets format: a bump type + a human-written summary).
44
+ The release job consumes all pending changesets, takes the highest bump,
45
+ computes the next version from the last `v*` git tag, writes the
46
+ changelog, commits `chore(release): <version>`, and pushes the tag. An
47
+ empty `.changeset/` folder means there is nothing to release.
48
+
49
+ Add a changeset by creating `.changeset/<name>.md`:
50
+
51
+ ```md
52
+ ---
53
+ "my-app": minor
54
+ ---
55
+
56
+ Add the new export endpoint.
57
+ ```
58
+
59
+ ## The security-audit gate
60
+
61
+ **Both methods gate on a dependency security audit before releasing.**
62
+ The release entrypoint runs the audit first; only if it passes does it
63
+ create the version, changelog and tag. On GitLab, if the audit document
64
+ is missing or invalid the job opens a merge request with a security-audit
65
+ template and **fails** — resolve that MR, then re-run the release. See
66
+ the `security` commands in the `catladder-cli` reference.
67
+
68
+ ## Debugging a failed release
69
+
70
+ - Fails immediately on the audit → handle the security-audit gate above.
71
+ - `changesets` released nothing → no `.changeset/*.md` files were
72
+ pending.
73
+ - Wrong version bump → check commit types (semantic-release) or the bump
74
+ levels in the changeset files (changesets).
75
+ - Inspect the job with `yarn catladder project ci job-log` (see the
76
+ `catladder-cli` skill).
77
+
78
+ ## Related skills
79
+
80
+ - `catladder-config` — catladder.ts structure and regeneration
81
+ - `catladder-pipelines` — the `taggedRelease` trigger and stage/prod deploys
82
+ - `catladder-cli` — `project ci` and `security` commands
@@ -70,5 +70,7 @@ suspecting anything else.
70
70
  ## Related skills
71
71
 
72
72
  - `catladder-config` — general catladder.ts structure and regeneration
73
+ - `catladder-builds` — build-time vars (`jobVars`) and build config
74
+ - `catladder-deploys` — runtime deploy config
73
75
  - `catladder-pipelines` — how the generated pipelines work
74
76
  - `catladder-cli` — non-interactive CLI usage and command reference
@@ -286,13 +286,13 @@ export type BuildConfigRails = BuildConfigBase & {
286
286
  /**
287
287
  * The Cloud Native Buildpacks builder image to use.
288
288
  * See e.g. https://github.com/heroku/builder or others.
289
- * Default: heroku/buildpacks:20
289
+ * Default: heroku/builder:24
290
290
  */
291
291
  image?: string;
292
292
  /**
293
293
  * The version of the Cloud Native Buildpacks pack command to use.
294
294
  * See https://buildpacks.io/docs/tools/pack/
295
- * Default: 0.28.0
295
+ * Default: 0.36.4
296
296
  */
297
297
  packVersion?: string;
298
298
  /**
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
7
- exports.PIPELINE_IMAGE_TAG = "next-ebc933f2" || "latest";
7
+ exports.PIPELINE_IMAGE_TAG = "next-12d216ae" || "latest";
8
8
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || "git.panter.ch:5001/catladder/catladder";
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: catladder-builds
3
+ description: Configuring how a component is built in a catladder project — the `build` config in catladder.ts (build types node / rails / meteor / custom, build & start commands, artifacts, caching, lint/test/audit jobs, the Docker image, and shared workspace builds). Use when adding or changing a component's build, choosing a build type, wiring a Dockerfile/nginx image, tuning the build/test/lint jobs, or setting up a monorepo workspace build. Triggers on "build config", "buildCommand", "build type", "Dockerfile", "docker image", "rails build", "monorepo build", "artifacts".
4
+ ---
5
+
6
+ # Component builds with catladder
7
+
8
+ Each component in `catladder.ts` has a `build` config that catladder
9
+ turns into the setup/lint/test/build CI jobs and the deployable Docker
10
+ image. Change the build in `catladder.ts` and regenerate
11
+ (`yarn catenv`) — never hand-edit generated pipeline files (see the
12
+ `catladder-config` skill).
13
+
14
+ ```ts
15
+ components: {
16
+ www: {
17
+ dir: "frontend",
18
+ build: {
19
+ type: "node", // node | rails | meteor | custom (+ deprecated node-static/storybook)
20
+ buildCommand: "yarn build",
21
+ startCommand: "yarn start",
22
+ },
23
+ deploy: { /* see catladder-deploys */ },
24
+ },
25
+ }
26
+ ```
27
+
28
+ Set `build: false` to disable building for a component (e.g. a
29
+ deploy-only or docker-tag component).
30
+
31
+ ## Build types
32
+
33
+ | Type | Use for | Notes |
34
+ |---|---|---|
35
+ | `node` | Node/JS apps (Next.js, Vite, plain node) | default `yarn build` + `yarn start`; `docker` selects the runtime image |
36
+ | `rails` | Ruby on Rails apps | Cloud Native Buildpacks when there is no `Dockerfile`; Postgres test DB |
37
+ | `meteor` | Meteor apps | starts `node main.js` |
38
+ | `custom` | anything else | you provide the `jobImage` and `docker` config (both required) |
39
+ | `node-static`, `storybook` | *deprecated* | use `type: "node"` + `docker: { type: "nginx" }` |
40
+
41
+ A component can also **reuse a shared workspace build** instead of a
42
+ type: `build: { from: "web" }` (see workspace builds below).
43
+
44
+ ## Common options (all standalone build types)
45
+
46
+ - `buildCommand` — the build step (`string | string[] | null | false`;
47
+ `false`/`null` skips building).
48
+ - `startCommand` — how the app is started at runtime.
49
+ - `postInstall` — commands run after `yarn install` (node family; needed
50
+ e.g. for Yarn PnP where `package.json` postinstall won't run).
51
+ - `lint` / `test` / `audit` — customize (`{ command, jobImage, … }`) or
52
+ set to `false` to disable that job.
53
+ - `artifactsPaths` / `artifactsExcludePaths` — extra build artifacts
54
+ (`dist` and `.next` are always included).
55
+ - `cache` — build caching (see the `catladder-pipelines` skill for the
56
+ caching model).
57
+ - `jobImage`, `jobTags`, `jobVars`, `runnerVariables` — the CI image,
58
+ runner tags, build-only env vars, and extra runner variables.
59
+ - `docker` — the image build strategy: a built-in
60
+ (`{ type: "nginx" | "node" | "meteor" }`) or
61
+ `{ type: "custom" }` (expects a `Dockerfile`).
62
+
63
+ ## Workspace builds (monorepos)
64
+
65
+ For a shared build across several components, declare it once at the top
66
+ level under `builds` and reference it from each component:
67
+
68
+ ```ts
69
+ builds: {
70
+ web: { type: "node", dir: "packages/web", buildCommand: "yarn build" },
71
+ },
72
+ components: {
73
+ www: { dir: "packages/web", build: { from: "web" }, deploy: { /* … */ } },
74
+ }
75
+ ```
76
+
77
+ Only `type: "node"` workspace builds exist today.
78
+
79
+ ## Full option reference
80
+
81
+ See [references/build-types.md](references/build-types.md) for every
82
+ build type's options, the `docker` sub-config, and the exact defaults.
83
+
84
+ ## Related skills
85
+
86
+ - `catladder-config` — catladder.ts structure and regeneration
87
+ - `catladder-deploys` — the matching `deploy` config
88
+ - `catladder-pipelines` — how build jobs, caching and job images work
89
+ - `catladder-secrets` — env vars available at build time