Usage guide¶
CLI commands¶
run — Compile and execute a pipeline¶
Compiles a loopfile, then executes the named pipeline. Parameters can be
overridden with -p flags:
plantuml — Export an execution graph as PlantUML¶
Prints a PlantUML state diagram for the pipeline's execution graph to stdout.
taskcar — Run with JSON parameters on stdin¶
Reads a JSON object from stdin, uses its top-level string values as pipeline parameters, and prints a JSON result on stdout.
Loopfile syntax¶
v1 — Multi-pipeline¶
A v1 loopfile defines parameters, constants, and multiple pipelines with flat task lists:
version: 1
parameters:
- name: branch
required: true
constants:
image: myimage:latest
pipelines:
- name: build
retries: 2
locals:
- workdir
constants:
timeout: 300
tasks:
- name: checkout
cmds: |
git clone $repo
cd $repo
on_success:
- set: workdir
value: stdout
- name: build
cmds: make all
on_failure:
- retry_from: checkout
v2 — Module system¶
A v2 loopfile defines a single pipeline with optional modules that transform the task list before compilation:
version: 2.0
name: my-pipeline
modules:
- name: workdir
- name: git
work_repository: https://github.com/me/repo.git
src_branch: main
dst_branch: clankloop-run
tasks:
- name: build
cmds: |
cd ${pipeline.globals.git_repo_dir}
make all
Actions¶
Each task can define on_success and on_failure action lists:
| Action | Key | Description |
|---|---|---|
| Set variable | set / value |
Assigns a value (or stdout/stderr) to a pipeline local |
| Go to task | goto |
Jumps to a named task |
| Retry from | retry_from |
Retries from a named task (consumes a retry) |
| Abort | abort |
Stops execution immediately |