Documentation ¶
Overview ¶
Package validate provides methods to validate a build.
Index ¶
- Constants
- func CheckArtifacts(b *pb.Build) error
- func CheckBuild(b *pb.Build) error
- func CheckBuildAfterSubstitutions(b *pb.Build) error
- func CheckBuildSteps(steps []*pb.BuildStep, buildTimeout time.Duration) error
- func CheckSubstitutionTemplate(b *pb.Build) ([]string, error)
- func CheckSubstitutions(substitutions map[string]string) error
- func CheckSubstitutionsLoose(substitutions map[string]string) error
Constants ¶
const ( // StartStep is a build step WaitFor dependency that is always satisfied. StartStep = "-" // MaxTimeout is the maximum allowable timeout for a build or build step. MaxTimeout = 24 * time.Hour // MaxImageLength is the max length of image value. Used in other packages. MaxImageLength = 1000 )
Variables ¶
This section is empty.
Functions ¶
func CheckArtifacts ¶ added in v0.2.8
CheckArtifacts checks the number of images, and images' length are under limits. Also copies top-level images to the .artifacts.images sub-field.
func CheckBuild ¶
CheckBuild returns no error if build is valid, otherwise a descriptive canonical error.
func CheckBuildAfterSubstitutions ¶ added in v0.2.4
CheckBuildAfterSubstitutions returns no error if build is valid, otherwise a descriptive canonical error.
func CheckBuildSteps ¶
CheckBuildSteps checks the number of steps, and their content.
func CheckSubstitutionTemplate ¶
CheckSubstitutionTemplate checks that all the substitution variables are used and all the variables found in the template are used too. It may return an error and a list of string warnings.
func CheckSubstitutions ¶
CheckSubstitutions validates the substitutions map.
func CheckSubstitutionsLoose ¶ added in v0.2.8
CheckSubstitutionsLoose validates the substitutions map, accepting some built-in substitutions overrides.
Types ¶
This section is empty.