Commit Graph

30 Commits

Author SHA1 Message Date
Megan Marsh eb8c74bf85 allow ssh_host config option to override host logic for all builders 2019-07-02 13:56:28 -07:00
Adrien Delorme a81abd297b Merge remote-tracking branch 'origin/master' into context_provisioner 2019-04-08 20:09:01 +02:00
Adrien Delorme a4bf94dd3c change Builder to be passed a context for cancellation
we have to to give it to our hook
2019-04-03 15:55:55 +02:00
Megan Marsh 8f3313d81e Create new docker communicator for windows containers 2019-03-27 15:25:32 -07: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
Megan Marsh 38cc525ec7 new option allowing user to clean up the ephemeral ssh key from the authorized_keys file 2018-09-14 11:06:38 -07:00
Adrien Delorme 41f6e0334d refactor all copy pasted sshConfig with into communicator.Config.SSHConfigFunc
* still need to append the auth methods into an array for gracefullness
2018-08-22 17:02:23 +02:00
Matthew Hooker 366dc3da0a
move multistep imports to helper.
gomvpkg -from "github.com/mitchellh/multistep" -to "github.com/hashicorp/packer/helper/multistep"
2018-01-24 17:09:15 -08:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07: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
Chris Bednarski 5503b7f496 Don't export errors 2015-08-19 13:12:16 -07:00
Chris Bednarski 750a9c61de Added discard option for docker builder, also reorganized some error messages 2015-08-18 14:38:32 -07:00
Mitchell Hashimoto cab2665119 builder/docker: support custom communicators 2015-06-14 22:09:38 -07:00
Mitchell Hashimoto ce275969e4 builder/docker: don't attempt to read artifact if cancelled 2015-05-29 09:37:27 -07:00
Mitchell Hashimoto 6570b53c4a builder/docker: use exec for v1.4+ 2015-05-29 09:29:59 -07:00
Mitchell Hashimoto 4cae87645f builder/docker: fix issue where docker might get nil interp context 2015-05-27 13:03:47 -07:00
Mitchell Hashimoto faf327eed0 builder/docker: convert to new interpolation 2015-05-27 12:55:36 -07:00
Mitchell Hashimoto 5cb7355814 builder/docker: change commit to the opt-in, special case build steps
/cc @andytson - Wanted to CC you in here so you could see some changes I
made.

First, I changed commit to opt-in, so you set "commit": true to get
commit behavior. This simplifies the logic a bit. Then, I removed the
skipping for StepExport and StepCommit and put that into the Builder
itself. This simplifies those steps (limits abstraction leakage).
Otherwise, everything looks great!
2014-09-04 18:03:15 -07:00
Andy Thompson 1baa63f060 Add a docker commit step to the docker builder that runs instead of export if export_path not present 2014-07-21 20:42:23 +01:00
Mitchell Hashimoto 037a744be5 builder/docker: customize run command [GH-648] 2013-12-27 10:17:45 -07:00
Mitchell Hashimoto 832b4408a5 builder/docker: verify docker is available on path 2013-11-09 21:26:05 -08:00
Mitchell Hashimoto 0287cdd614 builder/docker: config refactor 2013-11-09 17:07:14 -08:00
Mitchell Hashimoto 06b6cb1af1 builder/docker: artifact 2013-11-09 13:22:13 -08:00
Mitchell Hashimoto 62b81dc432 builder/docker: StepPull test, driver abstraction for tests 2013-11-09 12:12:23 -08:00
Mitchell Hashimoto da683afde0 builder/docker: config validation test 2013-11-09 11:47:32 -08:00
Mitchell Hashimoto d5ce8ddb4a builder/docker: export the final image 2013-11-09 09:48:36 -08:00
Mitchell Hashimoto 797c44bfc1 builder/docker: a non-working communicator 2013-11-08 23:43:41 -08:00
Mitchell Hashimoto 2e080ece6d builder/docker: start a container 2013-11-08 22:17:46 -08:00
Mitchell Hashimoto 034e04cc1e builder/docker: pull images 2013-11-08 22:00:57 -08:00
Mitchell Hashimoto 3feab1dea1 builder/docker: boilerplate 2013-11-08 16:55:02 -08:00