Ali Rizvi-Santiago
cf9bbe3ecf
Incorporated the hack demonstrated by @SwampDragons in order to deal with packer.rpc.Ui not exporting any information about what it's doing to anybody.
2018-08-20 21:55:18 -05:00
Ali Rizvi-Santiago
5726927cba
Moved the progress bar out of packer.Ui and unlinked it out of all the packer.Ui implementations. Split up the terminal-related functions into a separate terminal.go and calculate the progress bar width by traversing through packer.Ui to avoid the issue with github.com/ugorji/go/codec serializing private members (or unsafe pointers) of structs. Shuffled some arguments around in getConsoleScreenBufferInfo in common/terminal_windows.go so that the interface forces the user to correctly declare a _CONSOLE_SCREEN_BUFFER_INFO type.
2018-08-20 21:55:18 -05:00
Ali Rizvi-Santiago
0f10032b3d
Moved the progress bar from common to the packer.UI interface and refactored it so that the terminal width is calculated based on each interface which returns a custom progressbar specific to its ui.
2018-08-20 21:55:18 -05:00
Ali Rizvi-Santiago
fd2fef8738
Added support for the progress bar to automatically determine its width using the minimum length from a packer.UI and the terminal dimensions via kernel32.GetConsoleScreenBufferInfo or an ioctl (TIOCGWINSZ) to "/dev/tty".
2018-08-20 21:55:18 -05:00
Ali Rizvi-Santiago
16ecb3ad9a
Reverted removal of progress-bar that was done by commit 5d97b105a8
and added some missing arguments that were missed during the rebase. Modified the default progress bar's width to 80 as a result of the conversation on PR #5851 .
2018-08-20 21:55:18 -05:00
Adrien Delorme
a5587e30ec
log wether the file was transfered or is just being inplace referenced
2018-08-20 11:45:57 +02:00
Adrien Delorme
6b3844a64f
Revert "allow to use ISO images in-place v.s. copying them"
2018-08-20 10:48:06 +02:00
Adrien Delorme
c744e8b2bb
make download messages less redudant and more simple
2018-08-17 09:29:39 +02:00
Adrien Delorme
d7d4aed51c
be even more precise
2018-08-16 18:56:28 +02:00
Adrien Delorme
2b3ea29970
show more precise error download/copy/referencing messages
2018-08-16 18:41:44 +02:00
Adrien Delorme
863222b1e2
Also use the terminology Inplace in DownloadConfig for clarity/consistency
...
* swapped boolean checks
* swapped in tests too
2018-08-15 15:26:31 +02:00
Adrien Delorme
82e480a285
allow to use ISO images inplace v.s. copying them
2018-08-15 14:37:38 +02:00
Seth Vargo
b17b333e29
Add a common package for specifying useragent and adopt that everywhere
...
There were 5 different formats for the Packer useragent string. This
fixes that and unifies it into a helper package.
I did not touch oracle's user-agent, because it looked kinda special.
2018-04-05 14:28:50 -04:00
Josh Soref
5178dd36e8
spelling: regular
2018-03-14 02:19:10 +00:00
Matthew Hooker
7a189a83a1
fix imports
...
`find . -type f -name '*.go' -not -path "./vendor/*" -exec goimports -w {} \;`
2018-01-24 17:09:17 -08:00
Matthew Hooker
a831d522be
change run signatures
...
Run now takes a context as well as a statebag. We'll assign the context
to the blank identifier to prevent namespace collisions. We'll let the
step authors opt-in to using the context.
`find . -iname "step_*.go" -exec gsed -i'' 's/func \(.*\)Run(/func \1Run(_ context.Context, /' {} \;`
2018-01-24 17:09:17 -08: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
Vladislav Rassokhin
af8a0c46c5
Do not re-download iso multiple times from different urls
...
In case of two or more iso_urls checks for downloaded files prior to downloading them.
Speedups case when some iso already downloaded and another url prepended to iso_urls list.
2017-11-26 00:10:34 +03:00
Matthew Hooker
81522dced0
move packer to hashicorp
2017-04-04 13:39:01 -07:00
Mitchell Hashimoto
e65e2d104a
common: StepDownload can force an extension
2015-06-08 20:41:39 -07:00
Mitchell Hashimoto
8dbe0f065c
Remove version from "packer" package
2014-10-27 20:51:34 -07:00
Mark Rushakoff
4548495116
StepDownload uses packer version as user agent
2014-01-09 13:20:30 -08:00
Mitchell Hashimoto
483cda18c1
builder/vmware: make things more Go-like
...
This commit currently breaks the builder though, since the ISo is now
uploaded back into ESX.
2013-11-07 12:01:18 -08:00
Doug MacEachern
a828a9a064
builder/vmware: new driver to support building images directly on ESX
...
This driver talks directly to ESX over ssh, using vim-cmd, esxcli and sh;
no vCenter or VIM api required.
Remote* config properties added to support a remote driver
RemoteDriver interface extends Driver:
* SSHAddress - esx flavor uses esxcli to find the VM's ip address
* Download - esx flavor downloads iso files to a vmfs datastore
Driver can optionally implement the following interfaces:
* VNCAddressFinder - esx flavor needs to check remote ports
* OutputDir - esx driver needs a local and remote OutputDir
* Inventory - esx driver needs to register/unregister VMs
* HostIPFinder - esx flavor needs an address on the same network as esx itself
2013-11-07 12:01:18 -08:00
Mitchell Hashimoto
0b830c92ba
common: Use new multistep API
2013-08-31 12:17:59 -07:00
Mitchell Hashimoto
562ea28a79
builder/virtualbox: switch download guest additions to use new common
2013-08-15 17:46:40 -07:00
Mitchell Hashimoto
bb352e5011
common: Add new StepDownload to DRY up downloads
2013-08-15 17:46:40 -07:00