Commit Graph

668 Commits

Author SHA1 Message Date
Ash Berlin 242ed49ecb Use bufio.Scanner in BasicUi.Ask so we can read whole lines
The previous version used fmt.Fscanln which sounds like it should scan
for a whole line, but it actually errors if there is more than a single
word/token given. You can see this here https://play.golang.org/p/1RYXdtPSbk

And looking at the only usage of this function in core it won't break
anything to change it to actually return whole lines instead.

    line, err := ui.Ask("[c] Clean up and exit, [a] abort without cleanup, or [r] retry step (build may fail even if retry succeeds)?")

Closes #4474
2017-01-29 14:10:14 +00:00
Matthew Hooker f1175c1921
parallels/vmware: don't wait for shutdown command.
Resolves #4134

replaces/ closes #4379

Leaving Hyper-V builder alone for now until we can get a case that reproduces.
2017-01-20 01:44:18 -08:00
Rickard von Essen f6c611da5b Merge pull request #3940 from bhcleek/fix-fastpath
allow ssh communicator's Upload fastpath to execute
2016-11-05 19:58:33 +01:00
Matthew Hooker d920b3fbf4 run gofmt 2016-11-01 14:08:04 -07:00
Matthew Hooker 892d5e82c9 expect_disconnect option
provisioner/shell: Adds option to fail if the remote server disconnects
us.
2016-10-21 11:39:03 -07:00
Billie H. Cleek b4f6d40001 allow ssh communicator's Upload fastpath to execute
Add os.FileInfo implementation to packer/rpc, and use it to pass
Upload's *os.FileInfo argument through the RPC boundary.
2016-09-28 23:22:04 -07:00
Orivej Desh 389603cc0f Allow upper case input to -on-error=ask 2016-09-16 12:15:00 +00:00
Orivej Desh 6762965696 Add -on-error command line argument to allow preserving artifacts on builder errors
Resolves #409
2016-09-16 12:15:00 +00:00
Vasiliy Tolstov feee19e4ed file provisioner improvements
* allow specify source/destination as dir
* allow specify many files as source

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2016-02-12 11:48:28 -08:00
Mark Peek bc0f438db0 Use alternate temp directories for docker
The temporary directories will be created under the packer config
directory. Setting PACKER_TMP_DIR will override this path.
2015-10-20 11:34:14 -07:00
Mark Peek 38c81cf3e3 Move ConfigFile() and ConfigDir() from package main to packer 2015-10-16 17:32:36 -07:00
Chris Bednarski a4eba1102b Switch bool chan to struct chan for less memory usage 2015-10-12 22:04:13 -07:00
Chris Bednarski 4856544027 Add a comment to indicate why we're waiting on the channel 2015-10-12 18:42:17 -07:00
Chris Bednarski b51cd5406a Add explicit wait after Communicator.Download to make sure serveSingleCopy completes 2015-10-12 18:12:22 -07:00
Chris Bednarski 74d604e5a8 Switch from hashicorp/go-msgpack to the original upstream ugorgi/go to fix a slew of race conditions 2015-10-12 13:50:24 -07:00
Mark Peek e5a713ff01 Alternative fix for #2641: make random script name actually random 2015-10-11 13:31:09 -07:00
Chris Bednarski abb67fdd79 Fix govet issues 2015-08-05 19:41:29 -07:00
Chris Bednarski b3eacc5c2b Updated test to verify expected behavior 2015-07-13 19:32:28 -07:00
Mitchell Hashimoto 2498ad02c8 packer: validate minimum version [GH-2310] 2015-06-29 11:49:45 -07:00
Mitchell Hashimoto 2d13db300c packer: HookProvision errors if no communicator 2015-06-15 10:26:46 -07:00
Mitchell Hashimoto 472b060394 packer: build_name and build_type work + tests 2015-06-13 16:51:39 -04:00
Chris Bednarski 408250ec76 Wrap output in if statement to catch zero values from select 2015-06-03 17:13:26 -07:00
Mitchell Hashimoto 1b775cca2e packer: core interpolates Push 2015-05-29 15:41:52 -07:00
Mitchell Hashimoto 579264bb5b command/push: interpolate 2015-05-29 15:35:55 -07:00
Mitchell Hashimoto 048c764e05 packer: fix failing tests 2015-05-29 14:34:45 -07:00
Mitchell Hashimoto 4620f33dd0 packer: test fixture 2015-05-29 14:29:40 -07:00
Mitchell Hashimoto 639e63fd7c packer: test for template path 2015-05-29 14:29:32 -07:00
Mitchell Hashimoto f259e7352a packer/plugin: fix crash case, nil function call [GH-2098] 2015-05-29 11:30:56 -07:00
Mitchell Hashimoto da694a6ea8 packer: try to fix flaky test 2015-05-28 15:13:10 -07:00
Mitchell Hashimoto 590997df44 packer: automatically validate when creating a core 2015-05-28 14:43:15 -07:00
Mitchell Hashimoto e0a9215e47 packer: test for environment variables interpolation 2015-05-28 14:40:45 -07:00
Mitchell Hashimoto 8367c0bdce Merge pull request #2025 from ceh/skip-color-test
packer: skip colored ui test if ui doesn't support colors
2015-05-27 20:21:17 -07:00
Mitchell Hashimoto 1ee2b014a6 packer: remove Ui/Cache from CoreConfig 2015-05-27 20:09:52 -07:00
Mitchell Hashimoto 1d3a4d6aa2 packer: remove ConfigTemplate 2015-05-27 17:56:45 -07:00
Mitchell Hashimoto 53e77eacea packer: overrides work 2015-05-26 09:46:04 -07:00
Mitchell Hashimoto 99a93009ed packer: remove Template 2015-05-26 09:38:24 -07:00
Mitchell Hashimoto 26c7ac2d90 packer: post-processors 2015-05-26 09:28:59 -07:00
Mitchell Hashimoto 85e615bbe2 packer: a lot more provisioner tests 2015-05-26 09:16:39 -07:00
Mitchell Hashimoto b25ae21e13 packer: run provisioners 2015-05-26 09:14:29 -07:00
Mitchell Hashimoto c12072ecad packer: tests around interpolated names 2015-05-25 18:15:07 -07:00
Mitchell Hashimoto 547d9e759e packer: test Build 2015-05-25 17:58:59 -07:00
Mitchell Hashimoto dc74ec5612 packer: remove Environment 2015-05-25 17:29:10 -07:00
Mitchell Hashimoto 3ebfe06ec8 packer: render build names 2015-05-23 16:12:32 -07:00
Mitchell Hashimoto d74dacc4c0 packer: Core.Build 2015-05-23 15:08:50 -07:00
Mitchell Hashimoto ded13a8b10 packer: Core, and template validate 2015-05-23 14:48:07 -07:00
Emil Hessman bd425db546 packer: skip colored ui test if ui doesn't support colors
Fixes test failure on Windows.
2015-04-07 20:33:58 +02:00
Emil Hessman d9abb5458b packer: fix formatting directives in test
Fixes the following vet reports:

packer/template_test.go:496: possible formatting directive in Fatal call
packer/template_test.go:528: possible formatting directive in Fatal call
2015-02-25 05:43:18 +01:00
Seth Vargo 5d37c58457 Store the RawContents of the template on the template object
This allows children to get the raw templates without re-reading the
file.
2015-02-04 13:30:40 -05:00
Mitchell Hashimoto 73c5192b35 command/push: add base_dir setting 2014-12-09 16:14:04 -08:00
Mitchell Hashimoto c1fbc473a2 command/push: propagate token properly 2014-12-09 16:14:04 -08:00