Pipelines
What a branchd pipeline is, what is available today, and where each task and key is documented.
Available in repositories branchd reads pipeline files for. It is switching repositories on one at a time: until yours is, it keeps running its
.forge-ci.yamlor.xeonr-ci.yaml. See What is available.
A pipeline is a YAML file in your repository, .branchd/pipelines/<name>.yaml,
that says when it runs (on:) and which jobs it runs (jobs:). Each job runs
its steps in a container, with your repository already checked out. Jobs run
in parallel unless one needs another. Everything about which jobs run is
decided before the run starts, so branchd ci plan can tell you, for any
branch or event, which jobs will run and why.
The syntax follows GitHub Actions closely: on, jobs, steps, needs,
if, matrix, ${{ }} expressions and uses:. It is not GitHub Actions:
the differences are in Coming from GitLab CI
and throughout the reference.
For agents and editors
- The complete reference in one file, as Markdown:
/docs/branchd/pipelines/reference.md. Every key, every refusal rule and every limit, on one page. - Every page of this section in one file:
/docs/branchd/pipelines/llms-full.txt, with an index at/docs/branchd/pipelines/llms.txt. The site's own index is/llms.txt. - The JSON Schema of a pipeline file, for editors:
https://docs.xeonr.io/schemas/branchd/pipeline.json(andstep.json,packages.json). See Editor support and the schema. - The loop for an agent writing a pipeline: Writing pipelines with an AI agent.
Every YAML example in these pages is a file that branchd's compiler accepts: the examples are compiled for every event they list before the pages change.
Start here
Quick start (five minutes)
Add a pipeline, check it locally, push it, and read its checks.
Concepts
Pipeline, run, job, step, needs, the checkout, and what is decided before a run starts.
Tasks
Each page is one task and one complete file you can copy.
Run tests on a pull request
Build and push an image
Run a job for several versions (matrix)
Reuse a step
Call a pipeline
Run on a schedule
Trigger another repository's pipeline
A manual pipeline with inputs
Use the job token (curl and git)
Isolate a step from the job
More tasks: a Go service with a database, a Node.js project, deploy, caches and artifacts, outputs, secrets, environments and approval, paths, several pipelines, steps and pipelines of another repository, presets.
Reference
Pipeline file reference
Every key, in one page.
Expressions
${{ }}, contexts, functions and variables.
Step files
step.yaml and .branchd/packages.yaml.
Limits
Refusals
What the compiler refuses, and what to write instead.
Troubleshooting
A refused push, a job that does not run, a check that never reports.
What is available
Pipeline files are on in production, and branchd is switching repositories
to them one at a time. A repository that is not switched on runs its
.forge-ci.yaml or .xeonr-ci.yaml exactly as before, and ignores
.branchd/pipelines/. In a repository that is switched on:
| Part | State |
|---|---|
Jobs, steps, needs, if, matrix, services, caches, artifacts, secrets, environments, manual jobs, superseding | Available |
| The automatic checkout (no git needed in the image) | Available |
| Push checks: a push whose changed pipeline file does not compile is refused, with file and line | Available |
| Manual runs with inputs, schedules, triggers of this repository's own pipelines | Available |
| Composite steps and reusable pipelines, of this repository or another | Available |
Typed steps (uses: ci/…), alone or isolated: true among run: steps | Available |
The job token and permissions: | Available |
Presets of another repository (preset: {uses: <group>/<repo>/<path>@v1}) | Available |
| Optional secrets of a step | Available |
Not available yet, each said again on the page it concerns:
- Triggering another repository's pipeline works only when that repository is switched on too; today a trigger to any other repository is refused. A repository triggering its own pipelines works.
- The shared step and preset repositories,
xeonr/forge/stepsandxeonr/forge/presets, have releasedv1(tagsv1.0.0andv1.0.1) but are still private, visible only to their own team, until their visibility is set to organisation; until then no other repository can use them. The pages that use them say so. - A preset of the same repository (
preset: {uses: ./<path>}) is refused; a preset comes from another repository. - Starting a manual run with inputs from the console: the console starts a run of a branch only. Use the CLI or the API (Manual runs).
- The CLI features these pages use,
branchd run start --pipeline … --input …andbranchd ci lintchecking every event a file lists, are in the next CLI release (0.39.0).branchd ci lintandci planof earlier releases (0.33.0 and later) read pipeline files, but check fewer situations. - Refused for now, each with a clear message:
max-parallel,fail-fast: true, amatrix:on a job that calls a pipeline, a lock over a whole pipeline (concurrency.groupat the top level),checkout: {submodules}, a jobif:that reads another job's outputs, a stepif:that readssteps.*.outputs. - Steps published by other products (
uses: strata/migrate@1) and binary steps written on the step SDK in your own repository. - A
run:job's outputs as animage:or a typed step'swith:: only a typed step's outputs reach those (Outputs). - The branchd CLI inside a job: it is not in job images and has no
download a job can reach. The job token works with
curlandgit(The job token).