trigger

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilesChanged

func FilesChanged(restartOn *v1alpha1.RestartOnSpec, fileWatches []*v1alpha1.FileWatch, lastBuild time.Time) []string

FilesChanged determines the set of files that have changed since the given timestamp. We err on the side of undercounting (i.e., skipping files that may have triggered this build but are not sure).

func LastRestartEvent

func LastRestartEvent(ctx context.Context, cli client.Reader, restartOn *v1alpha1.RestartOnSpec) (metav1.MicroTime, *v1alpha1.UIButton, []*v1alpha1.FileWatch, error)

LastRestartEvent determines the last time a restart was requested from this target's dependencies.

Returns the most recent restart time.

If the most recent restart is from a button, return the button. Some consumers use the button for text inputs. If the most recent restart is from a FileWatch, return the FileWatch. Some consumers use the FileWatch to determine if they should re-run or not to avoid repeated failures.

func LastStartEvent

func LastStartEvent(ctx context.Context, cli client.Reader, startOn *v1alpha1.StartOnSpec) (metav1.MicroTime, *v1alpha1.UIButton, error)

LastStartEvent determines the last time a start was requested from this target's dependencies.

Returns the most recent start time. If the most recent start is from a button, return the button. Some consumers use the button for text inputs.

func LastStopEvent

func LastStopEvent(ctx context.Context, cli client.Reader, stopOn *v1alpha1.StopOnSpec) (metav1.MicroTime, *v1alpha1.UIButton, error)

LastStopEvent determines the latest time a stop was requested from this target's dependencies.

Returns the most recent stop time. If the most recent stop is from a button, return the button. Some consumers use the button for text inputs.

func SetupControllerRestartOn

func SetupControllerRestartOn(builder *builder.Builder, idxer *indexer.Indexer, extract func(obj client.Object) *v1alpha1.RestartOnSpec)

SetupControllerRestartOn sets up watchers / indexers for a type with a RestartOnSpec

func SetupControllerStartOn

func SetupControllerStartOn(builder *builder.Builder, idxer *indexer.Indexer, extract func(obj client.Object) *v1alpha1.StartOnSpec)

SetupControllerStartOn sets up watchers / indexers for a type with a StartOnSpec

func SetupControllerStopOn

func SetupControllerStopOn(builder *builder.Builder, idxer *indexer.Indexer, extract func(obj client.Object) *v1alpha1.StopOnSpec)

SetupControllerStopOn sets up watchers / indexers for a type with a StopOnSpec

Types

This section is empty.

Jump to

Keyboard shortcuts

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