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
Josh Soref
c5482b3e7e
spelling: warnings
2018-03-14 03:29:50 +00:00
Josh Soref
8dfafa6a5e
spelling: dispatchable
2018-03-13 07:38:01 +00:00
Matthew Hooker
2d581dfc7b
fix tests.
2017-06-15 14:08:17 -07:00
Matthew Hooker
d920b3fbf4
run gofmt
2016-11-01 14:08:04 -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
Mitchell Hashimoto
2d13db300c
packer: HookProvision errors if no communicator
2015-06-15 10:26:46 -07:00
Mitchell Hashimoto
048c764e05
packer: fix failing tests
2015-05-29 14:34:45 -07:00
Mitchell Hashimoto
26c7ac2d90
packer: post-processors
2015-05-26 09:28:59 -07:00
Mitchell Hashimoto
6a3dd16a3a
packer: template now handles user var logic
2013-12-27 09:17:51 -07:00
Mitchell Hashimoto
336051e316
packer: builder prepare can return warnings
2013-11-02 22:31:12 -05:00
Mitchell Hashimoto
386d72c31a
packer: no more asserts lib
2013-10-16 21:09:27 -10:00
Mitchell Hashimoto
ac2a4807d4
packer: fix required var check to work properly
2013-08-31 17:36:43 -07:00
Mitchell Hashimoto
fd4b01cf85
packer: required user variables [GH-374]
2013-08-31 17:33:17 -07:00
Mitchell Hashimoto
47cd6df85b
packer: Add Cancel method to Provisioner
2013-08-30 23:21:15 -07:00
Mitchell Hashimoto
80e8e09ec7
packer: Add Cancel() method to hook
2013-08-30 17:03:55 -07:00
Mitchell Hashimoto
a329d7dd2f
packer: remove keep_input_artifact prior to sending to build [GH-310]
2013-08-19 16:00:25 -07:00
Mitchell Hashimoto
598f11f168
packer: properly override/send user variables to prepare
2013-08-09 15:57:08 -07:00
Mitchell Hashimoto
3f0a268e1e
packer, packer/rpc: Update Build interface to allow variable overrides
2013-08-09 15:57:07 -07:00
Mitchell Hashimoto
9387ba0fd4
packer: Make builder type available in configs [GH-154]
2013-07-15 09:58:32 +09:00
Jason A. Beranek
13c733a3db
Add support for -force flag on builds [GH-119]
2013-07-11 23:43:23 -05:00
Mitchell Hashimoto
44e0a7def5
packer: Send packerConfig into PostProcessors
2013-07-01 15:00:21 -07:00
Mitchell Hashimoto
807896d63b
packer: PostProcessor can take multiple configs
2013-07-01 14:59:23 -07:00
Mitchell Hashimoto
f78cbb45a6
packer: PostProcessor API change so they can keep artifacts [GH-55]
2013-07-01 11:30:39 -07:00
Mitchell Hashimoto
12f627197e
fmt
2013-07-01 11:07:25 -07:00
Mitchell Hashimoto
8f74ff170d
packer: Add BuildNameConfigKey to all configs which has the build name
2013-07-01 11:06:28 -07:00
Mitchell Hashimoto
bd6f176bf0
packer: Builds use their own UI [GH-21]
2013-06-27 21:55:59 -04:00
Mitchell Hashimoto
6799315081
packer: Improved logging around build runs
2013-06-18 23:05:02 -07:00
Mitchell Hashimoto
154c17163b
packer: keep_input_artifact will keep prior artifact in a PP
...
[GH-19]
2013-06-18 22:45:53 -07:00
Mitchell Hashimoto
e73c224764
packer: Build runs the post-processors
2013-06-18 10:54:29 -07:00
Mitchell Hashimoto
75fe58d5f7
packer: Post-processors are configured
2013-06-18 10:31:52 -07:00
Mitchell Hashimoto
57fef22429
packer: panic if Prepare called twice on build, lock
2013-06-18 09:37:49 -07:00
Mitchell Hashimoto
8217e64a8d
packer: Set DebugConfigKey to true if debug is on
2013-06-14 12:38:54 -07:00
Mitchell Hashimoto
9f5a247511
packer: Builders can take multiple configs
2013-06-14 12:27:50 -07:00
Mitchell Hashimoto
a35feebe70
packer: Build no longer takes Ui for Prepare
2013-06-13 10:08:31 -07:00
Mitchell Hashimoto
62309cb6de
Build/Builder take a Cache object now
2013-06-09 22:00:47 -07:00
Mitchell Hashimoto
d55bf3f3ec
packer: Support overrides in provisioners for each build
2013-06-07 10:35:26 -07:00
Mitchell Hashimoto
6b87c42ee6
packer: Change provisioner interface to take array of configs
2013-06-06 17:01:12 -07:00
Mitchell Hashimoto
94cfe39a76
packer: coreBuild.Cancel calls the builder Cancel method
2013-06-03 16:06:04 -07:00
Mitchell Hashimoto
1b78fc88a9
packer: coreBuild runs provisioners as part of Run
2013-05-23 21:26:24 -07:00
Mitchell Hashimoto
534f32067a
packer: Test that hooks are callable from builds
2013-05-22 16:46:23 -07:00
Mitchell Hashimoto
0f57370dec
packer: Prepare provisioners as part of Build prepare
2013-05-22 16:29:07 -07:00
Mitchell Hashimoto
cb91ca72ac
packer: Build.Prepare takes a UI
2013-05-22 16:20:40 -07:00
Mitchell Hashimoto
fbcc6cb2b2
packer: Build now has provisioners, template parses and builds
2013-05-22 16:15:57 -07:00
Mitchell Hashimoto
53c3d330e4
packer/rpc: Support Artifacts
2013-05-21 22:10:21 -07:00
Mitchell Hashimoto
441edd25d2
packer: Changes to build parameters and DispatchHook
2013-05-11 10:27:07 -07:00
Mitchell Hashimoto
44bd56c3a8
go fmt
2013-05-10 17:01:24 -07:00
Mitchell Hashimoto
9600bf5b4b
packer: Build.Name
2013-05-09 11:32:03 -07:00
Mitchell Hashimoto
587d359887
packer: Builder.Prepare can return an error
2013-05-09 10:54:42 -07:00
Mitchell Hashimoto
14c568a9d2
Get rid of BuilderFactory
2013-05-05 14:47:17 -07:00