Commit Graph

32 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
Andrew Widdersheim a5b753820c
Fix build commands -except help message
The `-except` option needed some updates that were missed in 270f851e.
2019-03-05 10:54:35 -05:00
Josh Soref 66738ccaf4 Try to make help more consistent
Also try to synchronize the completion script
2018-10-10 21:34:35 -04:00
Adrien Delorme 626a3cc2a4 have -timestamp-ui match what's in doc
this was just an omission
also `=true` is not a necessary precision in this case

#6784
2018-10-03 14:40:13 +02:00
Ashley Lowde 2884f6fab6 improve formatting and documentation for PR#6784 2018-10-02 20:00:45 +09:30
Ashley Lowde 12496e3702 add optional timestamps to build log 2018-09-29 22:39:24 +09:30
Oleg Butuzov 079b317b62 Misaligned help entries
Descriptions for `build` subcommand aligned.
hashicorp/packer#6652
2018-09-01 10:32:23 +03:00
M. Marsh eb557af8bf
Merge branch 'master' into f-autocomplete 2018-04-26 11:18:37 -07:00
SwampDragons 997f8e4a2a
Merge pull request #5318 from hashicorp/sigtermcleanup
Gracefully clean up on SIGTERM
2018-02-02 11:56:56 -08:00
Matthew Hooker 807e88245b
trying to add context to state bag 2018-01-24 17:09:15 -08:00
Jeremy Voorhis bfc75eb9d9 Implement cli.CommandAutocomplete for most commands 2017-10-13 11:57:44 -07:00
Jeremy Voorhis a4cb8ae41b Define methods on *BuildCommand (consistency) 2017-10-13 11:57:44 -07:00
Matthew Hooker fdaf4ed8d3
Gracefully clean up on SIGTERM 2017-09-08 11:42:32 -07:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker 048e316645
s/TargettedUi/TargetedUI/ 2017-03-29 12:44:42 -07:00
Matthew Hooker 230079f73a
spell fixes 2017-03-28 20:36:19 -07:00
Matthew Hooker 11354aa1b7
tidy up new line 2017-02-09 17:45:42 -08:00
Matthew Hooker 60955d8c2c
don't show ui color if we're not colorized 2017-02-09 17:41:42 -08:00
Jake Champlin 95760462a6
Update help output for build command
The `-only` flag has been around for some time now, and is documented on
our packer website, yet the help output for `packer build` lacks this
command line option.
2016-11-14 10:06:43 -05:00
Orivej Desh 4fe86244a5 Improve -on-error descriptions 2016-09-18 03:00:36 +00:00
Orivej Desh 639bf356aa Fail on unknown values of -on-error 2016-09-17 14:42:21 +00:00
Orivej Desh e9cc28565b Document -on-error on the "packer build" page 2016-09-16 12:15:00 +00: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
Christopher Boumenot ad3d674919 Do not use Fprintf, use Fprint. 2016-04-05 22:41:26 -07:00
Alvaro Miranda 6237df566f add -color to build -h command 2016-03-23 04:40:24 +13:00
Mark Peek 71ed8e4a38 Fix #2742: Include template line numbers on error 2015-10-25 12:28:06 -07:00
Mark Peek af055ad3e0 Synchronize access to artifact map to remove race 2015-10-14 08:25:13 -07:00
Zach Zolton 548f2ced1c Fix `packer build` reading from STDIN
Signed-off-by: Jesse Szwedko <jesse.szwedko@getbraintree.com>
2015-06-30 17:56:14 +00:00
Mitchell Hashimoto 793698f8a7 command/build: skip nil builds [GH-2163] 2015-06-04 16:25:14 +02:00
Mitchell Hashimoto 1ee2b014a6 packer: remove Ui/Cache from CoreConfig 2015-05-27 20:09:52 -07:00
Mitchell Hashimoto 9d89ca8e07 command: build should be converted to new API, compiles 2015-05-23 16:30:45 -07:00
Mitchell Hashimoto 96b0ec5395 Start putting commands in command/, modify core 2014-10-27 20:21:13 -07:00