From 115cb5080f313e9fb0313e0f499b9234e6696eda Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Wed, 14 Sep 2016 01:11:36 +0000 Subject: [PATCH] Document NewRunner --- common/multistep_runner.go | 8 +++++++- website/source/docs/command-line/build.html.md | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/common/multistep_runner.go b/common/multistep_runner.go index 7dda2bbd0..1b8a6d9cd 100644 --- a/common/multistep_runner.go +++ b/common/multistep_runner.go @@ -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 { diff --git a/website/source/docs/command-line/build.html.md b/website/source/docs/command-line/build.html.md index 9ee339bc8..6939173e7 100644 --- a/website/source/docs/command-line/build.html.md +++ b/website/source/docs/command-line/build.html.md @@ -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).