Documentation ¶
Index ¶
- func IsValidConfiguration(config *api.ReleaseBuildConfiguration, org, repo string) error
- func IsValidGraphConfiguration(rawSteps []api.StepConfiguration) error
- func IsValidResolvedConfiguration(config *api.ReleaseBuildConfiguration, mergedConfig bool) error
- func IsValidRuntimeConfiguration(config *api.ReleaseBuildConfiguration) error
- func LinkForImage(image string, config *api.ReleaseBuildConfiguration) api.StepLink
- func NewConfigContext() *configContext
- func Observer(observer api.Observer) []error
- func ValidateBaseImages(ctx *configContext, images map[string]api.ImageStreamTagReference) []error
- func ValidateImages(ctx *configContext, images []api.ProjectDirectoryImageBuildStepConfiguration) []error
- func ValidateOperator(ctx *configContext, config *api.ReleaseBuildConfiguration) []error
- func ValidateOperatorSubstitution(ctx *configContext, sub api.PullSpecSubstitution, ...) error
- func ValidateSecretInStep(ns, name string) error
- type Validator
- func (v *Validator) IsValidConfiguration(config *api.ReleaseBuildConfiguration, org, repo string) error
- func (v *Validator) IsValidReference(step api.LiteralTestStep) []error
- func (v *Validator) IsValidResolvedConfiguration(config *api.ReleaseBuildConfiguration) error
- func (v *Validator) ValidateTestStepConfiguration(ctx *configContext, config *api.ReleaseBuildConfiguration, resolved bool) []error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidConfiguration ¶
func IsValidConfiguration(config *api.ReleaseBuildConfiguration, org, repo string) error
IsValidConfiguration validates all the configuration's values.
func IsValidGraphConfiguration ¶
func IsValidGraphConfiguration(rawSteps []api.StepConfiguration) error
IsValidGraphConfiguration verifies the intermediary configuration is correct. This is the ideal place for validations since the graph configuration is the intermediary structure between the input configuration and the final execution graph. Validations done here take advantage of all the parsing logic that has already been applied.
func IsValidResolvedConfiguration ¶
func IsValidResolvedConfiguration(config *api.ReleaseBuildConfiguration, mergedConfig bool) error
IsValidResolvedConfiguration behaves as ValidateAtRuntime and also validates that all test steps are fully resolved.
func IsValidRuntimeConfiguration ¶
func IsValidRuntimeConfiguration(config *api.ReleaseBuildConfiguration) error
IsValidRuntimeConfiguration validates all the configuration's values without knowledge of config repo structure
func LinkForImage ¶
func LinkForImage(image string, config *api.ReleaseBuildConfiguration) api.StepLink
func NewConfigContext ¶
func NewConfigContext() *configContext
NewConfigContext creates a top-level, empty context.
func ValidateBaseImages ¶
func ValidateBaseImages(ctx *configContext, images map[string]api.ImageStreamTagReference) []error
func ValidateImages ¶
func ValidateImages(ctx *configContext, images []api.ProjectDirectoryImageBuildStepConfiguration) []error
func ValidateOperator ¶
func ValidateOperator(ctx *configContext, config *api.ReleaseBuildConfiguration) []error
func ValidateSecretInStep ¶
Types ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator holds data used across validations.
func NewValidator ¶
func NewValidator(profiles api.ClusterProfilesMap, clusterClaimOwners api.ClusterClaimOwnersMap) Validator
NewValidator creates an object that optimizes bulk validations.
func (*Validator) IsValidConfiguration ¶
func (v *Validator) IsValidConfiguration(config *api.ReleaseBuildConfiguration, org, repo string) error
IsValidConfiguration validates all the configuration's values.
func (*Validator) IsValidReference ¶
func (v *Validator) IsValidReference(step api.LiteralTestStep) []error
IsValidReference validates the contents of a registry reference. Checks that are context-dependent (whether all parameters are set in a parent component, the image references exist in the test configuration, etc.) are not performed.
func (*Validator) IsValidResolvedConfiguration ¶
func (v *Validator) IsValidResolvedConfiguration(config *api.ReleaseBuildConfiguration) error
IsValidResolvedConfiguration behaves as ValidateAtRuntime and also validates that all test steps are fully resolved.
func (*Validator) ValidateTestStepConfiguration ¶
func (v *Validator) ValidateTestStepConfiguration(ctx *configContext, config *api.ReleaseBuildConfiguration, resolved bool) []error