common

package
v3.7.0-0.102.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleBuildCompletion

func HandleBuildCompletion(build *buildapi.Build, buildLister buildlister.BuildLister, buildConfigGetter buildlister.BuildConfigLister, buildDeleter buildclient.BuildDeleter, runPolicies []policy.RunPolicy)

func HandleBuildPruning

func HandleBuildPruning(buildConfigName string, namespace string, buildLister buildlister.BuildLister, buildConfigGetter buildlister.BuildConfigLister, buildDeleter buildclient.BuildDeleter) error

HandleBuildPruning handles the deletion of old successful and failed builds based on settings in the BuildConfig.

func HasBuildPodNameAnnotation

func HasBuildPodNameAnnotation(build *buildapi.Build) bool

func ResolveValueFrom

func ResolveValueFrom(pod *v1.Pod, client kclientset.Interface) error

ResolveValueFrom resolves valueFrom references in build environment variables including references to existing environment variables, jsonpath references to the build object, secrets, and configmaps. The build.Strategy.BuildStrategy.Env is replaced with the resolved references.

func SetBuildCompletionTimeAndDuration

func SetBuildCompletionTimeAndDuration(build *buildapi.Build, startTime *metav1.Time) bool

SetBuildCompletionTimeAndDuration will set the build completion timestamp to the current time if it is nil. It will also set the start timestamp to the same value if it is nil. Returns true if the build object was modified.

func SetBuildPodNameAnnotation

func SetBuildPodNameAnnotation(build *buildapi.Build, podName string)

Types

type ByCreationTimestamp

type ByCreationTimestamp []*buildapi.Build

func (ByCreationTimestamp) Len

func (b ByCreationTimestamp) Len() int

func (ByCreationTimestamp) Less

func (b ByCreationTimestamp) Less(i, j int) bool

func (ByCreationTimestamp) Swap

func (b ByCreationTimestamp) Swap(i, j int)

type ErrEnvVarResolver

type ErrEnvVarResolver struct {
	// contains filtered or unexported fields
}

ErrEnvVarResolver is an error type for build environment resolution errors

func (ErrEnvVarResolver) Error

func (e ErrEnvVarResolver) Error() string

Error returns a string representation of the error

Jump to

Keyboard shortcuts

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