Commit Graph
14 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
Adrien Delorme 61480f41dc fix some go vet issues in tests ( composite literal uses unkeyed fields ) 2018-08-31 11:54:12 +02:00
Matthew Hooker b07a0cd6f0 fix tests
always sort telemetry options
2017-11-14 16:39:03 -08:00
localghost 5866d4ea24 Move container user inspect to StepConnectDocker. 2017-10-10 22:45:47 +02:00
localghost ba72021274 Fix owner of files uploaded to docker container run as non-root. 2017-10-03 21:49:26 +02:00
Megan Marsh a2f7a65e35 fix communicator tests 2017-07-14 13:58:28 -07:00
Matthew Hooker 81522dced0 move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker 230079f73a spell fixes 2017-03-28 20:36:19 -07:00
Chris Bednarski 5eddaa77bf Corrected sprintf formatting in error messages 2015-10-08 17:43:54 -07:00
Chris Bednarski cc153aa71f Added a test to verify byte size for larger files downloaded from docker 2015-10-08 17:15:27 -07:00
Chris Bednarski 8ff5c07d0c Add a new packer template for testing large file downloads 2015-10-08 16:37:14 -07:00
Chris Bednarski 5ad4b0e97e Added tests and handle the tar format from docker cp - 2015-08-12 12:16:26 -07:00
Chris Bednarski 62c5e8358d Added a test for docker upload and download 2015-08-12 11:36:56 -07:00
Mitchell Hashimoto 797c44bfc1 builder/docker: a non-working communicator 2013-11-08 23:43:41 -08:00