Pipeline runs
CI/CD run list, details and logs, re-run, approve and reject, cancel, duration analysis (co run)
co run shows and controls CI/CD pipeline runs. A run is identified by the numeric id shown in co run list. Pipelines themselves are handled with co pipeline, and watching runs on screen is covered in Runs and deploy results.
All options are in co run <command> --help.
Find why a run failed
co run list # recent runs
co run view 21325 # tasks and steps, failure cause, last few log lines
co run logs 21325 --failed --tail 50 # last 50 lines of each failed step
co run logs 21325 --grep 'FAILED|Error' # only matching linesWithout options, co run logs shows only the failed steps of a failed run, and everything for a successful run. To see only the runs attached to a CR, co cr checks <CR number> is faster.
Run again
co run rerun 21325 # from the start, same commit and inputs
co run rerun 21325 --from-failed # from the failureWith --from-failed, jobs that succeeded in the original run are not run again; their results are carried over. Only failed, cancelled or never-run jobs and the jobs after them run. An approval job in between asks for approval again. The new run number is printed.
Approve and reject
When a run is waiting at an approval job, an approver decides. The job name is the one in the pipeline YAML, and co run view lists it.
co run approve 281 deploy-gate --comment "checked on stage"
co run reject 281 deploy-gate --comment "wrong version" # the run stops there
co run approve 281 deploy-gate --json # state, current_stepBefore sending, co checks that the job is an approval job, that the run has reached it, that it is still waiting and that you may decide it. With a multi-step approval line, the job stays waiting until the last step decides, and the next step is printed. --comment takes up to 2000 characters. Leave a reason when you reject.
Slow pipelines
co run stats # duration and bottleneck job per pipeline
co run stats --period 7d --sort p95
co run stats 345 # per job for one pipelineOther commands
| Command | What it does |
|---|---|
| cancel | Cancel a run in progress |