Commit Graph

16111 Commits

Author SHA1 Message Date
Megan Marsh 108455a7dc
Merge pull request #9983 from hashicorp/tools_upload_path
allow user to set tools upload path
2020-09-24 10:41:08 -07:00
Megan Marsh d66b358100
Merge pull request #9991 from hashicorp/b-amazon-ssm-infinite-loop
amazon/ssm_driver: Update log polling logic
2020-09-24 09:55:39 -07:00
Megan Marsh 8d0058dad6 allow user to set tools source path 2020-09-24 09:51:01 -07:00
Wilken Rivera 2f2b5683a2 amazon/ssm_driver: Update log polling logic
This change checks for closed iochans related to the log polling
function and will break out of the loop when both channels are closed.
Which is an indicator that the SSM session has been terminated by some
external process. This fixes an issue where Packer hangs, due to the
infinite loop, when an SSM session is killed outside of Packer.

Related to #9442
2020-09-24 10:19:37 -04:00
Adrien Delorme 654fade0a9
azure arm: make map[string]*string => map[string]string to simplify things (#9985)
* azure arm: make map[string]*string => map[string]string to simplify things
* go generate ./builder/azure/...
* tests !

fix #9984
2020-09-24 12:19:26 +02:00
Megan Marsh e41100290e
Merge pull request #9981 from hashicorp/assume_role
Implement assume_role for Packer.
2020-09-23 13:44:45 -07:00
Megan Marsh 429d431365 Implement assume_role for Packer. This functionality is copied shamelessly
from the Terraform AWS provider
2020-09-23 13:18:26 -07:00
Megan Marsh 96a8e827ad
Merge pull request #9954 from rgl/run-cygwin-msys2-cd-creation-tool
add support for running cygwin/msys2 based cd/iso creation tool (e.g.…
2020-09-23 11:39:44 -07:00
Megan Marsh 9170204a93
Merge pull request #9963 from hashicorp/implement_9868
Add floppy_files, cd_files, and iso_paths to vsphere-clone
2020-09-23 11:37:17 -07:00
sylviamoss 75d649e051 add step_remove_cdrom tests 2020-09-23 12:09:33 +02:00
sylviamoss 2de3f2755a add step_remove_floppy tests 2020-09-23 12:00:28 +02:00
sylviamoss c149b52bb4 add remove_cdrom docs to vsphere iso and clone 2020-09-23 10:32:16 +02:00
sylviamoss 7cd6ee2b3b add FindDatastore driver test 2020-09-22 17:42:35 +02:00
sylviamoss b881a59bc8 refactor vcenter simulator setup 2020-09-22 16:48:53 +02:00
sylviamoss 7b1af2c4e8 add step_add_floppy unit tests 2020-09-22 16:23:11 +02:00
sylviamoss b46f587450 vsphere-clone use common step_add_cdrom 2020-09-22 11:34:49 +02:00
Wilken Rivera 062b9a0d23 update changelog 2020-09-19 07:08:51 -04:00
Wilken Rivera 7e8cd052eb update changelog 2020-09-18 15:43:28 -04:00
Marco Molteni 4d7e42220b
scaleway: add pre validate step (check image and snapshot names) (#9840)
* Implement Stringer inteface for multistep.StepAction

* scaleway: add pre validate step (check image and snapshot names)

Before, it was possible to create multiple images with the same name,
leading to a confusing and wasteful situation (same for snapshots).

Now, we perform the same kind of checks done by the AWS EC2 builder,
and refuse to proceed if there is an existing image with the same name
(same for snapshots).

As usual, invoking `packer build -force` will bypass the checks.

Closes #9839.
2020-09-18 15:37:48 -04:00
Megan Marsh 77817f80a2
Merge pull request #9956 from hashicorp/do_6734
builder/qemu: Add qemu_img_args option to set special cli flags for our calls to qemu-img
2020-09-18 11:24:34 -07:00
Megan Marsh b7b43a41f3 review cleanup 2020-09-18 10:56:28 -07:00
Megan Marsh 7eb5c3ecf9
Merge pull request #9962 from hashicorp/azr-test-hcl2-json
[HCL2] add an hcl2-json test
2020-09-18 10:42:42 -07:00
sylviamoss 778d77e4a2 add floppy and cd to vsphere-clone 2020-09-18 17:09:01 +02:00
Sylvia Moss d347bbec4c
Retry fleet creating only on invalid IAM instance profile (#9946) 2020-09-18 17:05:36 +02:00
Adrien Delorme 3d7ab9ea43 add an hcl2-json test 2020-09-18 16:38:04 +02:00
Anthony Dong eca9b2f30d
aws ebs_surrogate: fix unhonored kms_key_id (#9959) 2020-09-18 12:39:07 +02:00
Sylvia Moss ce2047f30b
vSphere StepAddCDRom tests (#9955) 2020-09-18 09:57:01 +02:00
Megan Marsh 1d218d9e65 add QemuImgArgs option to set specialized flags in qemu-img
convert, resize, and create commands. Add tests. Refactor steps to
not require config pulled from statebag.
2020-09-17 15:15:04 -07:00
Megan Marsh 57413132b0
Merge pull request #9949 from hashicorp/do_6963
Skip qemu-img convert on OSX
2020-09-17 11:31:12 -07:00
Megan Marsh 1052733fca Skip qemu-img convert if format of output file matches format of input file.
This works around an osx bug in qemu-img convert in osx.
2020-09-17 11:21:04 -07:00
Megan Marsh 32b22ab5d7
Merge pull request #9944 from hashicorp/qemu_cleanup_and_tests
Qemu cleanup and tests
2020-09-17 11:19:00 -07:00
Megan Marsh 83ee4e7d13 miscellaneous qemu cleanup. Fix generator strings; generate code
fix diskimage logic
linting
fix tests
2020-09-17 09:57:45 -07:00
Megan Marsh 3577c4a283 refactor multistep array construction in qemu builder to push majority of conditionals into their steps rather than the multistep constructor code. 2020-09-17 09:57:45 -07:00
Megan Marsh 9ac76be190 clean up step_run 2020-09-17 09:57:45 -07:00
Megan Marsh 5b714497e6 qemu: split config and config tests into their own files to match best practices from other builders 2020-09-17 09:57:45 -07:00
Megan Marsh 6c0c603fbf stub out test 2020-09-17 09:57:45 -07:00
Sylvia Moss 9737b85bbc
Remove usb_keyboard option (#9945) 2020-09-17 10:38:33 +02:00
Wilken Rivera b4be598148
Fix static check issues SA1019 for googlecompute plugins (#9950)
This change replaces the deprecated constructors `New` with
`NewService`.

Static check before the change
```
⇶  golangci-lint run --disable-all --no-config --enable=staticcheck | grep SA1019 | grep google
- post-processor/googlecompute-import/post-processor.go:183:18: SA1019:
storage.New is deprecated: please use NewService instead. To provide a
custom HTTP client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
- post-processor/googlecompute-import/post-processor.go:219:18: SA1019:
compute.New is deprecated: please use NewService instead. To provide a
custom HTTP client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
- post-processor/googlecompute-import/post-processor.go:273:18: SA1019:
storage.New is deprecated: please use NewService instead. To provide a
custom HTTP client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
- builder/googlecompute/driver_gce.go:127:18: SA1019: compute.New is
deprecated: please use NewService instead. To provide a custom HTTP
client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
- builder/googlecompute/driver_gce.go:132:25: SA1019: oslogin.New is
deprecated: please use NewService instead. To provide a custom HTTP
client, use option.WithHTTPClient. If you are using
google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey
with NewService instead.  (staticcheck)
```

Static check after change
```
[go-1.15.2] [1] wilken@automaton in ~/Development/packer/
⇶  golangci-lint run --disable-all --no-config --enable=staticcheck | grep SA1019 | grep google

```
2020-09-17 10:14:41 +02:00
Rui Lopes 13be37ee44 add support for running cygwin/msys2 based cd/iso creation tool (e.g. xorriso) 2020-09-17 07:25:00 +01:00
Sylvia Moss 7736ae6c67
Add VMware vnc_over_websocket option (#9938) 2020-09-16 11:02:46 +02:00
Sylvia Moss bdd736b800
Interpolate vagrantfile_template on Vagrant post-processor (#9923) 2020-09-16 10:08:44 +02:00
Megan Marsh aeb70e6726
add http_directory docs to builders where it wasnt documented (#9943)
* add http_directory docs to builders where it wasnt documented

* Fix front matter for Proxmox builder

Co-authored-by: Wilken Rivera <dev@wilkenrivera.com>
2020-09-15 15:50:33 -04:00
Megan Marsh c8d99dbb68 update changelog 2020-09-15 12:00:04 -07:00
Megan Marsh bc69db2433
Merge pull request #9941 from hashicorp/cd_files_vsphere
add cd_files to vsphere builder
2020-09-15 11:25:01 -07:00
Megan Marsh ef01bb5ba6 generated code 2020-09-14 15:35:38 -07:00
Megan Marsh e70e8c8651 add cd_files 2020-09-14 14:59:51 -07:00
Megan Marsh f28cabb162
Merge pull request #9940 from hashicorp/fix_9936
skip slot 7 in disk creation so we don't use reserved slot
2020-09-14 13:36:16 -07:00
Megan Marsh b08dd28b85 skip slot 7 in disk creation so we don't use reserved slot 2020-09-14 13:13:59 -07:00
Megan Marsh e00f6afff8
Merge pull request #9918 from hashicorp/fix_7408
skip compaction when backing file is used, to prevent conversion that…
2020-09-14 13:09:13 -07:00
Megan Marsh 6d2df7fb55
Merge pull request #9932 from hashicorp/cd_files_on_virtualbox
Implement cd_files for virtualbox builders.
2020-09-14 13:08:23 -07:00