Commit Graph

323 Commits

Author SHA1 Message Date
Wilken Rivera 9ec8b67392
Add golangci-lint to project (#8686)
* Add golangci-lint as linting tool

* Disable failing staticchecks to start; GitHub issue to handle coming soon

* Run `goimports -w` to repair all source files that have improperly
formatted imports

* makefile: Add ci-lint target to run on travis

This change adds a new make target for running golangci-lint on newly
added Go files only. This target is expected to run during Packer ci builds.

* .github/contributing: Add code linting instructions

* travis: Update job configuration to run parallel builds
2020-02-14 11:42:29 -05:00
Sylvia Moss dc31bad539
Sharing info with post-processors via artifact (#8632) 2020-01-30 11:27:58 +01:00
Moss 61bee60ecf Add StepHttpIpDiscover tests 2020-01-28 10:31:17 +01:00
Moss df38d11270 Fix compilation error 2020-01-27 17:15:13 +01:00
Moss 0566f1f999 Extract http ip discover to a new step 2020-01-27 17:06:56 +01:00
Megan Marsh 8c8de27509 add note about error abort to vmware warning 2020-01-24 09:02:30 -08:00
Sylvia Moss d6a351b173
Rename communicator config variables and remove deprecated code (#8584) 2020-01-09 08:37:30 -08:00
Megan Marsh be3c1ef106 bump the timeout to a very high level to protect against laggy CI machines 2020-01-07 09:59:25 -08:00
Megan Marsh 84063d2132 implement ID and Type values in the provisioner template info sharing 2019-12-13 11:57:01 -08:00
Stephen Tawn c66219084e Fix error message when ovftool is missing 2019-11-14 23:11:16 +00:00
Lars Lehtonen 5f02150e05
builder/vmware/common: defer close after testing for errors 2019-11-06 14:28:17 -08:00
Lars Lehtonen 9924d16fc3
builder/vmware/common: remove unused testHWConfig() 2019-11-01 19:13:26 -07:00
Lars Lehtonen 2b795053b4
builder/vmware: fix dropped test errors 2019-09-27 16:05:12 -07:00
Megan Marsh c24693372d
Merge pull request #8132 from scienty/support_floppy_vmx_esxi
Support floppy_files for vmx on esxi
2019-09-23 12:20:49 -07:00
Prakash Sidaraddi 67be007f45 Support floppy_files for vmx on esxi 2019-09-20 00:23:28 +05:30
Adrien Delorme ba9ffcbf73 re-indent HWConfig struct comments 2019-09-03 17:35:29 +02:00
Adrien Delorme b3cdf2ac8f remove docs typo 2019-08-27 15:16:33 +02:00
Adrien Delorme 4cb7c30987 Merge remote-tracking branch 'origin/master' into scrape_doc_to_builder_struct_config 2019-08-21 16:44:23 +02:00
Vladislav Rassokhin 991cf22504 Prevent endless reading of closed file in vmware plugin 2019-07-16 16:02:57 +03:00
Adrien Delorme 4a61dc3670 vmware: document using partials 2019-06-20 15:28:27 +02:00
Adrien Delorme c11ef90cb6 use interpolate.NewContext() instead of testConfigTemplate(t)
because it's what's happenning there
2019-06-14 12:17:28 +02:00
Adrien Delorme 926c8bbaa6 refactor ShutdownConfig into a single struct 2019-06-14 12:17:28 +02:00
Adrien Delorme 4bf6a56d71 split communitacor.SSH & communitacor.WinRM to facilitate documentation
put doc for communicator into the struct
2019-06-06 16:55:24 +02:00
Adrien Delorme 4399684372 make fmt autogenerated docs 2019-06-06 16:29:25 +02:00
Adrien Delorme e6cbb013ba add // go:generate struct-markdown to all previously edited files 2019-06-05 16:42:18 +02:00
Adrien Delorme f1917edd34 generate the comments for config struct of builders scraping doc website 2019-06-05 16:42:17 +02:00
Megan Marsh f7c1b5e940 add 30 minute timeout for destroying a VM 2019-04-23 12:55:59 -07:00
Adrien Delorme 56c7593725 fix panic in StepConfigureVNC
When the driver is the esx5 driver s.l won't be set at all. Meaning this will crash.
In the esx5 driver we try to dial possible ports to see if it works so it doesn't make sense to use packer's `net.ListenRangeConfig`. It could make sense to have a net.DialRangeConfig but this sounds a bit too specific and not broad enough to do.

fix #7505
2019-04-16 15:32:05 +02:00
Adrien Delorme f555e7a9f2 allow a provisioner to timeout
* I had to contextualise Communicator.Start and RemoteCmd.StartWithUi
NOTE: Communicator.Start starts a RemoteCmd but RemoteCmd.StartWithUi will run the cmd and wait for a return, so I renamed StartWithUi to RunWithUi so that the intent is clearer.
Ideally in the future RunWithUi will be named back to StartWithUi and the exit status or wait funcs of the command will allow to wait for a return. If you do so please read carrefully https://golang.org/pkg/os/exec/#Cmd.Stdout to avoid a deadlock
* cmd.ExitStatus to cmd.ExitStatus() is now blocking to avoid race conditions
* also had to simplify StartWithUi
2019-04-08 20:09:21 +02:00
Adrien Delorme c4f3dccc14 rename interpolation context from ctx to ictx and contexts to ctx to avoid conflicts 2019-04-03 15:56:15 +02:00
Adrien Delorme ac92916b01 StepConfigureVNC: close listener only once 2019-03-26 10:58:51 +01:00
Adrien Delorme a3838ecfad error on negative ports 2019-03-19 15:21:09 +01:00
Adrien Delorme 5a6dffde9a use port as ints 2019-03-19 15:01:12 +01:00
Adrien Delorme f828b72c10 step configure vnc: allow to use ESX5Driver again 2019-03-19 12:54:15 +01:00
Adrien Delorme c214f6735b make everything a uint 2019-03-19 12:54:15 +01:00
Adrien Delorme b5d78d47f5 vmware StepConfigureVNC: use common/net pkg to find open port 2019-03-19 12:54:15 +01:00
Eric Mowry cef3d0eb24 Ran make fmt per Megan's request. 2019-03-01 14:16:00 -05:00
Eric Mowry 109ba2c54c After testing a ISO and VMX clone along with setting the display_name option it was determined that having no name for the .vmxf file did not work either. Updating to check if displayName is not empty before using and falling back to VMName if displayName is empty. 2019-02-28 21:36:25 -05:00
Eric Mowry e74a81e27b Deny the copying of .vmxf from the source VM to the target VM. If this file gets copied over to the new VM once the VM gets deleted the .vmxf and the folder for the VM stay on the datastore. This causes Packer to hang because the folder on the datastore does not go away during the cleanup process. 2019-02-28 16:47:46 -05:00
Eric Mowry 1127096beb Setting extendedconfigfile to the name of the VM so that when ESXi makes the vmxf it is named after the VM and ESXi will properly delete the file when the VM gets deleted. 2019-02-28 16:43:47 -05:00
Megan Marsh 5cc442872e
Merge pull request #7314 from hashicorp/fix_7234
add noSSLVerify to ovftool args
2019-02-19 16:54:48 -08:00
Megan Marsh bbc52f9a7d add noSSLVerify to ovftool args 2019-02-14 12:10:58 -08:00
Megan Marsh bd3339f1f9 also strip \r to work around windows file ending strangeness 2019-02-13 15:41:37 -08:00
Megan Marsh 6ea64bc378
Merge pull request #7191 from arizvisa/GH-7190
Adds support to the vmware builders for specifying the number of cores per socket via the `cores` option.
2019-01-31 15:27:52 -08:00
Megan Marsh ce8f5c31df escape query as suggested in issue #7200 2019-01-23 11:04:14 -08:00
Ali Rizvi-Santiago 9d2f98394e Revert "Renamed the terse option, `cores`, to to the less-terse version `cores_per_socket`."
This reverts commit 0c37a3c68f and avoids bikeshedding from other committers.
2019-01-17 14:49:07 -06:00
Ali Rizvi-Santiago 0c37a3c68f Renamed the terse option, `cores`, to to the less-terse version `cores_per_socket`. 2019-01-17 10:39:19 -06:00
Ali Rizvi-Santiago 062c62eed8 Added support for specifying the number of cores as `cores` to vmware-common. 2019-01-17 10:39:19 -06:00
DanHam 0821653256
Fix 'nil' dir in VMware artifact when building locally 2018-12-14 13:21:41 +00:00
Ali Rizvi-Santiago 96bdf17d2e Added knowledge of the "temporaryDevices" statebag to the StepCleanVMX tests for the VMware builders. 2018-12-03 18:03:02 -06:00