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

server/ssh/server.go +19−1

@@ -541,6 +541,24 @@ func (s *Server) exec(ch xssh.Channel, req *xssh.Request, command, user, fp, rem
541 541 exit(ch, s.serveChangeStatus(ch, argv, user, remote))
542 542 return
543 543 }
544 // Reading the queue is the CLI counterpart of the runs page and a run's log.
545 // The verbs check the repository's read capability and scope a run id to the
546 // repository that owns it, exactly as the pages do.
547 if len(argv) >= 1 && argv[0] == "vole-run-list" {
548 req.Reply(true, nil)
549 exit(ch, s.serveRunList(ch, argv, user))
550 return
551 }
552 if len(argv) >= 1 && argv[0] == "vole-run-show" {
553 req.Reply(true, nil)
554 exit(ch, s.serveRunShow(ch, argv, user))
555 return
556 }
557 if len(argv) >= 1 && argv[0] == "vole-run-log" {
558 req.Reply(true, nil)
559 exit(ch, s.serveRunLog(ch, argv, user))
560 return
561 }
544 562 // Canceling and rerunning a run are writes to the repository's CI queue, not to a
545 563 // ref. The verbs are the CLI counterparts of the buttons on the run page, and the
546 564 // handlers ask the same maintainer capability before they touch the queue.
@@ -625,7 +643,7 @@ func (s *Server) exec(ch xssh.Channel, req *xssh.Request, command, user, fp, rem
625 643 return
626 644 }
627 645 if len(argv) != 2 {
628 refuse("only git-upload-pack, git-receive-pack, vole-admin, vole-roster, vole-whoami, vole-runner, vole-change-merge, vole-change-status, vole-run-cancel, vole-run-rerun and vole-workflow-dispatch are available")
646 refuse("only git-upload-pack, git-receive-pack, vole-admin, vole-roster, vole-whoami, vole-runner, vole-change-merge, vole-change-status, vole-run-list, vole-run-show, vole-run-log, vole-run-cancel, vole-run-rerun and vole-workflow-dispatch are available")
629 647 return
630 648 }
631 649 verb := argv[0]