Document NewRunner
This commit is contained in:
parent
e9cc28565b
commit
115cb5080f
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/mitchellh/packer/packer"
|
||||
)
|
||||
|
||||
func newRunner(steps []multistep.Step, config PackerConfig, ui packer.Ui) (multistep.Runner, interface{}) {
|
||||
func newRunner(steps []multistep.Step, config PackerConfig, ui packer.Ui) (multistep.Runner, multistep.DebugPauseFn) {
|
||||
switch config.PackerOnError {
|
||||
case "cleanup", "":
|
||||
case "abort":
|
||||
|
@ -34,11 +34,17 @@ func newRunner(steps []multistep.Step, config PackerConfig, ui packer.Ui) (multi
|
|||
}
|
||||
}
|
||||
|
||||
// NewRunner returns a multistep.Runner that runs steps augmented with support
|
||||
// for -debug and -on-error command line arguments.
|
||||
func NewRunner(steps []multistep.Step, config PackerConfig, ui packer.Ui) multistep.Runner {
|
||||
runner, _ := newRunner(steps, config, ui)
|
||||
return runner
|
||||
}
|
||||
|
||||
// NewRunnerWithPauseFn returns a multistep.Runner that runs steps augmented
|
||||
// with support for -debug and -on-error command line arguments. With -debug it
|
||||
// puts the multistep.DebugPauseFn that will pause execution between steps into
|
||||
// the state under the key "pauseFn".
|
||||
func NewRunnerWithPauseFn(steps []multistep.Step, config PackerConfig, ui packer.Ui, state multistep.StateBag) multistep.Runner {
|
||||
runner, pauseFn := newRunner(steps, config, ui)
|
||||
if pauseFn != nil {
|
||||
|
|
|
@ -47,3 +47,6 @@ artifacts that are created will be outputted at the end of the build.
|
|||
comma-separated names. Build names by default are the names of their
|
||||
builders, unless a specific `name` attribute is specified within
|
||||
the configuration.
|
||||
|
||||
- `-parallel=false` - Disable parallelization of multiple builders (on by
|
||||
default).
|
||||
|
|
Loading…
Reference in New Issue