validate

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2017 License: Apache-2.0 Imports: 8 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 = "-"

	// MaxImageLength is the max length of image value. Used in other packages.
	MaxImageLength = 1000
)

Variables

This section is empty.

Functions

func CheckBuild

func CheckBuild(b *cb.Build) error

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

func CheckBuildSteps

func CheckBuildSteps(steps []*cb.BuildStep) error

CheckBuildSteps checks the number of steps, and their content.

func CheckImages

func CheckImages(images []string) error

CheckImages checks the number of images and image's length are under limits.

func CheckSubstitutionTemplate

func CheckSubstitutionTemplate(images []string, steps []*cb.BuildStep, substitutions map[string]string) ([]string, error)

CheckSubstitutionTemplate checks that all the substitution variables are used and all the variables found in the template are used too. It may returns an error and a list of string warnings.

func CheckSubstitutions

func CheckSubstitutions(substitutions map[string]string) error

CheckSubstitutions validates the substitutions map.

Types

This section is empty.

Jump to

Keyboard shortcuts

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