github.com/armory/plank/v4
go get github.com/armory/plank/v4

github.com/armory/plank/v4

Spinnaker SDK for Go

by armory

v4.0.0 (see all)License:Apache-2.0
go get github.com/armory/plank/v4
Readme

plank

Spinnaker SDK for Go.

Plank is a work in progress and will change drastically over the next few months.

What is it?

A package used by services that interact with Spinnaker's micro-services. It is not intended to be a client which interacts with Spinnaker's outward facing API.

Why is it named plank?

Because it's funny.

How do I use it?

Very carefully. 😃

Basic concept is that you instantiate a Plank client thusly:

client := plank.New()

If you'd like to supply your own http client (we use a pooled client by default):

client := plank.New(plank.WithClient(&http.Client{}))

To tune the maxiumum number of retries or set an exponential backoff value:

client := plank.New(plank.WithMaxRetries(5), plank.WithRetryIncrement(5 * time.Second))

You can (or may need to) replace the base URLs for the microservices by assign them to the keys in the client.URLs map:

client.URLs["orca"] = "http://my-orca:8083"
client.URLs["front50"] = config.Front50.BaseURL

After that, you just use the Plank functions to "do stuff":

app, err := client.GetApplication("myappname")
pipelines, err := client.GetPipelines(app.Name)
// etc...

Development

Build the project:

$ go build

Test the project:

$ go test

Cutting a New Release

  1. Update the [CHANGELOG.md]'s ##Unreleased section with the next version and today's date in YYYY-MM-DD format.
  • Don't forget to update the release URL so that it's easy to diff what was changed (look at the bottom of the CHANGELOG for existing examples).
  1. git tag vx.x.x where x.x.x is the version you're releasing, and git push --tags to make sure it's persisted to the project.

GitHub Stars

11

LAST COMMIT

1yr ago

MAINTAINERS

0

CONTRIBUTORS

22

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
v4.0.1-0.20210929171217-50ed3c19bf7d
8mos ago
v4.0.0-20210507183839-114b4edf7951
1yr ago
v4.0.0-20210426205745-d9c6bff52feb
1yr ago
v4.0.0-20210506200752-0d08faddba2b
1yr ago
No alternatives found
No tutorials found
Add a tutorial