Skip to content

Buildkite notes

A collection of notes and commands for Buildkite. Mostly so that I don't have to keep googling how to start things.

This is a collection of notes for my own use. It probably isn't very helpful to you, unless you are (a) already familiar with Buildkite and (b) doing a weird dance with Windows, WSL2, and a Raspberry Pi. This stuff works on my machine.

If you've never heard of Buildkite, go check it out: Buildkite. It's a pretty cool continuous integration tool.

Serve the docs locally (using WSL2)

bin/rails server

Pipeline upload step

Paste this into the YAML steps editor when setting up a pipeline, so that you can use a pipeline.yml instead:

1
2
3
steps:
  - label: "Pipeline upload"
    command: buildkite-agent pipeline upload

Target a particular agent

This is useful when running both a Pi and a Windows agent.

1
2
3
  - command: "<some command>"
    agents:
      os: "<os-tag>"

Relevant docs

This works:

1
2
3
4
5
steps:
  - label: "Pipeline upload"
    command: buildkite-agent pipeline upload
    agents:
      os: "<some-os-tag>"

Start the agent

1
2
3
4
5
6
7
8
9
# Powershell (with admin privileges)
nssm start buildkite-agent

# Bash (via Raspberry Pi)
# or WSL2
# no, Git Bash doesn't entirely work
# and yes, working on this does require three operating systems
# I'm fine, how 'bout you?
~/.buildkite-agent/bin/buildkite-agent start

Docs for installing on generic Linux - use this for Pi or WSL2, not whatever Linux distro you think you're using.
Docs for installing on Windows

Target a particular shell

Edit the shell option in buildkite-agent.cfg.

1
2
3
4
5
6
# PowerShell
shell="C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
# PowerShell Core
shell="C:\Program^ Files\PowerShell\7\pwsh.exe"
# Git Bash - do not use
shell="C:\Program^ Files\Git\git-bash.exe"

Gotchas

Be aware of the following:

  • PowerShell Core and WSL2 do not support using buildkite-agent pipeline upload directly in the steps editor. Workaround: put it in a script file, run that script from the steps editor.