strategy

package
v3.10.0-0.24.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DockerPushSecretMountPath      = "/var/run/secrets/openshift.io/push"
	DockerPullSecretMountPath      = "/var/run/secrets/openshift.io/pull"
	SecretBuildSourceBaseMountPath = "/var/run/secrets/openshift.io/build"
	SourceImagePullSecretMountPath = "/var/run/secrets/openshift.io/source-image"

	// ExtractImageContentContainer is the name of the container that will
	// pull down input images and extract their content for input to the build.
	ExtractImageContentContainer = "extract-image-content"

	// GitCloneContainer is the name of the container that will clone the
	// build source repository and also handle binary input content.
	GitCloneContainer = "git-clone"
)
View Source
const (
	CustomBuild = "custom-build"
)

Variables

View Source
var BuildContainerNames = []string{CustomBuild, stiBuild, dockerBuild}
View Source
var (
	// BuildControllerRefKind contains the schema.GroupVersionKind for builds.
	// This is used in the ownerRef of builder pods.
	BuildControllerRefKind = buildapiv1.SchemeGroupVersion.WithKind("Build")
)
View Source
var DefaultDropCaps = []string{
	"KILL",
	"MKNOD",
	"SETGID",
	"SETUID",
}

DefaultDropCaps is the list of capabilities to drop if the current user cannot run as root

Functions

func HasOwnerReference

func HasOwnerReference(pod *v1.Pod, build *buildapi.Build) bool

HasOwnerReference returns true if the build pod has an OwnerReference to the build.

func IsFatal added in v1.1.2

func IsFatal(err error) bool

IsFatal returns true if the error is fatal

Types

type CustomBuildStrategy added in v0.2.1

type CustomBuildStrategy struct {
	// Codec is the codec to use for encoding the output pod.
	// IMPORTANT: This may break backwards compatibility when
	// it changes.
	Codec runtime.Codec
}

CustomBuildStrategy creates a build using a custom builder image.

func (*CustomBuildStrategy) CreateBuildPod added in v0.2.1

func (bs *CustomBuildStrategy) CreateBuildPod(build *buildapi.Build) (*v1.Pod, error)

CreateBuildPod creates the pod to be used for the Custom build

type DockerBuildStrategy

type DockerBuildStrategy struct {
	Image string
	// Codec is the codec to use for encoding the output pod.
	// IMPORTANT: This may break backwards compatibility when
	// it changes.
	Codec runtime.Codec
}

DockerBuildStrategy creates a Docker build using a Docker builder image.

func (*DockerBuildStrategy) CreateBuildPod

func (bs *DockerBuildStrategy) CreateBuildPod(build *buildapi.Build) (*v1.Pod, error)

CreateBuildPod creates the pod to be used for the Docker build TODO: Make the Pod definition configurable

type FatalError added in v1.1.2

type FatalError struct {
	// Reason the fatal error occurred
	Reason string
}

FatalError is an error which can't be retried.

func (*FatalError) Error added in v1.1.2

func (e *FatalError) Error() string

Error implements the error interface.

type SourceBuildStrategy added in v0.5.2

type SourceBuildStrategy struct {
	Image string
	// Codec is the codec to use for encoding the output pod.
	// IMPORTANT: This may break backwards compatibility when
	// it changes.
	Codec          runtime.Codec
	SecurityClient securityinternalversion.SecurityInterface
}

SourceBuildStrategy creates STI(source to image) builds

func (*SourceBuildStrategy) CreateBuildPod added in v0.5.2

func (bs *SourceBuildStrategy) CreateBuildPod(build *buildapi.Build) (*v1.Pod, error)

CreateBuildPod creates a pod that will execute the STI build TODO: Make the Pod definition configurable

Jump to

Keyboard shortcuts

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