Documentation ¶
Overview ¶
Package cloudbuild wraps interaction with Google Cloud Build.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct { // Theses fields are always available. ID string // UUID string with the build ID LogURL string // URL to a UI page (for humans) with build logs Status Status // see the enum StatusDetails string // human readable string with more details (if any) // These fields are available only for successful builds. InputHashes map[string]string // SHA256 hashes of build inputs ("gs://..." => SHA256) OutputImage string // uploaded image name (if any) OutputDigest string // digest (in "sha256:..." form) of the image }
Build represents a pending, in-flight or completed build.
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder knows how to trigger Cloud Build builds and check their status.
func New ¶
func New(ctx context.Context, ts oauth2.TokenSource, cfg manifest.CloudBuildConfig) (*Builder, error)
New prepares a Builder instance.
type Request ¶
type Request struct { // Source is a reference to the uploaded tarball with the context directory. Source *storage.Object // Image is a name of the image (perhaps with ":<tag>") to produce and push. // // Should include a docker registry part, e.g. have form "gcr.io/../...". // // If empty, Builder will still build an image, but will not push it anywhere. // Useful to verify Dockerfile is working without accumulating cruft. Image string // Labels is a labels to put into the produced docker image (if any). Labels docker.Labels }
Request specifies what we want to build and push.
It is passed to Trigger.
type Status ¶
type Status string
Status is possible status of a Cloud Build.
const ( StatusUnknown Status = "STATUS_UNKNOWN" StatusQueued Status = "QUEUED" StatusWorking Status = "WORKING" StatusSuccess Status = "SUCCESS" StatusFailure Status = "FAILURE" StatusInternalError Status = "INTERNAL_ERROR" StatusTimeout Status = "TIMEOUT" StatusCancelled Status = "CANCELLED" )
See https://cloud.google.com/cloud-build/docs/api/reference/rest/Shared.Types/Status
func (Status) IsTerminal ¶
IsTerminal is true if the build is done (successfully or not).
Click to show internal directories.
Click to hide internal directories.