validate

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package validate provides methods to validate a build.

Index

Constants

View Source
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

func CheckArtifacts(b *pb.Build) error

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

func CheckBuild(b *pb.Build) error

CheckBuild returns no error if build is valid, otherwise a descriptive canonical error.

func CheckBuildAfterSubstitutions added in v0.2.4

func CheckBuildAfterSubstitutions(b *pb.Build) error

CheckBuildAfterSubstitutions returns no error if build is valid, otherwise a descriptive canonical error.

func CheckBuildSteps

func CheckBuildSteps(steps []*pb.BuildStep, buildTimeout time.Duration) error

CheckBuildSteps checks the number of steps, and their content.

func CheckSubstitutionTemplate

func CheckSubstitutionTemplate(b *pb.Build) ([]string, error)

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

func CheckSubstitutions(substitutions map[string]string) error

CheckSubstitutions validates the substitutions map.

func CheckSubstitutionsLoose added in v0.2.8

func CheckSubstitutionsLoose(substitutions map[string]string) error

CheckSubstitutionsLoose validates the substitutions map, accepting some built-in substitutions overrides.

Types

This section is empty.

Jump to

Keyboard shortcuts

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