shell_local

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: MPL-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToLinuxPath

func ConvertToLinuxPath(winAbsPath string) (string, error)

C:/path/to/your/file becomes /mnt/c/path/to/your/file

func Decode

func Decode(config *Config, raws ...interface{}) error

func Run

func Run(ctx context.Context, ui packer.Ui, config *Config) (bool, error)

func Validate

func Validate(config *Config) error

Types

type Communicator

type Communicator struct {
	ExecuteCommand []string
}

func (*Communicator) Download

func (c *Communicator) Download(string, io.Writer) error

func (*Communicator) DownloadDir

func (c *Communicator) DownloadDir(string, string, []string) error

func (*Communicator) Start

func (c *Communicator) Start(ctx context.Context, cmd *packer.RemoteCmd) error

func (*Communicator) Upload

func (c *Communicator) Upload(string, io.Reader, *os.FileInfo) error

func (*Communicator) UploadDir

func (c *Communicator) UploadDir(string, string, []string) error

type Config

type Config struct {
	common.PackerConfig `mapstructure:",squash"`

	// ** DEPRECATED: USE INLINE INSTEAD **
	// ** Only Present for backwards compatibility **
	// Command is the command to execute
	Command string

	// An inline script to execute. Multiple strings are all executed
	// in the context of a single shell.
	Inline []string

	// The shebang value used when running inline scripts.
	InlineShebang string `mapstructure:"inline_shebang"`

	// An array of multiple Runtime OSs to run on.
	OnlyOn []string `mapstructure:"only_on"`

	// The file extension to use for the file generated from the inline commands
	TempfileExtension string `mapstructure:"tempfile_extension"`

	// The local path of the shell script to upload and execute.
	Script string

	// An array of multiple scripts to run.
	Scripts []string

	// An array of environment variables that will be injected before
	// your command(s) are executed.
	Vars []string `mapstructure:"environment_vars"`

	EnvVarFormat string `mapstructure:"env_var_format"`

	// The command used to execute the script. The '{{ .Path }}' variable
	// should be used to specify where the script goes, {{ .Vars }}
	// can be used to inject the environment_vars into the environment.
	ExecuteCommand []string `mapstructure:"execute_command"`

	UseLinuxPathing bool `mapstructure:"use_linux_pathing"`

	Ctx interpolate.Context
}

type EnvVarsTemplate

type EnvVarsTemplate struct {
	WinRMPassword string
}

type ExecuteCommandTemplate

type ExecuteCommandTemplate struct {
	Vars          string
	Script        string
	Command       string
	WinRMPassword string
}

Jump to

Keyboard shortcuts

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