gcb

package
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 37 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// StatusUnknown "STATUS_UNKNOWN" - Status of the build is unknown.
	StatusUnknown = "STATUS_UNKNOWN"

	// StatusQueued "QUEUED" - Build is queued; work has not yet begun.
	StatusQueued = "QUEUED"

	// StatusWorking "WORKING" - Build is being executed.
	StatusWorking = "WORKING"

	// StatusSuccess  "SUCCESS" - Build finished successfully.
	StatusSuccess = "SUCCESS"

	// StatusFailure  "FAILURE" - Build failed to complete successfully.
	StatusFailure = "FAILURE"

	// StatusInternalError  "INTERNAL_ERROR" - Build failed due to an internal cause.
	StatusInternalError = "INTERNAL_ERROR"

	// StatusTimeout  "TIMEOUT" - Build took longer than was allowed.
	StatusTimeout = "TIMEOUT"

	// StatusCancelled  "CANCELLED" - Build was canceled by a user.
	StatusCancelled = "CANCELLED"

	// RetryDelay is the time to wait in between polling the status of the cloud build
	RetryDelay = 1 * time.Second

	// BackoffFactor is the exponent for exponential backoff during build status polling
	BackoffFactor = 1.5

	// BackoffSteps is the number of times we increase the backoff time during exponential backoff
	BackoffSteps = 10

	// RetryTimeout is the max amount of time to retry getting the status of the build before erroring
	RetryTimeout = 3 * time.Minute
)

Variables

This section is empty.

Functions

func NewStatusBackoff added in v0.37.0

func NewStatusBackoff() *wait.Backoff

Types

type Builder

type Builder struct {
	*latest.GoogleCloudBuild
	// contains filtered or unexported fields
}

Builder builds artifacts with Google Cloud Build.

func NewBuilder

func NewBuilder(bCtx BuilderContext, buildCfg *latest.GoogleCloudBuild) *Builder

NewBuilder creates a new Builder that builds artifacts with Google Cloud Build.

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, out io.Writer, artifact *latest.Artifact) build.ArtifactBuilder

Build builds a list of artifacts with Google Cloud Build.

func (*Builder) Concurrency added in v1.18.0

func (b *Builder) Concurrency() *int

func (*Builder) PostBuild added in v1.18.0

func (b *Builder) PostBuild(_ context.Context, _ io.Writer) error

func (*Builder) PreBuild added in v1.18.0

func (b *Builder) PreBuild(_ context.Context, _ io.Writer) error

func (*Builder) Prune added in v0.28.0

func (b *Builder) Prune(ctx context.Context, out io.Writer) error

func (*Builder) PushImages added in v1.28.0

func (b *Builder) PushImages() bool

func (*Builder) SupportedPlatforms added in v1.36.0

func (b *Builder) SupportedPlatforms() platform.Matcher

type BuilderContext added in v1.22.0

type BuilderContext interface {
	Config
	ArtifactStore() build.ArtifactStore
	SourceDependenciesResolver() graph.SourceDependenciesCache
}

type Config added in v1.7.1

type Config interface {
	docker.Config

	SkipTests() bool
	Muted() config.Muted
}

Jump to

Keyboard shortcuts

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