stevvooe / go-buildkite

A Go library for the Buildkite API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

buildkite-go GoDoc Build status

A Go library and client for the Buildkite API. This project draws a lot of it's structure and testing methods from go-github.

Usage

To get the package, execute:

go get github.com/buildkite/go-buildkite/v2/buildkite

Simple shortened example for listing all pipelines is provided below, see examples for more.

import (
    "github.com/buildkite/go-buildkite/buildkite/v2"
)
...

config, err := buildkite.NewTokenConfig(*apiToken, false)

if err != nil {
	log.Fatalf("client config failed: %s", err)
}

client := buildkite.NewClient(config.Client())

pipelines, _, err := client.Pipelines.List(*org, nil)

Note: not everything in the API is present here just yet—if you need something please make an issue or submit a pull request.

Releasing

Create a new GitHub release, using a changelog generated using the ghch command line tool:

ghch --format=markdown --next-version=v<next-version-number>

License

This library is distributed under the BSD-style license found in the LICENSE file.

About

A Go library for the Buildkite API

License:BSD 2-Clause "Simplified" License


Languages

Language:Go 99.9%Language:Makefile 0.1%