util

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2016 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package util contains common functions that are used by the rest of the OpenShift build system.

Index

Constants

View Source
const (
	// NoBuildLogsMessage reports that no build logs are available
	NoBuildLogsMessage = "No logs are available."
)

Variables

This section is empty.

Functions

func BuildConfigSelector

func BuildConfigSelector(name string) labels.Selector

BuildConfigSelector returns a label Selector which can be used to find all builds for a BuildConfig.

func BuildConfigSelectorDeprecated

func BuildConfigSelectorDeprecated(name string) labels.Selector

BuildConfigSelectorDeprecated returns a label Selector which can be used to find all builds for a BuildConfig that use the deprecated labels.

func BuildNameForConfigVersion

func BuildNameForConfigVersion(name string, version int) string

BuildNameForConfigVersion returns the name of the version-th build for the config that has the provided name.

func ConfigNameForBuild

func ConfigNameForBuild(build *buildapi.Build) string

ConfigNameForBuild returns the name of the build config from a build name.

func GetBuildName

func GetBuildName(pod *kapi.Pod) string

GetBuildName returns name of the build pod.

func GetBuildPodName

func GetBuildPodName(build *buildapi.Build) string

GetBuildPodName returns name of the build pod. TODO: remove in favor of the one in the api package

func GetInputReference

func GetInputReference(strategy buildapi.BuildStrategy) *kapi.ObjectReference

GetInputReference returns the From ObjectReference associated with the BuildStrategy.

func IsBuildComplete

func IsBuildComplete(build *buildapi.Build) bool

IsBuildComplete returns whether the provided build is complete or not

func IsPaused

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

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

func VersionForBuild(build *buildapi.Build) int

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.

Jump to

Keyboard shortcuts

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