packer

package
v0.13.26 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package packer allows to interact with Packer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAmi deprecated

func BuildAmi(t *testing.T, options *Options) string

BuildAmi builds the given Packer template and return the generated AMI ID.

Deprecated: Use BuildArtifact instead.

func BuildAmiE deprecated

func BuildAmiE(t *testing.T, options *Options) (string, error)

BuildAmiE builds the given Packer template and return the generated AMI ID.

Deprecated: Use BuildArtifactE instead.

func BuildArtifact added in v0.10.0

func BuildArtifact(t *testing.T, options *Options) string

BuildArtifact builds the given Packer template and return the generated Artifact ID.

func BuildArtifactE added in v0.10.0

func BuildArtifactE(t *testing.T, options *Options) (string, error)

BuildArtifactE builds the given Packer template and return the generated Artifact ID.

func BuildArtifacts added in v0.13.9

func BuildArtifacts(t *testing.T, 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.T, 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
	Only     string            // If specified, only run the build of this name
	Env      map[string]string // Custom environment variables to set when running Packer
}

Options are the options for Packer.

Jump to

Keyboard shortcuts

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