Commit Graph

134 Commits

Author SHA1 Message Date
Vasiliy Tolstov 7f391a94aa unbreak glob pattern in floppy_files
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2016-11-21 16:29:14 +03:00
Matthew Hooker d920b3fbf4 run gofmt 2016-11-01 14:08:04 -07:00
Matthew Hooker 97688a96ba Merge pull request #4004 from mitchellh/parseCheckSumFilePanic
fix parseCheckSumFile panic
2016-10-14 15:50:07 -07:00
Ali Rizvi-Santiago 1347b11f06 Fixed a bug due to some missing filepath.ToSlash calls in StepCreateFloppy.Add.
If backslashes were in a filename (such as when running from Windows),
    this would cause the backslashes to be included in the filenames in the
    created floppy disk which caused havoc when Windows tried to parse it.

Fixed a bug in fsDirectoryCache when using path.Clean() to normalize the
    input directory properly. This would cause an error where a new directory
    "." would be created instead of it correctly returning the root directory.

Fixes issue #3977.
2016-10-14 14:17:49 -07:00
Matthew Hooker 54651e0005 fix parseCheckSumFile panic
resolves #3516
2016-10-14 00:56:05 -07:00
Rickard von Essen 3c8dabba9e Fixed formatting 2016-10-11 23:43:50 +02:00
Rickard von Essen 5e96709ee9 Merge pull request #2919 from arizvisa/floppy-recurse
Added an option for copying entire subdirectories via floppy_dirs (supplants floppy_files)
2016-10-08 16:51:16 +02:00
Matthew Hooker a9abe43325 builder/amazon: add retry login when creating tags.
also move Retry from builder/googlecompute/common to common/retry
2016-09-28 18:22:31 -07:00
Ali Rizvi-Santiago 86c00490e9 Renamed any and all instances of the word "FloppyContents" to "FloppyDirectories".
Ensure that all builders include FloppyDirectories in the StepCreateFloppy options.
Changed the way the unit-tests in common/step_create_floppy_test work to use the static test-fixtures directory instead of creating the paths dynamically.
Removed a duplicate line of documentation from parallels-pvm.html.md that occurred during rebasing.
2016-09-27 23:31:42 -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 389603cc0f Allow upper case input to -on-error=ask 2016-09-16 12:15:00 +00:00
Orivej Desh 115cb5080f Document NewRunner 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
Ali Rizvi-Santiago fbe305cf4e Renamed floppy_contents to floppy_dirs as requested by rickard.von.essen@gmail.com 2016-09-12 12:07:35 -05:00
Ali Rizvi-Santiago 915b7f371a Added missing argument to step_create_floppy_test.go 2016-09-12 11:57:51 -05:00
Ali Rizvi-Santiago a3f0308e92 Re-implemented the support for the floppy_files keyword in order to remain backwards-compatible with templates using the old syntax.
Moved the support for recursive paths from the floppy_files keyword to the new floppy_contents keyword.
Shifted some of the code around to add better logging of what's actually being copied.
Added a couple of unit-tests for the new floppy_contents implementation.
Ensured that all files that were being added were also being included in state.FilesAdded so that the older unit-tests will work.
2016-09-12 11:56:25 -05:00
Ali Rizvi-Santiago 7d360d4e67 Added support for recursively including subdirectories in common/step_create_floppy.go
Shuffled the s.FilesAdded counter around so that unit-tests for common/step_create_floppy.go work without having to implement the fix properly.
2016-09-12 11:22:50 -05:00
Ricard Clau acededfc6e tests actually test the floppies 2016-07-27 21:59:21 +01:00
Chris Bednarski 1d31d2d8d4 Merge pull request #3674 from yoctocloud/file_scheme
common/download.go: allow to specify relative path for file scheme
2016-07-06 11:16:55 -07:00
Vasiliy Tolstov 4392f6df1c common/download.go: allow to specify relative path for file scheme
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2016-07-06 13:03:39 +03:00
Vasiliy Tolstov 82c63bd723 iso_checksum: fix parsing with absent newline
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2016-07-03 12:06:31 +03:00
Rickard von Essen abb2d92c7e Removed ftp/ftps schemas since they don't work. 2016-02-09 13:02:42 +01:00
Rickard von Essen bbade5d8ae Added "iso_checksum_url" and keep the functionality of "iso_checksum"
Added support for file shema in "iso_checksum_url".
Added some unit tests and updated the docs accordingly.
2016-02-08 19:35:50 +01:00
Vasiliy Tolstov 00fcc3dfdc allow to specify checksum via url
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2016-02-08 19:35:50 +01:00
Chris Bednarski 24dc798cfb Revert "Prevalidate Hardware Specs on Linux"
This reverts commit eda84cb2d3.
2016-02-02 12:41:43 -08:00
Jake Champlin eda84cb2d3 Prevalidate Hardware Specs on Linux
Prevalidates hardware resources on Linux platforms for Virtualbox and
VMware builders. This is currently only available on Linux, as enabling
for both Darwin and Windows platforms, relies on cgo bindings that would
prevent effective cross-compilation.

Packer will now fail to build and validate templates if the template is
requesting that the VM to be created would allocate more system
resources than the host system has available.

This _however_ doesn't catch parallel builds that overflow the hosts
resources, will probably still need a better error message for VM's
failing to boot in that case.

Example Outputs:

```
$ $GOPATH/bin/packer build -debug ./vmware-iso.json
Debug mode enabled. Builds will not be parallelized.
vmware-iso output will be in this color.

2 error(s) occurred:

* Unavailable Resources: RAM - Requested - 204800000MB - Available 21721MB
* Unavailable Resources: Disk - Requested - 4000000000MB - Available 76701MB
```

```
$ $GOPATH/bin/packer build -debug ./vbox-iso.json
Debug mode enabled. Builds will not be parallelized.
virtualbox-iso output will be in this color.

2 error(s) occurred:

* Unavailable Resources: RAM - Requested - 10240000MB - Available 21721MB
* Unavailable Resources: Disk - Requested - 1000000000MB - Available 76701MB
```
2016-01-21 18:19:11 -05:00
Mark Peek 7f149e595d Refactor http server config into common 2015-11-01 14:45:47 -08:00
Mark Peek cdcffecc2d Refactor builder ISO options
The ISO builders (parallels, qemu, virtualbox, and vmware) had too
much common code which needed to be maintained separately. This change
moves that code to a common ISO configuration.
2015-10-20 16:27:47 -07:00
Chris Bednarski 1764238c0b Added [DEBUG] prefix to log messages 2015-08-19 13:15:23 -07:00
Chris Bednarski 6e8c6a15ad Implement fix, add comments so it's more apparent why we're doing special logic 2015-08-14 17:49:08 -07:00
Chris Bednarski 7ecfb057ff Added test case to catch deleting local source file when checksum doesn't match 2015-08-14 17:37:57 -07:00
Chris Bednarski 424ee65866 Added a log message when we use a local file instead of downloading one 2015-08-14 17:34:39 -07:00
Chris Bednarski 70af28be47 Added cake fixture for testing file:/// downloads 2015-08-14 17:34:04 -07:00
Mitchell Hashimoto 0416939c08 common: always reset progress to 0 for downloads 2015-06-22 14:59:38 -07:00
Mitchell Hashimoto 117579808f common: add the current progress to the total size 2015-06-22 14:58:27 -07:00
Mitchell Hashimoto 944b4bf46c common: delete file if checksum fails 2015-06-22 12:17:29 -07:00
Mitchell Hashimoto 2f530534d2 common/download: resume test 2015-06-22 12:14:35 -07:00
Mitchell Hashimoto aa7d3b7841 Merge pull request #2245 from vtolstov/iso
resume download after fail
2015-06-22 12:03:47 -07:00
Mitchell Hashimoto bf456f35f9 common: download client tests
/cc @cbednarski
2015-06-22 12:02:38 -07:00
Mitchell Hashimoto 897888fde3 common: fix potential panic case 2015-06-21 19:58:18 -07:00
Vasiliy Tolstov d98de209cb fallback to not ranged request if server lacks HEAD
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2015-06-16 01:04:48 +03:00
Mitchell Hashimoto 2d13db300c packer: HookProvision errors if no communicator 2015-06-15 10:26:46 -07:00
Vasiliy Tolstov 382fa01e6f resume download after fail
close #2106

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2015-06-15 09:53:16 +03:00
Mitchell Hashimoto a1ceb5a7ef common: remove StepConnectSSH 2015-06-13 18:10:37 -04:00
Mitchell Hashimoto 71d8c6610a Merge pull request #1968 from bhcleek/master
do not request a pty
2015-06-13 16:23:31 -04:00
Mitchell Hashimoto 1e853f9f1f common: revert some changes from #2121 for Windows 2015-06-13 10:21:09 -04:00
Clint Shryock 04e174fae8 builder/amazon: Properly return error code on ssh errors 2015-06-11 16:21:29 -05:00
Mitchell Hashimoto f6f9cca7ce Merge pull request #2189 from mitchellh/b-download-extension
common: StepDownload can force an extension
2015-06-09 20:56:43 -07:00
Mitchell Hashimoto 23a48d6619 go fmt 2015-06-08 21:34:20 -07:00