Documentation ¶
Overview ¶
Package util contains common functions that are used by the rest of the OpenShift build system.
Index ¶
- Constants
- func BuildConfigBuilds(c buildclient.BuildLister, namespace, name string, filterFunc buildFilter) (*buildapi.BuildList, error)
- func BuildConfigSelector(name string) labels.Selector
- func BuildConfigSelectorDeprecated(name string) labels.Selector
- func BuildDeepCopy(build *buildapi.Build) (*buildapi.Build, error)
- func BuildNameForConfigVersion(name string, version int) string
- func BuildNumber(build *buildapi.Build) (int64, error)
- func BuildRunPolicy(build *buildapi.Build) buildapi.BuildRunPolicy
- func ConfigNameForBuild(build *buildapi.Build) string
- func GetBuildName(pod *kapi.Pod) string
- func GetInputReference(strategy buildapi.BuildStrategy) *kapi.ObjectReference
- func IsBuildComplete(build *buildapi.Build) bool
- func IsPaused(bc *buildapi.BuildConfig) bool
- func MergeTrustedEnvWithoutDuplicates(source []kapi.EnvVar, output *[]kapi.EnvVar, sourcePrecedence bool)
- func SafeForLoggingBuild(build *buildapi.Build) *buildapi.Build
- func SafeForLoggingBuildCommonSpec(spec *buildapi.CommonSpec) *buildapi.CommonSpec
- func SafeForLoggingEnvVar(env []kapi.EnvVar) []kapi.EnvVar
- func SafeForLoggingEnvironmentList(env s2iapi.EnvironmentList) s2iapi.EnvironmentList
- func SafeForLoggingS2IConfig(config *s2iapi.Config) *s2iapi.Config
- func SafeForLoggingURL(u *url.URL) *url.URL
- func VersionForBuild(build *buildapi.Build) int
Constants ¶
const (
// NoBuildLogsMessage reports that no build logs are available
NoBuildLogsMessage = "No logs are available."
)
Variables ¶
This section is empty.
Functions ¶
func BuildConfigBuilds ¶ added in v1.3.0
func BuildConfigBuilds(c buildclient.BuildLister, namespace, name string, filterFunc buildFilter) (*buildapi.BuildList, error)
BuildConfigBuilds return a list of builds for the given build config. Optionally you can specify a filter function to select only builds that matches your criteria.
func BuildConfigSelector ¶ added in v1.1.2
BuildConfigSelector returns a label Selector which can be used to find all builds for a BuildConfig.
func BuildConfigSelectorDeprecated ¶ added in v1.1.2
BuildConfigSelectorDeprecated returns a label Selector which can be used to find all builds for a BuildConfig that use the deprecated labels.
func BuildNameForConfigVersion ¶ added in v1.0.8
BuildNameForConfigVersion returns the name of the version-th build for the config that has the provided name.
func BuildNumber ¶ added in v1.3.0
BuildNumber returns the given build number.
func BuildRunPolicy ¶ added in v1.3.0
func BuildRunPolicy(build *buildapi.Build) buildapi.BuildRunPolicy
BuildRunPolicy returns the scheduling policy for the build based on the "queued" label.
func ConfigNameForBuild ¶ added in v1.1.2
ConfigNameForBuild returns the name of the build config from a build name.
func GetBuildName ¶ added in v0.5.3
GetBuildName returns name of the build pod.
func GetInputReference ¶ added in v1.1.4
func GetInputReference(strategy buildapi.BuildStrategy) *kapi.ObjectReference
GetInputReference returns the From ObjectReference associated with the BuildStrategy.
func IsBuildComplete ¶ added in v0.5.3
IsBuildComplete returns whether the provided build is complete or not
func IsPaused ¶ added in v1.1.2
func IsPaused(bc *buildapi.BuildConfig) bool
IsPaused returns true if the provided BuildConfig is paused and cannot be used to create a new Build
func MergeTrustedEnvWithoutDuplicates ¶
func MergeTrustedEnvWithoutDuplicates(source []kapi.EnvVar, output *[]kapi.EnvVar, sourcePrecedence bool)
MergeTrustedEnvWithoutDuplicates merges two environment lists without having duplicate items in the output list. The source list will be filtered such that only whitelisted environment variables are merged into the output list. If sourcePrecedence is true, keys in the source list will override keys in the output list.
func SafeForLoggingBuild ¶
SafeForLoggingBuild returns a copy of a Build with proxy credentials redacted.
func SafeForLoggingBuildCommonSpec ¶
func SafeForLoggingBuildCommonSpec(spec *buildapi.CommonSpec) *buildapi.CommonSpec
SafeForLoggingBuildCommonSpec returns a copy of a CommonSpec with proxy credential env variable values redacted.
func SafeForLoggingEnvVar ¶
SafeForLoggingEnvVar returns a copy of an EnvVar array with proxy credential values redacted.
func SafeForLoggingEnvironmentList ¶
func SafeForLoggingEnvironmentList(env s2iapi.EnvironmentList) s2iapi.EnvironmentList
SafeForLoggingEnvironmentList returns a copy of an s2i EnvironmentList array with proxy credential values redacted.
func SafeForLoggingS2IConfig ¶
SafeForLoggingS2IConfig returns a copy of an s2i Config with proxy credentials redacted.
func SafeForLoggingURL ¶
SafeForLoggingURL removes the user:password section of a url if present. If not present the value is returned unchanged.
func VersionForBuild ¶ added in v1.1.2
VersionForBuild returns the version from the provided build name. If no version can be found, 0 is returned to indicate no version.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package dockerfile has utilities that complement Docker's official Dockerfile parser.
|
Package dockerfile has utilities that complement Docker's official Dockerfile parser. |