Docs
CLICI/CD

Pipelines

View, create, edit as a file, check, run and delete web-built pipelines, and their input sets (co pipeline)

co pipeline reads, creates, edits, runs and deletes pipelines built in the web (the ones with no file in a repository). The result is the same as on the pipeline screen. The on-screen way is in No-code pipelines, and the screen and commands side by side are in Do the same with co.

A pipeline is addressed by the numeric key from co pipeline list. Runs are inspected with co run. All options are in co pipeline <command> --help.

List and view

co pipeline list                        # pipelines in this workspace (web-built and repository)
co pipeline list --kind inline -p CORE  # only the web-built ones of one project
co pipeline view 42                     # jobs, inputs, input sets, triggers, recent runs, version
co pipeline view 42 --yaml > p.yml      # the YAML only

--kind is inline (built in the web) or git (repository). Repository pipelines are not edited or run here; change them with a commit to their repository.

Create

To create from a starting point on screen, use create --start. To create from YAML you already have, use apply.

co pipeline create --start build-deploy --repo web --service web --env prod --name web-release -p CORE
co pipeline create --start deploy --service api --env stage --print > deploy.yml   # print the YAML only
co pipeline apply -f hotfix.yml -p CORE                                         # create from a file
--startFlow you getAlso pass
buildBuild--repo
deployDeploy (the version is asked at run time)--service --env
build-deployBuild, then deploy--repo --service --env
approve-deployBuild, approve, deploy--repo --service --env --approver

--name must be unique in the workspace. With apply, leaving out --name uses the file name without its extension. If a field is missing, nothing is saved and co names the place to fill in (exit code 3). --print saves nothing.

Edit

Edit with a file: get the latest YAML, change it, check it and upload it.

co pipeline view 42 --yaml > p.yml
co pipeline validate -f p.yml 42               # check without saving
co pipeline apply -f p.yml 42 --if-version 3   # replace pipeline 42's whole YAML

validate runs the same checks as saving and saves nothing. Each problem shows its line, YAML path and kind, and problems exit with code 3. Warnings (lines starting with !) do not change the exit code. Without <key> the YAML is checked as a new pipeline, and -p sets its project.

A refused apply changes nothing. A successful one prints the key, the new version and any warnings.

When two people save the same pipeline

Pass --if-version with the version you started editing (shown by view). If someone saved in between, nothing is saved and co exits with code 4, reason stale_version. Get a fresh copy, redo your change on it and upload. Without --if-version the later save silently wins.

Run

co pipeline run 42
co pipeline run 42 --set to-prod --input version=1.2.3
co pipeline run 42 --json     # run_key, status, run_uuid, reused
co run view <run number>      # follow it

Values stack in this order and later ones win: declared defaults, each --set (saved input set, in the order given), then each --input. An input name the pipeline does not declare is refused before sending.

The server refuses the same run with the same inputs within 10 seconds (exit code 4, reason manual_run_recent). If the server does not answer, co sends the same request once more with the same request id, and the server returns the run the first request made; reused is then true in --json. If it still fails, check the recent runs before running again.

A run held back by the concurrency limit shows the status QUEUED and starts when a slot frees up.

Input sets

co pipeline input-set list 42                                                # sets and their values
co pipeline input-set set 42 to-prod --input target=prod --input replicas=3
co pipeline input-set set 42 prod-canary --set to-prod --set canary --description "prod + canary"
co pipeline input-set rm 42 prod-canary

set and rm change only that one set; other sets stay as they are even if someone edits them at the same time. set on an existing set replaces it whole (values you leave out go back to the declared defaults); a new set is added at the end. A set holds either values (--input) or other sets to stack (--set), not both.

Delete

co pipeline delete 42
co pipeline delete 42 -y --json   # cancelled_runs: the runs that were cancelled

The server cancels unfinished runs first; if one can't be stopped, nothing is deleted. Without -y, co shows the runs that will be cancelled and asks first. input-set rm asks too unless you pass -y.

JSON output

list, view, create, apply, validate, run, input-set and delete all take --json. Pass the version from view --json to apply --if-version. The error shape and exit codes are in Automation and AI agents.

Table of Contents

AI tools

Was this helpful?