Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Read a run and its log from the CLI

92d8afc86ab7a5e8f2e56a8981e0614aa55980f1 · Keenan Nemetz · 3h ago · parent 4b8c9e1d

Read a run and its log from the CLI

The queue and its logs live on the instance, so the CLI now has read verbs
beside the cancel and rerun writes: run list, run show and run logs. They
check the repository's read capability, scope an id to its repository, and
stream a log to stdout with refusals on stderr.

change show lists the runs for the head and, when the landing needs one, the
combined result, so a red check carries the id needed to open it. The queue
search narrows by status, branch and commit prefix without a pager.

closes: 01M6YZAQZVJWTA9BA5RV2H6PQ8

docs/cli.md +28−6

@@ -280,6 +280,10 @@ vole runner --remote <ssh-url> [--once] [--jobs <n>] [--dir <path>] [--repos <na
280 280 [--container-pull missing|always|never] [--container-user <uid:gid>] [--container-userns <mode>]
281 281 [--container-memory <size>] [--container-cpus <n>] [--container-pids <n>]
282 282 [--cache-size <size>] [--git-cache-size <size>] [--no-cache]
283 vole run list [--state <state>] [--branch <branch>] [--commit <sha>] [--limit <n>]
284 [--format <fmt>] [--remote <name|url>]
285 vole run show <id> [--remote <name|url>]
286 vole run logs <id> [--attempt <n>] [--step <n>] [--remote <name|url>]
283 287 vole run cancel <id> [--remote <name|url>]
284 288 vole run rerun <id> [--remote <name|url>]
285 289 vole workflow check [--dir <path>]
@@ -314,12 +318,30 @@ declare `on.workflow-dispatch`; `--ref` defaults to the default branch, and each
314 318 `--input` is checked against the input's declared type, options, and default. Only
315 319 a maintainer or instance admin may dispatch.
316 320
317 `run cancel` is the CLI counterpart of the cancel button on a run page. It takes the
318 26-character id in that page's URL: a queued run is canceled outright, and a running
319 one is asked to stop, with its runner stopping at the next heartbeat. `run rerun`
320 queues a finished run again with the same pinned job. Only a maintainer or instance
321 admin may do either, and `data/audit.log` records the account, the repository, and the
322 run (`run.cancel` or `run.rerun`).
321 `run list`, `run show` and `run logs` are the CLI half of the runs page and a run's
322 log. The queue lives on the instance, so they read it over the key you push with; any
323 account that may read the repository may use them. `run list` defaults to the newest
324 20 runs and narrows by status, branch or a commit id or prefix. `--format` understands
325 `%(id)`, `%(shortid)`, `%(status)`, `%(workflow)`, `%(job)`, `%(branch)`, `%(sha)`,
326 `%(trigger)`, `%(trigger_title)`, `%(exit)`, `%(attempts)`, `%(log)` and `%(created)`.
327
328 `run show` prints the run's status, commit, trigger, steps with their exit codes and
329 durations, each attempt's log size, the published artifacts, and whether the result
330 counts as a check. The id is the 26-character one on the run page; `vole change show`
331 also lists the head's runs, and the combined result's runs when there is one, so a
332 reviewer can copy the failing id without opening the browser.
333
334 `run logs` writes the bytes the runner wrote to stdout, with nothing added, so it can
335 be redirected or piped. It opens the attempt the run is on, or the newest logged
336 attempt once the run has finished; `--attempt` picks a retry and `--step` narrows the
337 output to one step's range inside it. A refusal goes to stderr, so a redirect produces
338 a log or an empty file.
339
340 `run cancel` is the CLI counterpart of the cancel button on a run page. A queued run
341 is canceled outright, and a running one is asked to stop, with its runner stopping at
342 the next heartbeat. `run rerun` queues a finished run again with the same pinned job.
343 Only a maintainer or instance admin may do either, and `data/audit.log` records the
344 account, the repository, and the run (`run.cancel` or `run.rerun`).
323 345
324 346 ## Internal
325 347