Skip to content

Latest commit

 

History

History
59 lines (35 loc) · 1.64 KB

CONTRIBUTING.md

File metadata and controls

59 lines (35 loc) · 1.64 KB

Contributing

Interested in contributing to Spinnaker? Please review the contribution documentation.

Setup

Go

Install Go 1.13.x.

Go modules

Clone the repository to a directory outside of your GOPATH:

$ git clone https://github.com/spinnaker/spin

Afterward, use go build to build the program. This will automatically fetch dependencies.

$ go build

Upon first build, you may see output while the go tool fetches dependencies.

To verify dependencies match checksums under go.sum, run go mod verify.

To clean up any old, unused go.mod or go.sum lines, run go mod tidy.

Running Spin

Run using

./spin <cmds> <flags>

Running tests

Test using

go test -v ./...

from the root spin/ directory.

Updating the Gate API

Spin CLI uses Swagger to generate the API client library for Gate. To update the client library:

  • From the root of the Gate directory, execute swagger/generate_swagger.sh to create the swagger.json API spec.
  • Get the Swagger Codegen CLI. Use the version specified here.
  • Remove the existing generated code from the spin directory rm -r ~/spin/gateapi
  • Use the Swagger Codegen CLI to generate the new library and drop it into the spin project java -jar ~/swagger-codegen-cli.jar generate -i ~/gate/swagger/swagger.json -l go -o ~/spin/gateapi
  • Commit the changes and open a PR.