Documentation
¶
Overview ¶
Package util contains common functions that are used by the rest of the OpenShift build system.
Index ¶
- Constants
- func BuildConfigSelector(name string) labels.Selector
- func BuildConfigSelectorDeprecated(name string) labels.Selector
- func BuildNameForConfigVersion(name string, version int) string
- func ConfigNameForBuild(build *buildapi.Build) string
- func GetBuildName(pod *kapi.Pod) string
- func GetBuildPodName(build *buildapi.Build) string
- func GetImageStreamForStrategy(strategy buildapi.BuildStrategy) *kapi.ObjectReference
- func IsBuildComplete(build *buildapi.Build) bool
- func IsPaused(bc *buildapi.BuildConfig) bool
- func NameFromImageStream(namespace string, ref *kapi.ObjectReference, tag string) string
- 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 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 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 GetBuildPodName ¶ added in v0.4.2
GetBuildPodName returns name of the build pod. TODO: remove in favor of the one in the api package
func GetImageStreamForStrategy ¶ added in v0.5.1
func GetImageStreamForStrategy(strategy buildapi.BuildStrategy) *kapi.ObjectReference
GetImageStreamForStrategy returns the ImageStream[Tag/Image] 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 NameFromImageStream ¶ added in v0.5.1
func NameFromImageStream(namespace string, ref *kapi.ObjectReference, tag string) string
NameFromImageStream returns a concatenated name representing an ImageStream[Tag/Image] reference. If the reference does not contain a Namespace, the namespace parameter is used instead.
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.