1. Resources
  2. /
  3. Plugins
  4. /
  5. golang-buildkite-plugin

Golang Buildkite Plugin Build status

This used to be the home of the GOPATH Checkout Buildkite Plugin. If you’ve received “Failed to checkout plugin golang” errors (#1), please update your pipeline.yml plugin name from golang to gopath-checkout.

A Buildkite plugin for running a command in a docker container with a specific golang version.

The build directory is mounted into the docker container, so artifact uploads work.

Example

You can run go commands against a specific version.

steps:
  - command: go test ./...
    plugins:
      - golang#v2.0.0:
          version: 1.13.8
          import: github.com/buildkite/agent

You can pass in additional environment variables:

steps:
  - command: go build .
    plugins:
      - golang#v2.0.0:
          version: 1.13.8
          import: github.com/buildkite/agent
          environment:
            - GOOS=darwin
            - GOARCH=amd64

Configuration

version (required)

The golang docker image to use. See https://hub.docker.com/_/golang/ for a full list.

Example: 1.10.2

import(required)

The golang package to use in the gopath in the container.

Exmaple: github.com/buildkite/agent

environment (optional)

Extra environment variables to pass to the docker container, in an array. Items can be specified as either KEY or KEY=value. Each entry corresponds to a Docker CLI --env parameter. Values specified as variable names will be passed through from the outer environment.

Examples: MY_SECRET_KEY, MY_SPECIAL_BUT_PUBLIC_VALUE=kittens

See https://golang.org/doc/install/source#environment for all the possible values that the golang binary respects.

Compatibility

Elastic StackAgent Stack K8sHosted (Mac)Hosted (Linux)Notes
Docker not available on Hosted Mac
  • ✅ Fully supported (all combinations of attributes have been tested to pass)
  • ⚠️ Partially supported (some combinations cause errors/issues)
  • ❌ Not supported

License

MIT (see LICENSE)

The plugins listed on this webpage are provided for informational purposes only. They have not undergone any formal security review or assessment. While we strive to provide useful resources, we cannot guarantee the safety, reliability, or integrity of these plugins. Users are strongly advised to conduct their own security evaluations before downloading, installing, or using any plugin. By using these plugins, you acknowledge and accept any risks associated with their use. We disclaim any liability for any harm or damages arising from the use of the plugins listed.

Start turning complexity into an advantage

Create an account to get started with a 30-day free trial. No credit card required.

Buildkite Pipelines

Platform

  1. Pipelines
  2. Pipeline templates
  3. Public pipelines
  4. Test Engine
  5. Package Registries
  6. Mobile Delivery Cloud
  7. Pricing

Hosting options

  1. Self-hosted agents
  2. Mac hosted agents
  3. Linux hosted agents

Resources

  1. Docs
  2. Blog
  3. Changelog
  4. Webinars
  5. Plugins
  6. Case studies
  7. Events
  8. Migration Services
  9. Comparisons

Company

  1. About
  2. Careers
  3. Press
  4. Brand assets
  5. Contact

Solutions

  1. Replace Jenkins
  2. Workflows for AI/ML
  3. Testing at scale
  4. Monorepo mojo
  5. Bazel orchestration

Legal

  1. Terms of Service
  2. Acceptable Use Policy
  3. Privacy Policy
  4. Subprocessors
  5. Service Level Agreement

Support

  1. System status
  2. Forum
© Buildkite Pty Ltd 2025