# branchd pipelines

> How to write .branchd/pipelines/*.yaml for branchd: the quick start, concepts, every guide with its complete example file, reuse, security, and the full reference, limits and refusals. Use only keys documented here.

Everything on one page: https://docs.xeonr.io/docs/branchd/pipelines/llms-full.txt
The complete reference alone, as Markdown: https://docs.xeonr.io/docs/branchd/pipelines/reference.md

## Pages

- [Pipelines](https://docs.xeonr.io/docs/branchd/pipelines): What a branchd pipeline is, what is available today, and where each task and key is documented.
- [Quick start](https://docs.xeonr.io/docs/branchd/pipelines/quickstart): In five minutes, add a pipeline to a repository, check it locally, push it, and read its checks.
- [Concepts](https://docs.xeonr.io/docs/branchd/pipelines/concepts): The few ideas a pipeline file is built from, and what branchd decides before a run starts.
- [Run tests on a pull request](https://docs.xeonr.io/docs/branchd/pipelines/test-on-pull-request): Test every pull request and every push to main, and require the checks before a pull request merges.
- [Build and push an image](https://docs.xeonr.io/docs/branchd/pipelines/build-and-push-an-image): Build the repository's Dockerfile, push the image to the branchd registry, and run a job in the image you built.
- [Run a job for several versions (matrix)](https://docs.xeonr.io/docs/branchd/pipelines/matrix): Run one job once for each combination of values, such as Go versions and databases.
- [Reuse a step (composite steps)](https://docs.xeonr.io/docs/branchd/pipelines/composite-steps): Keep a list of steps with inputs in a file of its own, and use it from any job of the repository.
- [Call a pipeline (reusable pipelines)](https://docs.xeonr.io/docs/branchd/pipelines/reusable-pipelines): Write jobs once in a pipeline file with on: call, and use them as one job of another pipeline.
- [Run on a schedule](https://docs.xeonr.io/docs/branchd/pipelines/schedules): Run a pipeline on a timetable, on the default branch or another one.
- [Trigger another repository's pipeline](https://docs.xeonr.io/docs/branchd/pipelines/trigger-another-repository): Start a run of a pipeline in another repository, at its own ref and with its own secrets, and optionally wait for its result.
- [A manual pipeline with inputs](https://docs.xeonr.io/docs/branchd/pipelines/manual-runs): Let a person start a pipeline by hand, with typed inputs that the jobs read.
- [The job token](https://docs.xeonr.io/docs/branchd/pipelines/job-token): Use $BRANCHD_TOKEN with git and curl, ask for more with permissions:, and what it can never do.
- [Isolate a step from the job](https://docs.xeonr.io/docs/branchd/pipelines/isolated-steps): Run a typed step among run: steps with isolated: true, and choose what it receives and hands back with workspace:.
- [Test a Go service with a database](https://docs.xeonr.io/docs/branchd/pipelines/test-go-with-database): Run a Go service's tests against a MySQL database that runs beside the job.
- [Test a Node.js project](https://docs.xeonr.io/docs/branchd/pipelines/test-node): Install, lint, test and build a Node.js project with pnpm, keeping the package store between runs.
- [Deploy](https://docs.xeonr.io/docs/branchd/pipelines/deploy): Build on every push and deploy to stage from the stage branch and to production from main, one deploy per environment at a time.
- [Caches and artifacts](https://docs.xeonr.io/docs/branchd/pipelines/caches-and-artifacts): Keep dependency caches between runs, and hand built files from one job to the jobs that need it.
- [Pass outputs between steps and jobs](https://docs.xeonr.io/docs/branchd/pipelines/outputs): Write a value in one step and read it in a later step of the same job, or in a job that needs this one.
- [Secrets](https://docs.xeonr.io/docs/branchd/pipelines/secrets): Give a job the secrets it needs, as environment variables or files, and nothing else.
- [Environments and manual approval](https://docs.xeonr.io/docs/branchd/pipelines/environments-and-approval): Record deployments to named environments, and hold a job until a person releases it.
- [Run only when certain paths change](https://docs.xeonr.io/docs/branchd/pipelines/paths): Start a pipeline only when files you care about change, and run each job only for the part that changed.
- [Several pipelines in one repository](https://docs.xeonr.io/docs/branchd/pipelines/several-pipelines): Split a repository's CI into several files, and know which checks each one reports and which to require.
- [Steps and pipelines from another repository](https://docs.xeonr.io/docs/branchd/pipelines/other-repositories): Use a composite step or a reusable pipeline that another repository publishes, pinned to a version.
- [Presets](https://docs.xeonr.io/docs/branchd/pipelines/presets): Get a whole set of standard jobs from a preset, configure it under with:, and add jobs of your own that wait for its jobs.
- [Run a runner on a Mac](https://docs.xeonr.io/docs/branchd/pipelines/mac-runner): Install branchd's runner agent on your own Mac with one command, for jobs that need macOS, Xcode or a keychain.
- [Writing a step](https://docs.xeonr.io/docs/branchd/pipelines/writing-a-step): Publish a composite step or a typed step for other repositories to use.
- [Writing a preset](https://docs.xeonr.io/docs/branchd/pipelines/writing-a-preset): What a preset program receives, what it returns, and the limits it runs under.
- [Security](https://docs.xeonr.io/docs/branchd/pipelines/security): What a pipeline, a step from another repository and a job token can do, stated plainly.
- [Pipeline file reference](https://docs.xeonr.io/docs/branchd/pipelines/reference): The complete reference for .branchd/pipelines/*.yaml on one page, with every key, what it takes, what is refused, the job token, superseding, other repositories and presets. Also served as Markdown at /docs/branchd/pipelines/reference.md.
- [Expressions and variables](https://docs.xeonr.io/docs/branchd/pipelines/expressions): The ${{ }} expression language, its contexts and functions, and the environment variables every job gets.
- [Step and package files](https://docs.xeonr.io/docs/branchd/pipelines/step-files): The keys of a step.yaml (composite and typed) and of .branchd/packages.yaml.
- [Limits](https://docs.xeonr.io/docs/branchd/pipelines/limits): The bounds on what one pipeline file can ask of the compiler and of a run.
- [Refusals](https://docs.xeonr.io/docs/branchd/pipelines/errors): The refusals you are most likely to meet when a pipeline file is compiled, and what to do about each.
- [Editor support and the schema](https://docs.xeonr.io/docs/branchd/pipelines/schema): Use the JSON Schema of pipeline files, step.yaml and packages.yaml in an editor, in a script or in an agent.
- [Coming from GitLab CI](https://docs.xeonr.io/docs/branchd/pipelines/from-gitlab-ci): How each GitLab CI construct is written in a branchd pipeline file, with a worked conversion.
- [Coming from .xeonr-ci.yaml](https://docs.xeonr.io/docs/branchd/pipelines/from-xeonr-ci): Move a repository from .xeonr-ci.yaml to a pipeline file that uses the service preset, with its own jobs beside it.
- [Troubleshooting](https://docs.xeonr.io/docs/branchd/pipelines/troubleshooting): Find out why a pipeline did not run, why a job was left out, or why a run failed.
- [Writing pipelines with an AI agent](https://docs.xeonr.io/docs/branchd/pipelines/ai-agents): What to give an AI agent so it writes correct pipeline files, and the loop it should follow.
