Skip to content

Pipelines

A pipeline is a YAML file, usually fiber.yml. fiber validate checks one without a server, as saving it does, and fiber pipelines apply saves it (the command line). A key that is not below is an error, with the nearest one it may have meant. examples/ has ten to start from.

name: build-and-test
workspace:
repo: https://github.com/octocat/Hello-World.git
ref: master
on:
push:
branches: [main]
steps:
build:
run: echo "artifact payload" > out.txt
image: node:24
artifacts: [out.txt]
test:
needs: [build]
run: cat out.txt
image: node:24
Key Meaning
name Required. Its name in the project.
steps Required, at least one. A map of id to step, as above, or a list of steps that each have an id and a name.
workspace repo to check out, and ref (a branch, tag or ref) for runs that have no commit of their own. Without it, steps start in an empty directory.
on What starts a run besides a person: see triggers.
env Variables of every step. Not secret: everyone who can read the project sees them.
timeout_minutes The run fails when it takes longer. No limit unless set; at most 10080 (a week).
concurrency group and cancel_in_progress: see concurrency.
Key Meaning
run Required. A script for the shell.
needs Ids of the steps that must end first. A step runs when all of them succeeded, unless its if: says otherwise.
name Shown in place of the id.
image A Docker image to run in, name[:tag][@digest]. A runner without Docker fails such a step, so give the runners that have it a label and name it here. Without image: the step runs on the runner’s own host, which a runner refuses unless it allows it (runner). A step of a pull request from a fork runs only in an image.
labels A runner takes the step only if it has every one. At most 20, of 100 characters.
shell A program name, such as bash, given -c and the script. sh by default.
working_directory Where in the workspace to start. It must be there when the step starts, and stay inside the workspace.
env Variables of this step. They win over the pipeline’s, and a matrix value wins over both. Names do not start with FIBER_.
secrets Which of the project’s secrets to give it. All of them when left out; [] is none. A step fails when one it names is not set.
artifacts Files to keep when the step succeeds, relative to the top of the workspace. Steps that need it, directly or not, are given them. Files only, of at most 64 MiB: put a directory in an archive.
retries Attempts after one that fails, at most 20. The wait between them doubles from 2 s, to at most 60 s.
timeout_minutes The attempt fails when it takes longer. 60 by default; at most 10080.
continue_on_error true: when it fails, the run does not, and steps that need it still run.
if When to run: see conditions.
matrix Lists of values, a step for each set: see matrix.

Each step has a workspace of its own, on whichever runner took it: what an earlier step left is there only as an artifact. A step is told FIBER_RUN_ID and FIBER_STEP_ID (runner).

if: is one of:

  • success(), the default: every step it needs succeeded.
  • always(): once those have ended, however they ended.
  • never().
  • matrix.<name> == '<value>' or env.<name> == '<value>', also only when what it needs succeeded. There is no !=, && or ||.

A step that does not run is skipped, and so is each step that needs it, unless that step’s if: is always().

test:
run: echo "on $MATRIX_OS with node $MATRIX_NODE"
matrix:
os: [linux, macos]
node: ["22", "24"]

The four steps are made when the pipeline is saved: test__node_22__os_linux and so on, at most 64 of one step. Each is told its values as MATRIX_<NAME> and FIBER_MATRIX_<NAME>, and as <name> itself. A step that needs: [test] needs all four.

Key Meaning
on.push A push to one of branches (webhooks).
on.pull_request A pull request into one of branches, for the actions in types: opened, synchronize and reopened by default.
paths, paths_ignore Of either: a run starts only when a changed file matches paths and not paths_ignore.
on.cron Six fields, seconds first, in UTC: "0 0 2 * * *" is 02:00 each day.
on.interval_minutes Every so many minutes, starting when it is saved. cron wins when both are set.

branches are whole names. In a path pattern * and ? also match /, ** matches any depth, and {a,b} either. A schedule’s ticks missed while the server was away start one run, and none starts while a run of the pipeline is still going.

With cancel_in_progress: true, a new run cancels the runs of its group that have not ended. The group is {pipeline}-{ref} by default: the pipeline’s id and the branch, so a push cancels earlier builds of its own branch only. A run started by hand or by a schedule has no branch, and cancels others started so. A pull request from a fork cancels nothing that others started. Without cancel_in_progress every run goes ahead: runs are never queued behind each other.

A pipeline has at most 500 steps once its matrices are made (FIBER_MAX_STEPS on the server), 50 sets of labels, and 4 MiB of step definitions with their environment. A pull request from a fork runs no more than a fifth of what the project may (webhooks).