util

package
v1.5.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

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 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

func BuildConfigSelector(name string) labels.Selector

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

func BuildConfigSelectorDeprecated added in v1.1.2

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 added in v1.0.8

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 BuildNumber added in v1.3.0

func BuildNumber(build *buildapi.Build) (int64, error)

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

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 GetInputReference added in v1.1.4

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 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 VersionForBuild added in v1.1.2

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