builds

package
v0.0.0-...-2cdd923 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BuildStartedEventReason is the reason associated with the event registered when a build is started (pod is created).
	BuildStartedEventReason = "BuildStarted"
	// BuildStartedEventMessage is the message associated with the event registered when a build is started (pod is created).
	BuildStartedEventMessage = "Build %s/%s is now running"
	// BuildCompletedEventReason is the reason associated with the event registered when build completes successfully.
	BuildCompletedEventReason = "BuildCompleted"
	// BuildCompletedEventMessage is the message associated with the event registered when build completes successfully.
	BuildCompletedEventMessage = "Build %s/%s completed successfully"
	// BuildFailedEventReason is the reason associated with the event registered when build fails.
	BuildFailedEventReason = "BuildFailed"
	// BuildFailedEventMessage is the message associated with the event registered when build fails.
	BuildFailedEventMessage = "Build %s/%s failed"
	// BuildCancelledEventReason is the reason associated with the event registered when build is cancelled.
	BuildCancelledEventReason = "BuildCancelled"
	// BuildCancelledEventMessage is the message associated with the event registered when build is cancelled.
	BuildCancelledEventMessage = "Build %s/%s has been cancelled"
)

Variables

View Source
var (

	// BuildControllerTestWait is the time that RunBuildControllerTest waits
	// for any other changes to happen when testing whether only a single build got processed
	BuildControllerTestWait = 10 * time.Second

	// BuildControllerTestTransitionTimeout is the time RunBuildControllerPodSyncTest waits
	// for a build trasition to occur after the pod's status has been updated
	BuildControllerTestTransitionTimeout = 60 * time.Second

	// BuildControllersWatchTimeout is used by all tests to wait for watch events. In case where only
	// a single watch event is expected, the test will fail after the timeout.
	// The value is 6 minutes to allow for a resync to occur, which allows for necessarily
	// reconciliation to occur in tests where events occur in a non-deterministic order.
	BuildControllersWatchTimeout = 360 * time.Second
)
View Source
var (
	// Decoder understands groupified and non-groupfied.  It deals in internals for now, but will be updated later
	Decoder runtime.Decoder

	// EncoderScheme can identify types for serialization. We use this for the event recorder and other things that need to
	// identify external kinds.
	EncoderScheme = runtime.NewScheme()
	// Encoder always encodes to groupfied.
	Encoder runtime.Encoder
)

Functions

func After

func After(oc *exutil.CLI)

func Before

func Before(oc *exutil.CLI)

func BuildConfigBuilds

func BuildConfigBuilds(c buildclientv1.BuildsGetter, namespace, name string, filterFunc buildFilter) ([]*buildv1.Build, 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

func BuildConfigSelector(name string) labels.Selector

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

func ExpectOpenShiftLabels

func ExpectOpenShiftLabels(labels map[string]string) error

ExpectOpenShiftLabels tests if built container image contains appropriate labels.

func GetBuildPodName

func GetBuildPodName(build *buildv1.Build) string

GetBuildPodName returns name of the build pod.

func IsBuildComplete

func IsBuildComplete(build *buildv1.Build) bool

IsBuildComplete returns whether the provided build is complete or not

func IsTerminalPhase

func IsTerminalPhase(phase buildv1.BuildPhase) bool

IsTerminalPhase returns true if the provided phase is terminal

func LabelValue

func LabelValue(name string) string

LabelValue returns a string to use as a value for the Build label in a pod. If the length of the string parameter exceeds the maximum label length, the value will be truncated.

func RunBuildCompletePodDeleteTest

func RunBuildCompletePodDeleteTest(t testingT, clusterAdminClient buildv1clienttyped.BuildsGetter, clusterAdminKubeClientset kubernetes.Interface, ns string)

func RunBuildConfigChangeControllerTest

func RunBuildConfigChangeControllerTest(t testingT, clusterAdminBuildClient buildv1clienttyped.BuildV1Interface, ns string)

func RunBuildDeleteTest

func RunBuildDeleteTest(t testingT, clusterAdminClient buildv1clienttyped.BuildsGetter, clusterAdminKubeClientset kubernetes.Interface, ns string)

func RunBuildRunningPodDeleteTest

func RunBuildRunningPodDeleteTest(t testingT, clusterAdminClient buildv1clienttyped.BuildsGetter, clusterAdminKubeClientset kubernetes.Interface, ns string)

func RunImageChangeTriggerTest

func RunImageChangeTriggerTest(t testingT, clusterAdminBuildClient buildv1clienttyped.BuildV1Interface, clusterAdminImageClient imagev1clienttyped.ImageV1Interface, ns string)

func TestWebhook

func TestWebhook(t g.GinkgoTInterface, oc *exutil.CLI)

func TestWebhookGitHubPing

func TestWebhookGitHubPing(t g.GinkgoTInterface, oc *exutil.CLI)

func TestWebhookGitHubPushWithImage

func TestWebhookGitHubPushWithImage(t g.GinkgoTInterface, oc *exutil.CLI)

func TestWebhookGitHubPushWithImageStream

func TestWebhookGitHubPushWithImageStream(t g.GinkgoTInterface, oc *exutil.CLI)

Types

This section is empty.

Jump to

Keyboard shortcuts

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