359 Commits

Author SHA1 Message Date
Adrien Delorme
1edd848877 esx5driver.VerifyChecksum: try checksum remote file instead of local file
fix #9456
2020-07-15 18:21:08 +02:00
Ali Rizvi-Santiago
3da5a64a8d Fixed a race in the ReadNetworkingConfig implementation from the parsers belonging to the vmware builders that existed between reading the version and consuming tokens from the rest of the file. 2020-06-09 19:37:38 -05:00
Megan Marsh
5d67183c4c fix test 2020-06-05 14:05:59 -07:00
Megan Marsh
093cfcfd9f
Merge pull request #9322 from arizvisa/GH-8528
Fix the VMware builders when the guest platform's dhcpcd switches the ip address in-between a build
2020-06-05 10:58:00 -07:00
Ali Rizvi-Santiago
8985ba077c Re-added the (mistakenly removed) host override to the CommHost for the vmware builders. 2020-06-05 12:39:20 -05:00
Megan Marsh
4cd3429914 add ssh override test 2020-06-05 10:15:11 -07:00
Ali Rizvi-Santiago
9c5a65263f Added @SwampDragons' suggestion to the CommHost() implementation for the vmware builders which uses the communicator config's Config.Port() function to determine the communication port-number independent of the configured protocol. 2020-06-04 19:04:12 -05:00
Megan Marsh
baed65156c
Merge pull request #9319 from arizvisa/GH-8528.refactor
This refactors the dhcpd lease parser in the vmware builders and adds unit tests for everything.
2020-06-04 12:18:49 -07:00
Ali Rizvi-Santiago
898321bcfe Added suggestions from @SwampDragons to the parsers from the vmware builders, included unit-tests and sample file for fusion's networking file, and fixed a few situations where the channel wasn't being closed. 2020-06-04 05:07:18 -05:00
Megan Marsh
df37918467
Merge pull request #9303 from arizvisa/GH-8528.unit-tests
Unit tests for the driver_parser.go functionality of the vmware builder
2020-06-02 15:28:13 -07:00
Ali Rizvi-Santiago
e5b6d8c37c Didn't know that WinRM uses a different variable for the port number when trying to determine the communication host in CommHost...now it's fixed. 2020-05-30 02:17:21 -05:00
Ali Rizvi-Santiago
229b5d17ff Re-worked the vmware builder drivers so that they're able to check multiple ip addresses when trying to connect via the CommHost. 2020-05-28 15:36:45 -05:00
Ali Rizvi-Santiago
0609909f1a Fixed some lint issues. 2020-05-28 13:53:49 -05:00
Ali Rizvi-Santiago
ad7194c920 Rewrote the GuestIP implementation in the vmware builder to use the new dhcpd lease parsers instead of the old regexp-based logic. 2020-05-28 13:22:58 -05:00
Ali Rizvi-Santiago
020b005522 Finished implementing the final dhcpd lease entries parser for the vmware builders and also included its own unit tests. 2020-05-28 13:22:58 -05:00
Ali Rizvi-Santiago
cf5332fa20 Updated the dhcpd lease entry parser in the vmware builder to return errors if any are encountered. 2020-05-28 13:22:58 -05:00
Ali Rizvi-Santiago
afa4696985 Tightened the regular expressions used by the vmware builder to parse the dhcpd leases, and added support for parsing the weekdays. 2020-05-28 13:22:58 -05:00
Ali Rizvi-Santiago
e2a7c317eb Implemented the dhcpd lease entry decoder and the address decoder for the vmware builder. 2020-05-28 13:22:57 -05:00
Ali Rizvi-Santiago
efb775accb Added a number of parsing combinators to the vmware builder and some minor tests for them to help with parsing dhcpd leases. 2020-05-28 13:22:57 -05:00
Ali Rizvi-Santiago
f17007d546 Removed the sentinelSignaller chan from the vmware builder parsers and its unit-tests, and also commented all of the goroutines that are used. 2020-05-28 13:22:56 -05:00
Ali Rizvi-Santiago
159ea595df More lint issues fixed... 2020-05-28 13:12:42 -05:00
Ali Rizvi-Santiago
32b64e0576 Fixed some lint issues in the unit tests for the vmware builder driver parsers. 2020-05-28 13:07:54 -05:00
Adrien Delorme
0fa60c68fb
Drop the iso_checksum_type & iso_checksum_url fields (#8437)
* Drop the iso_checksum_type & iso_checksum_url fields

In favor of simply using iso_checksum that will know what to do.

* fix after master merge

* Update builder_test.go

* Update builder_test.go

* Update builder_test.go

* Update builder_test.go

* Update builder_test.go

* remove checksum lowercasing tests

* Update builder_test.go

* Update builder_test.go

* better docs

* Update builder_test.go

* even better docs

* Update config.go

* Update builder_test.go

* Update step_create_vmx_test.go

* make generate

* better docs

* fix imports

* up tests

* Update _ISOConfig-required.html.md

* Update builder_test.go

* don't use sha1.Sum("none") as a caching path

* Update builder_test.go

* better docs

* Update iso_config_test.go

remove ISOChecksumType/ISOChecksumURL references

* Update step_download_test.go

* add iso_checksum_url and iso_checksum_type fixers + tests

* add concrete examples of checksum values

* add examples of checksumming from local file

* update go-getter dep

* up deps

* use new go-getter version

* up ESX5Driver.VerifyChecksum: use go-getter's checksumming

* ISOConfig.Prepare: get checksum there in case we need it as a string in ESX5Driver.VerifyChecksum

* Update iso_config.go

* get go-getter from v2 branch

* Update driver_esx5.go

add more comments

* Update driver_esx5.go

* show better error message when the checksum is invalid

* Update builder_test.go

put in a valid checksum to fix tests, checksum is md5("packer")

* Update builder_test.go

test invalid and valid checksum

* more test updating

* fix default md5 string to be a valid md5

* TestChecksumFileNameMixedCaseBug: use 'file:' prefix for file checksumming

* Update iso_config_test.go

* Update iso_config_test.go

* Update builder_test.go

* Update builder_test.go

* Update builder_test.go

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update go.mod

* Update go.mod

* Update CHANGELOG.md
2020-05-28 11:02:09 +02:00
Ali Rizvi-Santiago
2a8bc45bc4 Added unit-tests for the netmap parsing components in the vmware builder. 2020-05-26 23:03:30 -05:00
Ali Rizvi-Santiago
7c1ad4adcf Added unit-tests for the dhcpd configuration components in the vmware builder, and fixed a few discovered race conditions. 2020-05-26 22:59:35 -05:00
Sylvia Moss
1c30a71d09
Replace file shared state by statebag (#9238) 2020-05-19 11:49:48 +02:00
Wilken Rivera
e8f8ebf132
builder/vmware: Add some additional debug logging to the driver version check (#9064) 2020-04-15 10:34:48 +02:00
Megan Marsh
a48c0ecf49 update docs for headless to help users know they may need to launch the gui 2020-04-08 13:53:19 -07:00
Jeff Escalante
2999934326
fix generation script, bugfixes in source comments, update website paths in primary codebase 2020-04-07 17:53:22 -04:00
Jeff Escalante
9165be87da
packer.io prefix removal, html extension remove for in-code errors 2020-04-07 17:53:22 -04:00
Jeff Escalante
4afd107eeb
patch source files for extensions changes 2020-04-07 17:50:51 -04:00
Sylvia Moss
b17b211aa9
Add cleanup_remote_cache config option to vmware-iso (#8917) 2020-03-24 16:16:25 +01:00
Adrien Delorme
88297c796d Merge branch 'master' into hcl2_singular_blocks 2020-03-17 14:47:17 +01:00
Adrien Delorme
94a1f0bcb6 go fmt 2020-03-17 12:05:37 +01:00
Paul Cichonski (pcichons)
c3d793255e Do not test if NIC is reachable when ssh bastion is required
Relates to https://github.com/hashicorp/packer/issues/8866
2020-03-11 19:27:48 -04:00
Wilken Rivera
e1a46ec293
Fix gosimple S1025 linting errors (#8838)
Remove unneeded use of fmt.Sprintf for variables that are already strings.
2020-03-04 15:31:30 -05:00
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