Commit Graph

840 Commits

Author SHA1 Message Date
Adrien Delorme 611610c89d BasicProgresssBar: protect add with a lock
to avoid weird race conditions.
2018-10-02 16:57:16 +02:00
Ashley Lowde 2884f6fab6 improve formatting and documentation for PR#6784 2018-10-02 20:00:45 +09:30
Ashley Lowde 12496e3702 add optional timestamps to build log 2018-09-29 22:39:24 +09:30
Megan Marsh 3f8407d95f Revert "Merge pull request #6700 from hashicorp/multi_progressbar"
This reverts commit 5470c08345, reversing
changes made to c427486bca.
2018-09-20 13:14:17 -07:00
Adrien Delorme be27775a3c start the pool only once 2018-09-12 17:04:10 -07:00
Adrien Delorme dfeca9f0df split progressbars per object 2018-09-12 16:21:58 -07:00
Megan Marsh 77980a7b53 fix progress bar mutex 2018-09-12 10:53:15 -07:00
Megan Marsh a0edaf6c46 Going to revert this change for now, becuase of potential issues that arise from calling Prepare() twice
Revert "use statebag instead of SetSharedState for winRM password"

This reverts commit b35acbd879.
2018-09-10 16:48:42 -07:00
Adrien Delorme 0ac7b64364 fix panic of the future using a mutex instead of some atomic calls + more docs 2018-09-06 18:12:15 +02:00
Adrien Delorme 8a851efcc8 progressbar: more godocs 2018-09-06 17:01:14 +02:00
Adrien Delorme bb59a70e8f progressbar: use int64 instead of uint64
* it's what's used for file sizes and used lib
2018-09-06 16:49:15 +02:00
Adrien Delorme f3c923c47d add tests for progress bar rpc calls 2018-09-06 16:15:09 +02:00
Adrien Delorme 6d3e36e6ea simplify remote progress bar as we are using a single instance 2018-09-06 16:14:59 +02:00
Adrien Delorme d89e1133c3 use freshly merged random.AlphaNum instead of our own random 2018-09-06 15:55:19 +02:00
Adrien Delorme 42561cf777 packer/rpc/ui_test.go: test progress bar too 2018-09-06 15:53:59 +02:00
Adrien Delorme 7efe3cac3d todos 2018-09-06 15:53:59 +02:00
Adrien Delorme 408578507f also prefix bar with number of items processing 2018-09-06 15:53:59 +02:00
Adrien Delorme 541c68aed5 add StackableProgressBar struct that will refresh/show dl status for multiple files
* simplified the downloader interface, and removed the total/current values from them
* downloaders use a proxy reader that will add all read bytes to progress
* removed unused const mtu
* DownloadClient doesn't need a downloader, so I removed it too
2018-09-06 15:53:59 +02:00
Adrien Delorme 9b07d7670e use no ops for ansible ui & MachineReadableUi 2018-09-06 15:53:59 +02:00
Adrien Delorme fd7cb47adc use proxy reader for download progress & stop storing total/current in downloaders 2018-09-06 15:53:59 +02:00
Adrien Delorme ddd96c513b first draft at self refreshing loading bar centralized/controlled by Ui 2018-09-06 15:53:59 +02:00
Megan Marsh 8fbce8c40c
Merge pull request #6357 from ladar/master
Added a 'split' function to parse template variables.
2018-08-24 15:18:36 -07:00
Megan Marsh b35acbd879 use statebag instead of SetSharedState for winRM password 2018-08-24 13:51:16 -07:00
Megan Marsh 8a6441a7a5 add tests for SensitiveVars 2018-08-21 10:28:22 -07:00
Megan Marsh ff6a039d5b replace scrubconfig with packer.LogSecretFilter.Set
filter winrm password from logs
Add new root-level packer template option, sensitive-variables, to tell us what user variables to mark sensitive.
2018-08-20 15:35:55 -07:00
Matthew Hooker 31fcfe4bc2 PoC for filtering logs 2018-08-20 15:20:21 -07:00
Patrick Double d796edc783 Add to vagrant post-processor support for Azure 2018-08-08 10:04:28 -05:00
Ladar Levison 8fee49ab9f Added a 'split' function to parse template variables. 2018-06-08 00:41:57 -05:00
Megan Marsh 91aa5f8bbb resolve conflicts; fix to work with hookedprovisioner which has been added since PR was made 2018-06-07 15:53:18 -07:00
Marc Carmier a5f802ec01 Add unit tests for DebuggedProvisionner 2018-06-07 14:09:26 -07:00
Marc Carmier 93f5bbbf45 Add waiting for key between provisioner 2018-06-07 14:09:26 -07:00
Josh Soref c5482b3e7e spelling: warnings 2018-03-14 03:29:50 +00:00
Josh Soref c49c40ac41 spelling: targeted 2018-03-14 03:24:39 +00:00
Josh Soref 5dd9be653a spelling: should 2018-03-14 03:22:32 +00:00
Josh Soref d3dc5ba6d3 spelling: provisioner 2018-03-14 02:15:21 +00:00
Josh Soref 785b42368d spelling: easily 2018-03-13 07:40:52 +00:00
Josh Soref 8dfafa6a5e spelling: dispatchable 2018-03-13 07:38:01 +00:00
Matthew Hooker 1418a42bf5
Remove telemetry error reporting message.
This seems to cause some confusion, and it's not needed anyway
2018-02-20 10:54:20 -08:00
SwampDragons 997f8e4a2a
Merge pull request #5318 from hashicorp/sigtermcleanup
Gracefully clean up on SIGTERM
2018-02-02 11:56:56 -08:00
Matthew Hooker ebe995c0ff
run goimports 2018-01-22 17:21:10 -08:00
Matthew Hooker c28a50af16
try to fix transient test failure 2017-11-30 16:30:37 -08:00
Matthew Hooker b07a0cd6f0
fix tests
always sort telemetry options
2017-11-14 16:39:03 -08:00
Matthew Hooker 49c20e3b1c
bump telemetry timeout to 2s 2017-11-14 16:30:44 -08:00
Matthew Hooker a5197840df
add config key reporting 2017-11-14 16:30:44 -08:00
Matthew Hooker 3e3768ec3e
fix tests 2017-11-14 16:30:43 -08:00
Matthew Hooker 46f41d1f12
WIP: add options to telemetry 2017-11-14 16:30:43 -08:00
Matthew Hooker afd394e0bd
only output telemetry logs when enabled. 2017-10-05 14:31:24 -07:00
Matthew Hooker fdaf4ed8d3
Gracefully clean up on SIGTERM 2017-09-08 11:42:32 -07:00
Matthew Hooker 68287566b8 Merge pull request #5167 from hashicorp/fix5147
preserve left-side whitespace in output
2017-08-28 14:22:34 -07:00
Sean Chittenden cd84b17923
Fix building packer on GOOS=solaris
Update to golang/x/sys/unix is coming in the subsequent commit.
2017-08-14 10:34:06 -07:00
Megan Marsh d733be711a Merge pull request #5238 from hashicorp/fix5237
do not wait for rpc upload command to return
2017-08-11 09:33:35 -07:00
Matthew Hooker 2d3b639c7b
don't need a waitgroup for uploading files 2017-08-10 17:02:23 -07:00
Matthew Hooker b05643cd47
increase telemetry report timeout 2017-08-10 16:57:20 -07:00
Luke Farnell d9a5b69403 clean up ineffectual assignments 2017-08-07 13:20:01 -04:00
Matthew Hooker 6d997d82e0
preserve left-side whitespace in output 2017-07-24 14:24:28 -07:00
Megan Marsh 07decf99ad quick patch to make ansible work again 2017-07-19 10:28:13 -07:00
Megan Marsh b2d5fcd48a move wait earlier 2017-07-05 12:27:59 -07:00
Megan Marsh 9ee97aaa2a while I'm at it, kill this race condition in uploads, too 2017-07-03 13:30:11 -07:00
Megan Marsh d8637751a3 rpc/communicator fix race condition that causes stdout from ssh provisioner to be truncated 2017-07-03 12:19:13 -07:00
Matthew Hooker 5e3a119069
increase telemetry timeout 2017-06-26 10:36:37 -07:00
Matthew Hooker 8681ea6026
report panic comment and shorter timeout 2017-06-21 15:56:29 -07:00
Matthew Hooker 5da9b3de61
Telemetry logging changes 2017-06-21 15:22:49 -07:00
Matthew Hooker beb338b78b
remove unneeded logs 2017-06-19 13:08:53 -07:00
Matthew Hooker f534b85ee9
get chris's nits. 2017-06-16 17:23:41 -07:00
Matthew Hooker 2d581dfc7b
fix tests. 2017-06-15 14:08:17 -07:00
Matthew Hooker 35332e4498
fix panic with deadlines. update panicwrap dep 2017-06-15 13:23:05 -07:00
Matthew Hooker 7382382727
Add telemetry reporting through checkpoint
Will report builders/provisioner/post-processor types used per build,
and whether or not the build passed.

Will also report any panics we see.

You may opt out of this reporting by setting the environment variable
`CHECKPOINT_DISABLE`.
2017-06-15 13:21:11 -07:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker 048e316645
s/TargettedUi/TargetedUI/ 2017-03-29 12:44:42 -07:00
Matthew Hooker 79287d7e47
simplify some code 2017-03-28 20:36:20 -07:00
Matthew Hooker d1b20b3d9c
remove a bunch of dead code.
https://github.com/dominikh/go-tools/tree/master/cmd/unused
2017-03-28 20:36:20 -07:00
Matthew Hooker 230079f73a
spell fixes 2017-03-28 20:36:19 -07:00
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
Mitchell Hashimoto 6bd8c6ca79 command/push: support custom endpoints 2014-12-09 16:14:03 -08:00
Mitchell Hashimoto fbc1551048 command/push: partially implemented, tests 2014-12-09 16:14:03 -08:00
Mitchell Hashimoto 835cadeee2 packer: push configuration 2014-12-09 16:14:03 -08:00
Seth Vargo 347f02a7f2 Merge pull request #1402 from jasonberanek/858-issue
fix build name ConfigTemplate processing [GH-858]
2014-11-26 16:30:36 -05:00
Mitchell Hashimoto 26bc806251 Merge branch '0-8-0' 2014-10-28 10:38:52 -07:00
Mitchell Hashimoto 4c7538dad8 v0.7.2 2014-10-28 09:45:13 -07:00
Mitchell Hashimoto 0db6cd3533 Merge pull request #1330 from qur/qemu-vagrant
Qemu vagrant
2014-10-28 08:42:17 -07:00
Mitchell Hashimoto e422a45449 fmt 2014-10-28 08:35:21 -07:00
Mitchell Hashimoto 8dbe0f065c Remove version from "packer" package 2014-10-27 20:51:34 -07:00
Mitchell Hashimoto 779b6d1719 packer/rpc, packer/plugin: remove Command interfaces 2014-10-27 20:40:24 -07:00
Mitchell Hashimoto 3e1f4ae1d2 packer: remove Command 2014-10-27 20:37:11 -07:00
Ryan Uber f7018f2407 Switch to hashicorp/go-msgpack 2014-10-17 18:38:17 -07:00
Julian Phillips 90a57c411f Expand Artifact API to expose build state
In order that something consuming an artifact can have access to extra
builder specific data add the State method which allows the caller to
ask for arbitary values by name.
2014-09-22 11:15:47 +01:00
Julian Phillips ee6a118090 Configure MessagePack to be a bit more like gob
By default codec's MessagePack encode/decode will convert a string
into a []byte.  Tweak the settings so that string -> string and []byte
-> []byte.
2014-09-21 23:57:37 +01:00
Mitchell Hashimoto a22f70f61f v0.7.1 2014-09-10 16:09:43 -07:00
Mitchell Hashimoto 0bf293f193 Up version for dev 2014-09-08 19:36:11 -07:00
Mitchell Hashimoto 3006be4376 v0.7.0 2014-09-08 15:57:24 -07:00
Mitchell Hashimoto 9c93c9e874 packer: check for latest version 2014-09-08 15:25:50 -07:00
Mitchell Hashimoto 75395af12d Merge branch '1064-fix-upload-file-permissions' of github.com:rasa/packer into rasa-1064-fix-upload-file-permissions
Conflicts:
	builder/parallels/common/step_upload_parallels_tools.go
	builder/vmware/common/step_upload_tools.go
	provisioner/chef-client/provisioner.go
	provisioner/chef-solo/provisioner.go
2014-09-08 13:20:46 -07:00
Mitchell Hashimoto 812ba35479 fmt 2014-09-08 10:28:21 -07:00
Mitchell Hashimoto 2e5f3da5c1 builder/amazon: fix {{uuid}} default not being replaced 2014-09-05 16:38:05 -07:00
Mitchell Hashimoto 9a0f92c5ad Merge branch 'template-timefmt' of github.com:njones/packer into njones-template-timefmt
Conflicts:
	packer/config_template.go
	website/source/docs/templates/configuration-templates.html.markdown
2014-09-05 16:21:30 -07:00
Mitchell Hashimoto f03d57f966 Merge pull request #1124 from njones/template-uplow
common: Fixes #1114, Adds upper and lower as filters for the template engine.
2014-09-05 16:16:55 -07:00
Mitchell Hashimoto 847cb02eb3 packer: fuzzy search broken pipe too [GH-1314] 2014-09-03 21:31:34 -07:00
Mitchell Hashimoto ad51098a3e packer/rpc: don't panic on cache errors [GH-1328] 2014-09-03 21:17:53 -07:00
Mitchell Hashimoto e9c2628a77 packer/plugin: clean up log output by only using the base 2014-09-03 21:11:43 -07:00
Mitchell Hashimoto b7c604795e packer/plugin: increase version for Yamux 2014-09-02 14:28:21 -07:00
Mitchell Hashimoto 9ffa0b8e25 packer/rpc: no more muxconn 2014-09-02 14:23:06 -07:00