A Go library and client for the Buildkite API. This project draws a lot of its structure and testing methods from go-github.
To get the package, execute:
go get github.com/buildkite/go-buildkite/v3/buildkite
Simple shortened example for listing all pipelines:
import (
"github.com/buildkite/go-buildkite/v3/buildkite"
"gopkg.in/alecthomas/kingpin.v2"
)
var (
apiToken = kingpin.Flag("token", "API token").Required().String()
org = kingpin.Flag("org", "Organization slug").Required().String()
)
client, err := buildkite.NewOpts(buildkite.WithTokenAuth(*apiToken))
if err != nil {
log.Fatalf("client config failed: %s", err)
}
pipelines, _, err := client.Pipelines.List(*org, nil)
See the examples directory for additional examples.
Note: not all API features are supported by go-buildkite
just yet. If you need a feature, please make an issue or submit a pull request.
- Update the version number in
version.go
- Generate a changelog using ghch:
ghch --format=markdown --next-version=v<next-version-number>
, and update it inCHANGELOG.md
- Commit and tag the new version
- Create a matching GitHub release
This library is distributed under the BSD-style license found in the LICENSE file.