gcb

package
v0.0.0-...-22db65f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
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

func LoadBuild(filename string) (*cloudbuild.Build, error)

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

func TagForReleaseVersion(releaseVersion, gitRef string) string

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

func WaitForBuild(svc *cloudbuild.Service, projectID string, id string) (*cloudbuild.Build, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL