Documentation ¶
Overview ¶
Package packer allows to interact with Packer.
Index ¶
- func BuildAmi(t testing.TestingT, options *Options) stringdeprecated
- func BuildAmiE(t testing.TestingT, options *Options) (string, error)deprecated
- func BuildArtifact(t testing.TestingT, options *Options) string
- func BuildArtifactE(t testing.TestingT, options *Options) (string, error)
- func BuildArtifacts(t testing.TestingT, artifactNameToOptions map[string]*Options) map[string]string
- func BuildArtifactsE(t testing.TestingT, artifactNameToOptions map[string]*Options) (map[string]string, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildArtifact ¶ added in v0.10.0
BuildArtifact builds the given Packer template and return the generated Artifact ID.
func BuildArtifactE ¶ added in v0.10.0
BuildArtifactE builds the given Packer template and return the generated Artifact ID.
func BuildArtifacts ¶ added in v0.13.9
func BuildArtifacts(t testing.TestingT, artifactNameToOptions map[string]*Options) map[string]string
BuildArtifacts can take a map of identifierName <-> Options and then parallelize the packer builds. Once all the packer builds have completed a map of identifierName <-> generated identifier is returned. The identifierName can be anything you want, it is only used so that you can know which generated artifact is which.
func BuildArtifactsE ¶ added in v0.13.9
func BuildArtifactsE(t testing.TestingT, artifactNameToOptions map[string]*Options) (map[string]string, error)
BuildArtifactsE can take a map of identifierName <-> Options and then parallelize the packer builds. Once all the packer builds have completed a map of identifierName <-> generated identifier is returned. If any artifact fails to build, the errors are accumulated and returned as a MultiError. The identifierName can be anything you want, it is only used so that you can know which generated artifact is which.
Types ¶
type Options ¶
type Options struct { Template string // The path to the Packer template Vars map[string]string // The custom vars to pass when running the build command VarFiles []string // Var file paths to pass Packer using -var-file option Only string // If specified, only run the build of this name Env map[string]string // Custom environment variables to set when running Packer RetryableErrors map[string]string // If packer build fails with one of these (transient) errors, retry. The keys are a regexp to match against the error and the message is what to display to a user if that error is matched. MaxRetries int // Maximum number of times to retry errors matching RetryableErrors TimeBetweenRetries time.Duration // The amount of time to wait between retries WorkingDir string // The directory to run packer in }
Options are the options for Packer.