Commit Graph

24 Commits

Author SHA1 Message Date
Adrien Delorme 9f82b75e57 Use the hashicorp/go-getter to download files
* removed packer.Cache and references since packer.Cache is never used except in the download step. The download step now uses the new func packer.CachePath(targetPath) for this, the behavior is the same.
* removed download code from packer that was reimplemented into the go-getter library: progress bar, http download restart, checksuming from file, skip already downloaded files, symlinking, make a download cancellable by context.
* on windows if packer is running without symlinking rights and we are getting a local file, the file will be copied instead to avoid errors.
* added unit tests for step_download that are now CI tested on windows, mac & linux.
* files are now downloaded under cache dir `sha1(filename + "?checksum=" + checksum) + file_extension`
* since the output dir is based on the source url and the checksum, when the checksum fails, the file is auto deleted.
* a download file is protected and locked by a file lock,
* updated docs
* updated go modules and vendors
2019-03-13 12:11:58 +01:00
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 dfeca9f0df split progressbars per object 2018-09-12 16:21:58 -07: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 42561cf777 packer/rpc/ui_test.go: test progress bar too 2018-09-06 15:53:59 +02:00
Mitchell Hashimoto 171781c3c6 packer/rpc: work-in-progress commit 2013-12-09 16:22:11 -08:00
Mitchell Hashimoto 50cfb67863 packer/rpc: muxconn is a lot more sane, acts like bsd socket 2013-12-09 14:24:55 -08:00
Mitchell Hashimoto a66f148ede packer/rpc: auto-incrementable ID for endpoints 2013-12-08 11:50:14 -08:00
Mitchell Hashimoto 19867b75a5 packer/rpc: don't depend on cgl 2013-10-16 17:04:57 -10:00
Mitchell Hashimoto 116cdc6c75 packer/rpc: ui.Machine works over RPC properly 2013-08-12 10:25:56 -07:00
Mitchell Hashimoto fb6d2754da packer: Add Machine func to Ui 2013-08-11 18:16:00 -07:00
Mitchell Hashimoto dc5d261994 packer: Ui can return an error for Ask, returns one for interrupt 2013-06-15 18:24:38 -07:00
Mitchell Hashimoto 21b6d2a435 builder/common: multistep debug fn gracefully exits during an interrupt 2013-06-14 15:47:06 -07:00
Mitchell Hashimoto e0f2bcf8a2 packer: Add "Ask" method to Ui to ask for input 2013-06-14 15:17:03 -07:00
Mitchell Hashimoto edab952a68 packer: Add Message method to Ui 2013-06-03 11:30:38 -07:00
Mitchell Hashimoto ace53450b9 packer: More efficient RemoteCommand.ExitChan 2013-06-01 17:57:26 -07:00
Mitchell Hashimoto 2788d29bd1 packer, packer/rpc: Update Ui to just take a message 2013-05-27 15:12:48 -07:00
Mitchell Hashimoto cc4970d424 packer/rpc: Allow "error" interfaces to be sent over RPC 2013-05-21 11:58:14 -07:00
Mitchell Hashimoto 44bd56c3a8 go fmt 2013-05-10 17:01:24 -07:00
Mitchell Hashimoto 95153413a6 packer: Ui has Error method 2013-05-08 15:12:48 -07:00
Mitchell Hashimoto b9e3eb1ff7 packer/rpc: Get rid of the heavy server stuff 2013-05-05 17:38:50 -07:00
Mitchell Hashimoto 01405c864b packer/rpc: Use the proper Server for tests 2013-05-04 19:59:42 -07:00
Mitchell Hashimoto 8dea720627 rpc.Ui 2013-05-03 15:49:15 -07:00