Skip to content

armory/plank

Folders and files

NameName
Last commit message
Last commit date
Jun 26, 2024
Mar 28, 2019
May 19, 2020
Nov 2, 2023
May 30, 2018
Feb 25, 2020
Jun 26, 2024
Jun 26, 2024
Jun 26, 2024
Jun 26, 2024
Jun 26, 2024
Jun 26, 2024
Nov 2, 2023
Jun 26, 2024
Nov 2, 2023
Nov 2, 2023
Sep 14, 2023
Sep 14, 2023
Apr 10, 2019
Jun 26, 2024

Repository files navigation

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.