Commit Graph

8 Commits

Author SHA1 Message Date
Adrien Delorme 82c4b76639 [Builder|Build|PostProcessor|Provisioner|Hook]Server: context cancel using a RPC cancel method 2019-04-03 15:55:55 +02:00
Adrien Delorme 829851fc8a change hooks to be passed a context for cancellation
we have to as it is what calls our provisioners
2019-04-03 15:55:54 +02:00
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
Mitchell Hashimoto 2d13db300c packer: HookProvision errors if no communicator 2015-06-15 10:26:46 -07:00
Mitchell Hashimoto b25ae21e13 packer: run provisioners 2015-05-26 09:14:29 -07:00
Mitchell Hashimoto 230cc9738e packer/rpc: use packer.MockBuilder for tests 2013-11-02 22:47:23 -05:00
Mitchell Hashimoto 336051e316 packer: builder prepare can return warnings 2013-11-02 22:31:12 -05:00
Mitchell Hashimoto 6d9265a244 packer: add mock implementations and more template tests 2013-08-22 11:32:59 -07:00