Documentation ¶
Index ¶
- Constants
- func ListBuildsWithTag(ctx context.Context, svc *cloudbuild.Service, projectID string, tag string) ([]*cloudbuild.Build, error)
- func LoadBuild(filename string) (*cloudbuild.Build, error)
- func NewestGreenBuild(ctx context.Context, svc *cloudbuild.Service, ...) *cloudbuild.Build
- func SubmitBuild(svc *cloudbuild.Service, projectID string, build *cloudbuild.Build) (*cloudbuild.Build, error)
- func TagForReleaseVersion(releaseVersion, gitRef string) string
- func WaitForBuild(svc *cloudbuild.Service, projectID string, id string) (*cloudbuild.Build, error)
Constants ¶
const ( Success = "SUCCESS" Failure = "FAILURE" )
Variables ¶
This section is empty.
Functions ¶
func ListBuildsWithTag ¶
func ListBuildsWithTag(ctx context.Context, svc *cloudbuild.Service, projectID string, tag string) ([]*cloudbuild.Build, error)
ListBuildsWithTag will list all Builds that have the given tag value set, paginating through any responses from the GCB API that use pagination.
func LoadBuild ¶
LoadBuild will decode a cloudbuild.yaml file into a cloudbuild.Build structure and return it.
func NewestGreenBuild ¶
func NewestGreenBuild(ctx context.Context, svc *cloudbuild.Service, projectID, releaseVersion, gitRef string) *cloudbuild.Build
NewestGreenBuild will find the newest passing release build for a given release version and git commit ref.
func SubmitBuild ¶
func SubmitBuild(svc *cloudbuild.Service, projectID string, build *cloudbuild.Build) (*cloudbuild.Build, error)
SubmitBuild will submit a Build to the cloud build API. It will wait for the Create operation to complete, and then return an up-to-date copy of the Build from the server.
func TagForReleaseVersion ¶
TagForReleaseVersion will return a tag that should be added to Builds for a given releaseVersion/gitRef pair. This is used to discover existing GCB builds for a release when running the stage command.
func WaitForBuild ¶
WaitForBuild will wait for the GCB Build with the given ID to complete before returning a final copy of the Build resource.
Types ¶
This section is empty.