Documentation ¶
Index ¶
Constants ¶
const ( // Secrets for validating secret references in Build objects Secrets = "secrets" // Strategies for validating strategy references in Build objects Strategies = "strategy" // SourceURL for validating the source URL in Build objects SourceURL = "sourceurl" // Sources for validating `spec.sources` entries Sources = "sources" // BuildName for validating `metadata.name` entry BuildName = "buildname" // Envs for validating `spec.env` entries Envs = "env" // OwnerReferences for validating the ownerreferences between a Build // and BuildRun objects OwnerReferences = "ownerreferences" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildNameRef ¶ added in v0.6.0
BuildNameRef contains all required fields to validate a build name
func (*BuildNameRef) ValidatePath ¶ added in v0.6.0
func (b *BuildNameRef) ValidatePath(_ context.Context) error
ValidatePath implements BuildPath interface and validates that build name is a valid label value
type BuildPath ¶
BuildPath is an interface that holds a ValidatePath() function for validating different Build spec paths
type Credentials ¶ added in v0.4.0
Credentials contains all required fields to validate a Build spec secrets definitions
func (Credentials) ValidatePath ¶ added in v0.4.0
func (s Credentials) ValidatePath(ctx context.Context) error
ValidatePath implements BuildPath interface and validates that all referenced secrets under spec exists
type Env ¶ added in v0.6.0
Env implements the Env interface to add validations for the `build.spec.env` slice.
type SourceURLRef ¶
SourceURLRef contains all required fields to validate a Build spec source definition
func (SourceURLRef) MarkBuildStatus ¶
func (s SourceURLRef) MarkBuildStatus(build *build.Build, reason build.BuildReason, msg string)
MarkBuildStatus updates a Build Status fields
func (SourceURLRef) ValidatePath ¶
func (s SourceURLRef) ValidatePath(ctx context.Context) error
ValidatePath implements BuildPath interface and validates that the spec.source.url exists. This validation only applies to endpoints that do not require authentication.
type SourcesRef ¶ added in v0.5.0
SourcesRef implements RuntimeRef interface to add validations for `build.spec.sources` slice.
func NewSourcesRef ¶ added in v0.5.0
func NewSourcesRef(b *build.Build) *SourcesRef
NewSourcesRef instantiate a new SourcesRef passing the build object pointer along.
func (*SourcesRef) ValidatePath ¶ added in v0.5.0
func (s *SourcesRef) ValidatePath(_ context.Context) error
ValidatePath executes the validation routine, inspecting the `build.spec.sources` path, which contains a slice of BuildSource.