• Stars
    star
    774
  • Rank 58,703 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 11 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Buildkite Agent is an open-source toolkit written in Go for securely running build jobs on any device or network

Buildkite Agent

Build status Go Reference

The buildkite-agent is a small, reliable, and cross-platform build runner that makes it easy to run automated builds on your own infrastructure. It’s main responsibilities are polling buildkite.com for work, running build jobs, reporting back the status code and output log of the job, and uploading the job's artifacts.

Full documentation is available at buildkite.com/docs/agent.

$ buildkite-agent --help
Usage:

  buildkite-agent <command> [options...]

Available commands are:

  acknowledgements  Prints the licenses and notices of open source software incorporated into this software.
  start             Starts a Buildkite agent
  annotate          Annotate the build page within the Buildkite UI with text from within a Buildkite job
  annotation        Make changes to an annotation on the currently running build
  artifact          Upload/download artifacts from Buildkite jobs
  env               Process environment subcommands
  lock              Process lock subcommands
  meta-data         Get/set data from Buildkite jobs
  oidc              Interact with Buildkite OpenID Connect (OIDC)
  pipeline          Make changes to the pipeline of the currently running build
  step              Get or update an attribute of a build step
  bootstrap         Run a Buildkite job locally
  help              Shows a list of commands or help for one command

Use "buildkite-agent <command> --help" for more information about a command.

Dependencies

The agent is fairly portable and should run out of the box on most supported platforms without extras. On Linux hosts it requires dbus.

Installing

The agents page on Buildkite has personalised instructions, or you can refer to the Buildkite docs. Both cover installing the agent with Ubuntu (via apt), Debian (via apt), macOS (via homebrew), Windows and Linux.

Docker

We also support and publish Docker Images for the following operating systems. Docker images are tagged using the agent SemVer components followed by the operating system.

For example, agent version 3.45.6 is published as:

  • 3-ubuntu-20.04, tracks minor and bugfix updates in version 3 installed in Ubuntu 20.04
  • 3.45-ubuntu-20.04, tracks bugfix updates in version 3.45 installed in Ubuntu 20.04
  • 3.45.6-ubuntu-20.04, tracks the exact version installed in Ubuntu 20.04

Supported operating systems

  • Alpine 3.18
  • Ubuntu 18.04 LTS (x86_64), supported to end of standard support for 18.04
  • Ubuntu 20.04 LTS (x86_64), supported to end of standard support for 20.04
  • Ubuntu 22.04 LTS (x86_64), supported to end of standard support for 22.04

Starting

To start an agent all you need is your agent token, which you can find on your Agents page within Buildkite, and a build path. For example:

buildkite-agent start --token=<your token> --build-path=/tmp/buildkite-builds

Telemetry

By default, the agent sends some information back to the Buildkite mothership on what features are in use on that agent. Nothing sensitive or identifying is sent back to Buildkite, but if you want, you can disable this feature reporting by adding the --no-feature-reporting flag to your buildkite-agent start call. Features that we track can be found inside AgentStartConfig.Features.

Development

These instructions assume you are running a recent macOS, but could easily be adapted to Linux and Windows.

# Make sure you have Go installed.
brew install go

# Download the code somewhere - no GOPATH required.
git clone https://github.com/buildkite/agent.git
cd agent

# Create a temporary builds directory.
mkdir /tmp/buildkite-builds

# Build an agent binary and start the agent.
go build -o /usr/local/bin/buildkite-agent .
buildkite-agent start --debug --build-path=/tmp/buildkite-builds --token "abc"

# Or, run the agent directly and skip the build step.
go run *.go start --debug --build-path=/tmp/buildkite-builds --token "abc"

Go Version and Dependency Management

The latest agent version is typically compiled with the highest-numbered stable release of Go. Previous Go versions may work, but are not guaranteed to. We are using newer language features such as generics, so compiling on Go < 1.18 will fail.

We're using Go Modules to manage our Go dependencies. Dependencies are not vendored into the repository unless necessary.

The Go module published by this repo (i.e. the one you could use by adding import "github.com/buildkite/agent/v3" to your code) is not considered to be versioned using semantic versioning. Breaking changes may be introduced in minor releases. Use the agent as a runtime depedency of your Go app at your own risk.

Platform Support

We provide support for security and bug fixes on the current major release only.

Our architecture and operating system support is primarily limited by what Go itself supports.

Architecture Support

We offer support for the following machine architectures (inspired by the Rust language platform support guidance).

Tier 1, guaranteed to work

  • linux x86_64
  • linux arm64
  • windows x86_64

Tier 2, guaranteed to build

  • linux x86
  • windows x86
  • darwin x86_64
  • darwin arm64

Tier 3, community supported

We release binaries for various other platforms, and it should be possible to build the agent anywhere supported by Go, but official support is not provided for these Tier 3 platforms.

Operating System Support

We currently provide support for running the Buildkite Agent on the following operating systems. Future minor releases may drop support for end-of-life operating systems (typically as they become unsupported by the latest stable Go release).

The agent binary is fairly portable and should run out of the box on most UNIX like systems, as well as Windows.

  • Ubuntu 18.04 and newer
  • Debian 8 and newer
  • Red Hat RHEL 7 and newer
  • CentOS
    • CentOS 7
    • CentOS 8
  • Amazon Linux 2
  • macOS 1
    • 10.15 (Catalina)
    • 11 (Big Sur)
    • 12 (Monterey)
    • 13 (Ventura)
    • 14 (Sonoma)
  • Windows Server
    • 2016
    • 2019
    • 2022

Contributing

See ./CONTRIBUTING.md

Contributors

Many thanks to our fine contributors! You're all amazing, and we greatly appreciate your input ❤️

Copyright

Copyright (c) 2014-2023 Buildkite Pty Ltd. See LICENSE for details.

Footnotes

  1. See https://github.com/golang/go/issues/23011 for macOS / Go support and Supported macOS Versions for the last supported version of the Buildkite Agent for versions of macOS prior to those listed above.

More Repositories

1

docker-puppeteer

A minimal Docker image for Puppeteer
Dockerfile
807
star
2

terminal-to-html

Converts arbitrary shell output (with ANSI) into beautifully rendered HTML
Go
603
star
3

elastic-ci-stack-for-aws

An auto-scaling cluster of build agents running in your own AWS VPC
Shell
411
star
4

emojis

:shipit: Custom emoji supported by Buildkite which you can use in your build pipelines and terminal output.
Ruby
376
star
5

cli

A command line interface for Buildkite.
Go
167
star
6

lifecycled

A daemon for responding to AWS AutoScaling Lifecycle Hooks
Go
146
star
7

sockguard

A proxy for docker.sock that enforces access control and isolated privileges
Go
143
star
8

frontend

🌏 The front-end application code for https://buildkite.com
JavaScript
137
star
9

ecs-run-task

Run a once-off task on Amazon ECS and stream the output
Go
125
star
10

agent-stack-k8s

Spin up an autoscaling stack of Buildkite Agents on Kubernetes
Go
79
star
11

example-pipelines

A list of all the example Buildkite pipelines for various tools, languages and frameworks
77
star
12

go-buildkite

A Go library for the Buildkite API
Go
67
star
13

buildkite-agent-metrics

A command-line tool (and Lambda) for collecting Buildkite agent metrics
Go
66
star
14

buildkite-agent-scaler

📈A lambda for scaling an AutoScalingGroup based on Buildkite metrics
Go
61
star
15

github-release

A command line utility to create GitHub releases and upload packages
Go
60
star
16

charts

Buildkite Helm Charts repository
Shell
59
star
17

trigger-pipeline-action

A GitHub Action for triggering a build on a Buildkite pipeline.
Shell
58
star
18

terraform-provider-buildkite

Terraform provider for Buildkite
Go
56
star
19

docs

The source files for the Buildkite documentation
Ruby
45
star
20

nodejs-docker-example

An example of how to run a Node.js project in Docker in a Buildkite pipeline
Dockerfile
41
star
21

cloudformation-launch-stack-button-svg

A nice, resolution independent, SVG version of the AWS CloudFormation "Launch Stack" button 🎉
39
star
22

interpolate

Interpolate $STRINGS in ${OTHER_STRINGS:-true}
Go
32
star
23

python-docker-example

An example of how to run a Python project w/ Docker in a Buildkite pipeline
Dockerfile
32
star
24

pipeline-schema

A JSON schema for Buildkite’s pipeline file format
JavaScript
30
star
25

docker-ssh-env-config

Sets up SSH config files within a container based on environment variables
Shell
30
star
26

buildkite-signed-pipeline

[Deprecated] This is a tool that adds some extra security guarantees around Buildkite's jobs
Go
27
star
27

docker-buildkite-agent

Previous home of buildkite/agent docker image scripts
26
star
28

feedback

Got feedback? Please let us know!
25
star
29

capybara-inline-screenshot

Extends capybara-screenshot with inline image output
Ruby
24
star
30

elastic-ci-stack-s3-secrets-hooks

🕵️‍♀️ Expose secrets to your buildkite build steps via Amazon S3
Go
24
star
31

on-demand

CloudFormation resources for scheduling On-Demand Buildkite Agents with AWS ECS and AWS Fargate
JavaScript
23
star
32

bash-example

An example repository you can use as a test project with Buildkite
Shell
23
star
33

rails-docker-parallel-example

An example of how to run Rails CI and test steps in parallel with Docker and Buildkite
Ruby
21
star
34

iam-ssh-agent

Keyless SSH Agent for IAM Entities
Rust
20
star
35

golang-docker-example

An example of how to run a Golang project in Docker in a Buildkite pipeline
Go
19
star
36

dynamic-pipeline-example

An example of how to generate dynamic build pipelines in Buildkite
Shell
18
star
37

rspec-buildkite

RSpec failures as Buildkite annotations so you can fix them fast
Ruby
17
star
38

image-builder

Uses EC2 Image Builder to customise AMIs for elastic-ci-stack-for-aws Buildkite agents
JavaScript
16
star
39

test-collector-ruby

Buildkite Test Analytics collector for Ruby test frameworks
Ruby
16
star
40

buildkite-cloudwatch-metrics-publisher

Publish your Buildkite job queue statistics to AWS Cloud Watch for easy EC2 auto-scaling of your build agents
Makefile
16
star
41

elastic-ci-stack-for-aws-ecs

An experiment with AWS SpotFleets and ECS
Go
16
star
42

slack-webhook

An example Slack Outgoing Webhook for Buildkite
JavaScript
16
star
43

homebrew-buildkite

Homebrew formulae for Buildkite software
Ruby
16
star
44

dynamic-build-badges

Dynamic readme badges from your Buildkite build meta-data
JavaScript
16
star
45

anka-packer-images

Packer scripts for building MacOS images for Anka
Shell
15
star
46

python-pipenv-example

An example of how to run a Python project w/ pipenv in a Buildkite pipeline
Python
15
star
47

buildbox-agent-ruby

Buildbox agent written in Ruby
Ruby
14
star
48

build-trace

Generate trace data for a build in Jaeger
Go
13
star
49

heroku-buildkite-agent

A sample Heroku app for running the Buildkite agent on Heroku dynos
13
star
50

test-collector-javascript

Buildkite Test Analytics collectors for JavaScript test frameworks
JavaScript
13
star
51

golang-example

An example on how to test a Golang program using Buildkite
Go
13
star
52

yaml2json

An easy to use command line tool to convert YAML to JSON
Shell
12
star
53

block-step-example

An example of how to include block steps with form fields in your pipeline
Shell
12
star
54

nodejs-example

An example of how to run a Node.js project in a Buildkite pipeline
JavaScript
11
star
55

shellwords

Splits command strings according to POSIX/Batch semantics
Go
11
star
56

bintest

Golang tools for generating mock binaries for that can be orchestrated in realtime for testing
Go
11
star
57

rspec-junit-example

An example pipeline that collects JUnit test failures and annotates a Buildkite build
Ruby
11
star
58

buildkite-fastlane-demo

An example of running Xcode 7 unit, performance and UI tests using Fastlane and Buildkite
Ruby
9
star
59

roko

An easy to use, configurable retry library for Go
Go
9
star
60

statusbot

[ARCHIVED] 🤖 A status slackbot for interacting with statuspage.io
Go
9
star
61

buildkite-secret-santa-2016

Buildkite’s 2016 Secret Santa Draw, using dynamic build pipelines and Lambda webhook receivers
HTML
9
star
62

elastic-ci-stack-for-ec2-mac

CloudFormation template for Auto Scaling AWS EC2 Mac based Buildkite Agents
Makefile
9
star
63

test-collector-swift

Buildkite Test Analytics collector for Swift XCTest
Swift
9
star
64

migration

[Alpha Version] 🛠️ Based on Compat, a tool to transform pipelines from other CI providers to Buildkite
Ruby
8
star
65

go-pipeline

A way to define and manipulate buildkite pipelines using golang. Used internally by the buildkite-agent, so you know it's good
Go
8
star
66

figma-css-paste

Plugin to paste and apply CSS styles to your objects and frames in Figma
JavaScript
8
star
67

docker-signal-test

A test for whether `docker run` handles signals correctly
Shell
8
star
68

elastic-ci-stack-ssm-secrets-hooks

🕵️‍♀️ Agent hooks for fetching git credentials from Amazon SSM Parameter Store
Shell
8
star
69

ruby-docker-example

An example of how to run a Ruby project in Docker in a Buildkite pipeline
Ruby
8
star
70

test-engine-client

Buildkite Test Engine Client (bktec) is an open source tool to orchestrate your test suites. It uses your Buildkite Test Engine suite data to intelligently partition and parallelise your tests.
Go
8
star
71

lifx-buildkite-build-light-ruby

An example Ruby Buildkite webhook endpoint for creating a LIFX-powered build light
Ruby
8
star
72

dependent-pipeline-example

An example of how to trigger Buildkite pipelines from other pipelines
7
star
73

annotation-tester

📝 Test writing Buildkite annotation bodies directly
7
star
74

buildkite-anka-example

An example of running builds in an Anka VM
Shell
7
star
75

conditional

A small language for conditionals
Go
7
star
76

rails-parallel-example

An example of how to run Rails CI and test steps in parallel with Buildkite
Ruby
7
star
77

starter

An example pipeline to get started with Buildkite Pipelines.
7
star
78

demokite

A starter Buildkite repository showcasing some of Buildkite’s features using Dynamic Pipelines
Shell
6
star
79

compat

A tool to transform pipelines from other CI providers to Buildkite
Ruby
6
star
80

bazel-example

An example of how to run a Bazel project in a Buildkite pipeline https://github.com/buildkite/example-…
C++
6
star
81

test-collector-python

Python adapter for Buildkite Test Analytics
Python
6
star
82

graphql-explorer

Buildkite's GraphQL Explorer
JavaScript
6
star
83

simplecov-buildkite

Generate Buildkite annotations from your SimpleCov coverage reports when running your build on Buildkite
Ruby
6
star
84

test-collector-rust

Rust adapter for Buildkite Test Analytics which implements a parser and sender for Rust's JSON test output
Rust
6
star
85

codebuild-run-build

Runs Codebuild Build and streams the output via Cloudwatch Logs.
Go
6
star
86

docker-bootstrap-example

🐳Run your buildkite builds inside an ephemeral per-job container
Shell
5
star
87

deploy-confirm-block-step-example

An example Buildkite pipeline that uses dynamic steps to confirm deployments on Fridays
Shell
5
star
88

slack-slash-command

An example Slack Slash Command for Buildkite
JavaScript
5
star
89

kitesocial

A super basic not-Twitter, for interviews. DO NOT FORK: clone to your machine only.
Ruby
5
star
90

agent-tests

Various scripts to test Buildkite Agent
Shell
5
star
91

lifx-buildkite-build-light-webtask

An example Webtask webhook endpoint for creating a LIFX-powered build light with Buildkite
JavaScript
5
star
92

maven-example

This example uses Maven to run tests, build a package, and then uploads the package as a Buildkite artifact using the current stable Buildkite Agent
Java
5
star
93

ruby-rbenv-example

An example of how to run a Ruby project w/ rbenv in a Buildkite pipeline
Ruby
5
star
94

test-collector-android

Buildkite Test Analytics collector for Android test frameworks
Kotlin
4
star
95

lifx-buildkite-build-light-node

An example Node.js Buildkite webhook endpoint for creating a LIFX-powered build light
JavaScript
4
star
96

polyglot-co-demo-lambda

Lambda services for https://github.com/buildkite/polyglot-co-demo-lambda
JavaScript
4
star
97

build-status-badge-themes

The library of themes you can use to spruce up your Buildkite build status badges
4
star
98

github-webhook-rotate

A utility for rotating the pipeline webhooks used by github triggering builds
Go
4
star
99

screencast-examples

Example pipelines from the Buildkite screencast series
JavaScript
4
star
100

bash-parallel-example

An example of how to a bash script in parallel on Buildkite
Shell
4
star