Watch a run
Follow a run's jobs, steps and logs while it runs, and read why it failed or has not started.
Replace repo-id with the repository's id, run-id with the run's id and job-id with a job's id.
Prerequisites
ci:ListRunson the repository (rn:ews::<organization id>:ci:repository/<repository id>) to list its runs, andci:GetRunon it to open one.ci:GetRunLogson the repository to read logs. It is marked sensitive: build output can carry whatever a step printed, so the read-only policies do not include it, and a refused read is recorded in the audit log.- In the console, also
git:GetRepositoryon the repository; without it, and withoutci:ListRunsorci:GetRun, the repository's CI tab or the run page is not found. The organization-wide Runs page needsci:ListRunson all of CI (rn:ews::<organization id>:ci:*) and shows an access-denied notice without it.
Open a run
- Open the repository, then open its CI tab. (Or open Runs under CI, which lists the runs of every repository with Status and Trigger filters.)
- Open the run.
The page lists the run's Jobs on the left; the job that failed, or else the one running, is
selected. For the selected job it shows each step with its kind, exit code and duration, then the
job's log, grouped by step. While the run is live the page refreshes every few seconds and the log
follows new lines as long as you are scrolled to its end. Without ci:GetRunLogs the log reads
"Logs are not visible to you".
dcloud ci runs list repo-id
dcloud ci runs get run-id
dcloud ci jobs logs job-id --limit 1000GET /ci/api/repositories/repo-id/runsGET /ci/api/runs/run-idGET /ci/api/jobs/job-id/logs?limit=1000Result
- The run list holds the repository's 50 newest runs, newest first; there is no paging or filter in the API.
- A run comes with its
jobsand thestepsof every job, each with its status and times. - A log page holds up to
limitlines (500 when you leave it out, at most 1,000), and stops early at 2 MiB of text. Each line has its step, its stream (stdoutorstderr) and its time. Pass the answer'snextCursorback ascursorfor the next page; while a job runs, an empty page means no new lines yet. An altered cursor answers400"cursor: Invalid cursor".
Why a run has not started
A queued run carries a waiting sentence that says why: in the console as a banner on the run and
as the tooltip of its status, in the API as the run's waiting field. A run waiting for a free
slot links to See what is running.
Why a run failed
A failed run shows its error as a banner. When the error names a secret, the banner offers the fix: Grant NAME to CI for a secret that exists, Create NAME for one that does not. A job that never started says "Not started: …", and a job whose machine went away says "The runner stopped before this job finished". See Troubleshooting.