Megan Marsh
a82a3ccaa6
need to scrub sensitive variables first, to make sure we don't fail for comma-containing sensitive info
2019-08-15 16:16:11 -07:00
Adrien Delorme
c9a22b6380
Merge pull request #7745 from hashicorp/investigate_crash
...
small cleanups
2019-06-14 10:09:32 +02:00
Megan Marsh
88e5a21170
make sure machine readable logs print what's come through the UI into the logs
2019-06-13 10:51:44 -07:00
Megan Marsh
a907adb4ab
Merge pull request #7743 from hashicorp/fix_7728
...
filter machine readable UI
2019-06-12 13:00:26 -07:00
Megan Marsh
df977926ba
filter machine readable UI
2019-06-12 09:50:27 -07:00
Adrien Delorme
f097deab3b
Merge pull request #7739 from hashicorp/fix_7728
...
apply logSecretFilter to output from ui.Say
2019-06-12 11:01:25 +02:00
Megan Marsh
1e5866bd2a
apply logSecretFilter to output from ui.Say
2019-06-11 14:04:36 -07:00
Megan Marsh
b8ac1a800d
implement a packer console analogous to the terraform console
2019-06-05 16:35:22 -07:00
Megan Marsh
a358b174a4
make sure we filter the ui as well as the logs
2019-04-03 10:43:41 -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
Adrien Delorme
94d6fc10f5
init tty in main
2019-03-06 15:52:59 +01:00
Adrien Delorme
22df491c67
mock tty using interfaces to test more easily
2019-02-28 14:40:55 +01:00
Adrien Delorme
239a0c633f
use go-tty in ui.Ask to fix #7299
2019-02-27 16:59:59 +01:00
xinau
b449af84ee
moved concurrency-safe ui code to packer/ui.go
2019-02-13 21:01:50 +00: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
Megan Marsh
3f8407d95f
Revert "Merge pull request #6700 from hashicorp/multi_progressbar"
...
This reverts commit 5470c08345
, reversing
changes made to c427486bca
.
2018-09-20 13:14:17 -07:00
Adrien Delorme
dfeca9f0df
split progressbars per object
2018-09-12 16:21:58 -07:00
Adrien Delorme
541c68aed5
add StackableProgressBar struct that will refresh/show dl status for multiple files
...
* simplified the downloader interface, and removed the total/current values from them
* downloaders use a proxy reader that will add all read bytes to progress
* removed unused const mtu
* DownloadClient doesn't need a downloader, so I removed it too
2018-09-06 15:53:59 +02:00
Adrien Delorme
9b07d7670e
use no ops for ansible ui & MachineReadableUi
2018-09-06 15:53:59 +02:00
Adrien Delorme
ddd96c513b
first draft at self refreshing loading bar centralized/controlled by Ui
2018-09-06 15:53:59 +02:00
Matthew Hooker
fdaf4ed8d3
Gracefully clean up on SIGTERM
2017-09-08 11:42:32 -07:00
Matthew Hooker
048e316645
s/TargettedUi/TargetedUI/
2017-03-29 12:44:42 -07:00
Ash Berlin
242ed49ecb
Use bufio.Scanner in BasicUi.Ask so we can read whole lines
...
The previous version used fmt.Fscanln which sounds like it should scan
for a whole line, but it actually errors if there is more than a single
word/token given. You can see this here https://play.golang.org/p/1RYXdtPSbk
And looking at the only usage of this function in core it won't break
anything to change it to actually return whole lines instead.
line, err := ui.Ask("[c] Clean up and exit, [a] abort without cleanup, or [r] retry step (build may fail even if retry succeeds)?")
Closes #4474
2017-01-29 14:10:14 +00:00
Mitchell Hashimoto
847cb02eb3
packer: fuzzy search broken pipe too [GH-1314]
2014-09-03 21:31:34 -07:00
Mitchell Hashimoto
e2e4c9f671
packer: errors go to stderr [GH-868]
2014-02-21 18:29:15 -08:00
Mitchell Hashimoto
1c65536514
packer: closed pipe is caught [GH-875]
2014-02-21 17:43:45 -08:00
Mitchell Hashimoto
18f3588f35
packer: no colored output if machine-readable [GH-684]
2013-12-16 14:10:28 -08:00
Mitchell Hashimoto
c7d7e2cf0f
packer: don't change background color in UI
2013-11-19 21:31:54 -08:00
Mitchell Hashimoto
532b4d3647
packer: don't panic if can't write to UI
2013-10-23 20:32:20 -07:00
Mitchell Hashimoto
c77d26e46c
packer: replace \r with literal on Ui for MR
2013-08-11 23:19:13 -07:00
Mitchell Hashimoto
ba3344a322
packer: replace new lines with literal \n
2013-08-11 23:18:14 -07:00
Mitchell Hashimoto
7b4b5d23fc
packer: output a newline after each MR line
2013-08-11 23:14:42 -07:00
Mitchell Hashimoto
aa143a330b
packer: TargettedUi properly targets machine-readable data
2013-08-11 19:08:08 -07:00
Mitchell Hashimoto
89be12ae21
packer: Add MachineReadableUi
2013-08-11 19:05:07 -07:00
Mitchell Hashimoto
edc59499e7
packer: BasicUi doesn't do machine-readable, just log
2013-08-11 18:38:24 -07:00
Mitchell Hashimoto
03c10a9aa8
packer: renamed PrefixedUi to TargettedUi
2013-08-11 18:31:28 -07:00
Mitchell Hashimoto
02edc7579b
packer: Rename ReaderWriterUi to BasicUi
2013-08-11 18:20:27 -07:00
Mitchell Hashimoto
fb6d2754da
packer: Add Machine func to Ui
2013-08-11 18:16:00 -07:00
Mitchell Hashimoto
7bdb0c96f8
packer: fmt
2013-07-31 14:43:34 -07:00
Mitchell Hashimoto
08d2ac7815
packer: don't output colors if Windows and not Cygwin
2013-07-31 14:06:01 -07:00
Mitchell Hashimoto
c2236e9bfd
packer: Only trim whitespace on the right of prefixed UI
2013-07-09 12:41:36 -07:00
Mitchell Hashimoto
7198936f7e
packer: PrefixedUi properly prefixes each line of output
2013-07-02 12:28:25 -07:00
Mitchell Hashimoto
43b6c1fa89
packer: Ui.Message should Fprint, not Fprintf
2013-06-23 23:06:59 -07:00
Mitchell Hashimoto
f4a5adf471
packer: Output a newline when interrupted for UI
2013-06-17 11:40:57 -07:00
Mitchell Hashimoto
e0b05355c3
packer: If interrupted, Ask is disabled
2013-06-15 18:25:34 -07:00
Mitchell Hashimoto
dc5d261994
packer: Ui can return an error for Ask, returns one for interrupt
2013-06-15 18:24:38 -07:00
Mitchell Hashimoto
22e7345148
packer: Ui requires input for Ctrl-C
2013-06-14 17:37:38 -07:00
Mitchell Hashimoto
ea01d7b2c6
fmt
2013-06-14 16:00:16 -07:00
Mitchell Hashimoto
9a69b21025
packer: Ui.Ask quits during interrupt
2013-06-14 15:59:54 -07:00