blog

12021-09-05

SEAN K.H. LIAO

buildkite

buildkite is a CI system where you provide the runners, and it (the SaaS) hosts the dashboards and schedulers. Builds can be triggered via webhook integration with a few code hosts, manually, cron, or via api.

agents

Agents are what you run to run your builds. By themselves, they aren't isolated, relying on tools configured on the host. The build steps are just that, commands run on the host, which makes it awkward to do versioned / isolated tools.

pipeline config

The build pipeline is more interesting: the first pass of the pipeline is in the dashboard (configurable via api, eg terraform provider). Once running, the pipeline can then be extended/modified by uploading new parts.

In the dashboard:

steps:
  - label: ":pipeline: Pipeline upload"
    command: buildkite-agent pipeline upload .buildkite/pipeline.yaml

Then in your repo's .buildkite/pipeline.yaml you can configure your builds in a way that's source controlled (and modifiable in prs...).

steps:
  - command: |
      docker run --rm -it \
        -v ${GOMODCACHE}:/go/pkg/mod \
        -v ${GOCACHE}:/root/.cache/go-build \
        -v ${BUILDKITE_BUILD_CHECKOUT_PATH}:/workspace \
        -w /workspace \
        $GOIMAGE \
        go build ./...