How catladder pipelines work
All pipeline files are generated from catladder.ts â fix pipeline
problems in the config (see catladder-config skill), never in the
generated YAML.
Triggers and environmentsâ
| Trigger | Runs on | Deploys to |
|---|---|---|
mainBranch | push to the main branch | dev |
mr | merge/pull requests | review (one app per MR/PR) |
taggedRelease | git tags | stage, prod |
Generated layout:
- GitLab:
.gitlab-ci.ymlincludes generated files from.catladder-generated/gitlab/(one per trigger). - GitHub: workflows in
.github/workflows/(generated ones carry a "generated by catladder" header; others are unmanaged). Manual actions are per-kindworkflow_dispatchworkflows, visually grouped by their emoji prefix in the Actions sidebar:đ catladder create release,âļī¸ catladder deploy(manual-gated deploys),đ catladder stop,âŠī¸ catladder rollbackâ when all of a kind's tasks target one env the name carries it (e.g.âļī¸ catladder deploy prod); otherwise pick the task from the workflow's dropdown. Review apps are stopped automatically when their pull request closes (đ catladder stop review app); the same workflow can be dispatched with a PR number to tear one down while the pull request is still open (gitlab runs these as manual jobs inside the pipeline instead).
Stages: setup â test â build â deploy â verify (post-deploy checks), plus stop jobs for review-app teardown.
Review-app auto-stop and pinning (GitLab)â
GitLab review environments stop automatically after 1 week, dev
environments after 4 weeks. Configure with top-level autoStop in
catladder.ts ({ review, dev }, gitlab natural language like
"3 days" or "never"). Merging or closing the MR always stops its
review apps, independent of the timer.
To keep an MR's review apps alive longer, pin the MR:
yarn catladder mr pinâ adds the pin label (defaultcatladder::pin-review, configurable viaautoStop.pinLabel) to the current branch's open MR and triggers a pipeline so the pin takes effect immediately. While the label is set, ALL components' review apps deploy withauto_stop_in: never.yarn catladder mr unpinâ removes the label; the auto-stop timer re-arms with the next deploy.
The pin lives on the MR (a label), not on the environment, so it survives redeploys â unlike gitlab's per-environment pin button, which the next successful deploy resets. Adding/removing the label by hand works too; a label change takes effect from the MR's next pipeline.
GitHub has no auto-stop: review apps run until the pull request is closed (pinning does not apply there).
Job images and catciâ
Jobs run in catladder-provided images (đŗ catladder image <name> build
jobs). Their definitions are materialized into
.catladder-generated/images/ and built in the project's own registry
under catladder/ (content-hashed, rebuilt only on change).
.catladder-generated/catci/ holds a small bundled CI companion used by
generated jobs (e.g. the release security audit) â all generated, never
edit.
Projects can declare their own job images under images in
catladder.ts (đŗ image <name> build jobs, pushed to job-images/ in
the registry) and reference them in any jobImage field via
{ image: "<name>" } â see the catladder-builds skill. A declared
Dockerfile directory is used in place; an inline dockerfile is
materialized into .catladder-generated/images/project/<name>/. Either
way the build job is skipped when the content hash already exists in
the registry.
Cachingâ
Cache configuration is generated per build type. yarn node builds
cache node_modules and the .yarn zip cache; GitLab uses mutable
caches with fallback keys (review branches fall back to the dev cache),
GitHub immutable lockfile-keyed caches where only the build job writes.
pnpm builds cache nothing: measured on a 3800-package monorepo,
moving the store or node_modules through a CI cache costs more than
pnpm's from-registry install.
Caching behavior is changed via the build config in catladder.ts,
not in the YAML.
Releasesâ
With releases configured, tagged releases are created by a release
job (method: semantic-release or changesets). The release job also
runs a dependency security audit that gates the release. See the
catladder-releases skill for the full flow.
Debugging CIâ
Useful CLI commands (see the catladder-cli skill for invocation):
yarn catladder project ci job-log/project ci job-openâ fetch or open a CI jobyarn catladder project doctorâ detect drift betweencatladder.tsand the actually provisioned infrastructure (missing IAM roles, stale secrets, ...). Run this when a deploy/teardown fails with permission errors even though the config looks right; fix findings withyarn catladder project setup [component].yarn catladder project logs open,project k8s list-pods,project k8s get-shellâ inspect the running deployments
Related skillsâ
catladder-configâ catladder.ts structure and regenerationcatladder-buildsâ build jobs and Docker imagescatladder-deploysâ deploy jobs, environments and review appscatladder-releasesâ thetaggedReleaseflow and security-audit gatecatladder-secretsâ env vars and secret managementcatladder-cliâ non-interactive CLI usage and command referencecatladder-migrate-ci-backendâ moving between GitLab CI and GitHub Actions (running both in parallel, then cutting over)