{{define "footleft"}}runners{{end}} {{define "body" -}}
{{template "crumbs" .}} / add a runner
{{.Token}}
paste on any machine you want to build on.
linux, macos
curl -sL {{.ExternalURL}}/runner.sh | sh -s {{.Token}}
windows
irm {{.ExternalURL}}/runner.ps1 | iex; barerepo-runner {{.Token}}
already have the binary
barerepo-runner {{.Token}} --labels build,test
the runner dials out. it needs no inbound port and no public address.
token scopes to this repo. revoke it on your keys page.
this token is shown once. only its hash is kept.
the machine remembers this barerepo, so the line above needs no address.
a runner is a program because it long-polls. the protocol is plain http:
POST /runner/attach · GET /runner/poll · POST /runner/log · POST /runner/done · POST /runner/artifact
write your own if you would rather.
a build attaches a file to a release with the last one. it is handed BAREREPO_URL, BAREREPO_REPO, BAREREPO_JOB and BAREREPO_JOB_TOKEN:
curl -X POST "$BAREREPO_URL/runner/artifact" \
  -H "Barerepo-Token: $BAREREPO_JOB_TOKEN" -H "Barerepo-Job: $BAREREPO_JOB" \
  -H "Barerepo-Tag: v1.0.0" -H "Barerepo-File: johnbot-linux-amd64" \
  --data-binary @johnbot-linux-amd64
{{- end}}