Commit Graph

6122 Commits

Author SHA1 Message Date
Narthana Epa cf30b49e6c
Use run_tags (resp run_volume_tags) to tags intances (resp volumes) created from the spot instance launch template 2021-01-12 23:37:01 +11:00
seventieskid 707d2d8236 Refined logging and return scope 2021-01-11 23:04:36 +00:00
Gareth Rees f525e884ed Timeout on metadata server 2021-01-10 18:29:37 +00:00
Narthana Epa bb94df2d02
Add mocking of launch template id
It is being printed after it is created so we need to mock it to prevent
a nil pointer dereference when the tests are run with the launch
template create request is mocked.
2021-01-10 00:00:16 +11:00
Narthana Epa f7588a3737
Add printing of launch template id 2021-01-09 23:59:31 +11:00
Narthana Epa f7e68f1d71
Add spot tags as resource tags of instances and volumes in launch template
According to the APIReference:
<https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateTagSpecificationRequest.html>,
the resource types `instance` and `volume` support tagging on creation.
It is useful to add the spot tags here as it should be more reliable
than tagging them after the spot request is fulfilled as we currently
do.
2021-01-09 23:58:23 +11:00
Darwin Liu 8ef4cfa070 Add in a sanity check for valid vnc ports
Check to make sure that the max and min VNC ports be below 65535 in
config.
2021-01-08 13:43:02 -07:00
Darwin Liu 2b698478a6 Adjusted QEMU step_run_tests.go to reflect previous changes 2021-01-07 22:23:51 -07:00
Darwin Liu 4f2e9117c3 QEMU: Minor fix to VNC mapping parameters and output
* Set the QEMU builder vnc_port_min to have a minimum value of 5900,
  with updated documentation to explain why.

* Changed output messages so that the correct port is listed in packer's
  messaging to the user.

LONGER DESCRIPTION

If vnc_min_port is set to anything above 5900, then packer will fail to
connect via VNC to the QEMU instance. This is due to how QEMU parses
the port for listening to VNC:

   host:d
               TCP connections will only be allowed from host on
               display d.  By convention the TCP port is 5900+d.

Previously the calculation for the port was vncPort - VNCPortMin,
however this will result in an incorrect port being displayed in
packer's messages and potentially packer being unable to connect via VNC
to the host.

For example if vnc_port_min=5990 nad vnc_port_max=5999:

```
Looking for available port between 5990 and 5999 on 0.0.0.0
Found available port: 5996 on IP: 0.0.0.0
Found available VNC port: 5996 on IP: 0.0.0.0
[....]
==> Starting VM, booting disk image
     view the screen of the VM, connect via VNC without a password to
     vnc://0.0.0.0:6
```

This will cause QEMU to set the listening port to 5906 while packer's
VNC client is attempting to connect to 5996.

I am a touch concerned as this commit undoes pull request #9905
(specfically commit 7335695c), but I am also confused as to how he was
able to get QEMU to get a VNC listening port below 5900, as examining
QEMU's git history has shown that this behavior has been in since at
least 2017, probably older.

Hopefully the more explicit error messaging and documentation can make
it clear why this is being undone.
2021-01-07 22:23:43 -07:00
Wilken Rivera 04dbbe2d8e Fix broken links detected by link checker
- Fix broken example links
- Fix broken provisioner links
- Ignore linode.com because of DDOS protection settings
2021-01-06 16:27:12 -05:00
Ali Rizvi-Santiago 9b1d31cee7 Added a fallback to the vmware builder when trying to determine the networkmapping configuration.
Some instances of VMWare will not generate the networkmapping configuration (netmap.conf)
at the time of installation. To deal with this issue, we check for the networkmapping file
first, and then fallback to the networking file which also might exist and contain the
interface information that we require.

This fixes issue #10009.
2021-01-05 11:24:50 -06:00
Megan Marsh 28245ec143
Merge pull request #10134 from borancar/feat/azure_pfx_support
Add Azure PFX certificate support
2020-12-18 12:09:17 -08:00
Megan Marsh d1d5706048
Merge pull request #10362 from nielspardon/master
OpenStack builder: Make external source image props configurable
2020-12-18 10:55:40 -08:00
Megan Marsh ce99640fe2 fix test fixture path 2020-12-17 14:41:36 -08:00
Megan Marsh 88b7b0e14a remove sdk 2020-12-17 13:29:25 -08:00
Megan Marsh 5f34bbd56e add extra line before package declaration so this line does not become the synopsis of a package for godoc 2020-12-16 15:14:43 -08:00
Niels Pardon 0e56b83196 OpenStack builder: Make external source image props configurable
Signed-off-by: Niels Pardon <par@zurich.ibm.com>
2020-12-16 17:19:52 +00:00
Megan Marsh 75803397cb
Document exception to encryption (#10395)
* Update docs on ebs encrypt_boot to clarify that packer will not override global account settings

* Update struct-markdown generator and regenerate partials with new website location. This overwrites some linting that got automatically applied when the files got moved
2020-12-16 10:35:34 +01:00
Megan Marsh eecac40d77
Merge pull request #10394 from anssijun/aws-ebs-retry-spot-instance-tagging
Fix retry logic in AWS spot instance tagging
2020-12-15 11:07:48 -08:00
Megan Marsh 1113301c1b fix conflicts 2020-12-15 10:53:51 -08:00
Dany Garcia 905d8401ea removing unused import 2020-12-15 10:41:25 -08:00
Dany Garcia 0b13d44a23 exporting reusable validatekmskey function 2020-12-15 10:41:25 -08:00
Dany Garcia 3389fded48 merging latest master 2020-12-15 10:40:46 -08:00
Dany Garcia 39bb3a6c55 incorrect error message regarding parameter names 2020-12-15 10:40:12 -08:00
Dany Garcia 504c3807f7 adding support for root volume encryption for amazon-chroot 2020-12-15 10:40:08 -08:00
Anssi Junnola 82a25ec419 Fix retry logic in AWS spot instance tagging 2020-12-15 17:21:03 +00:00
Megan Marsh 4f419506fd
Merge pull request #10384 from Pyrrvs/vmware-dhcp-leases-bigsur
make packer compatible with MacOS BigSur by using Apple DHCP leases instead of VMWare leases
2020-12-14 16:30:50 -08:00
Pyrrvs 12a6fddbd8 handle apple dhcp lease with missing 'name' and 'lease' informations 2020-12-14 19:16:00 +01:00
Roman Mingazeev 354166350d yandex: do not use cloud-config fileds due to possible collision 2020-12-14 13:04:27 +03:00
Pyrrvs f0612e4688 improve parser by skipping all lines containing a '{' or a '}'. fix unecessary []byte cast (linter issue). 2020-12-14 01:00:24 +01:00
gla 7201ce9248 make packer compatible MacOS BigSur by making vmware fusion drivers able to lookup the VM IP address in apple dhcpd leases instead of vmware leases. 2020-12-13 23:26:53 +01:00
Roman Mingazeev bbd9ee8589 fix export when using empty ubuntu image 2020-12-10 14:52:22 +03:00
Roman Mingazeev aa0efcf73e
Yandex/ssh communicator in export (#10352)
* use ssh for communicate to export
* Update post-processor/yandex-export/step-create-s3-keys.go

Co-authored-by: GennadySpb <lipenkov@gmail.com>
2020-12-09 16:51:34 +01:00
Gareth Rees 355b93730b
Gcp oslogin issue 10170 (#10360) 2020-12-09 15:01:51 +01:00
Roman Mingazeev f8e85f94fd
fix set user-agent (#10361) 2020-12-09 14:48:35 +01:00
Mike Tougeron e0e82e2192
Support AWS gp3 volumes (#10338)
* Support AWS gp3 volumes
* docs
* tests
2020-12-09 13:06:57 +01:00
Megan Marsh 26946f1300
Merge pull request #10320 from seventieskid/gcp-wait-to-add-ssh-keys-10312
Gcp wait to add ssh keys 10312
2020-12-08 15:52:52 -08:00
Megan Marsh 1d2ee0bf81
Merge pull request #10337 from serverwentdown/serverwentdown/duplicate-output-file
Fix duplication of main disk in QEMU
2020-12-08 15:18:38 -08:00
Megan Marsh 3c346867f4 fix nil pointer dereference 2020-12-07 15:45:16 -08:00
Megan Marsh 76177b50ce Refactor provisioner acceptance tests to shell directly out to Packer rather than import the core. Modify test case formatting to more closely reflect the builder test cases. 2020-12-07 15:45:16 -08:00
Roman Mingazeev 9fabad6f1d rebase && some fixes 2020-12-07 18:27:22 +03:00
Roman Mingazeev 1c08463204 rebase 2020-12-07 18:13:12 +03:00
Roman Mingazeev efe6d2f08f add comment and remove overrides 2020-12-07 18:13:12 +03:00
Roman Mingazeev 23118c451c fix delete 2020-12-07 18:13:12 +03:00
Roman Mingazeev 4eb3daec8e lint 2020-12-07 18:13:12 +03:00
Roman Mingazeev 478fda12ba reuse common configs 2020-12-07 18:13:06 +03:00
Roman Mingazeev adb4a14471
do better mount image (#10335)
* do better mount image

* check error
2020-12-07 12:20:06 +01:00
Megan Marsh cda3aa205a linting 2020-12-03 16:11:36 -08:00
Megan Marsh 352f064b55 fix docker acceptance tests. Turns out they were broken on the main branch too; needed to move noop progress bar into the sdk to be used in the builder testui. 2020-12-03 16:04:49 -08:00
Megan Marsh 8f51a8bfae move provisioner acceptance tests into sdk alongside builder acceptance tests. Reorganize slightly to make sure no import cycles of doom get formed 2020-12-03 14:22:18 -08:00
Megan Marsh becf7723e6 move builder/testing to acctest inside sdk 2020-12-03 11:57:06 -08:00
Megan Marsh f3f4fef44a fix import 2020-12-03 11:43:06 -08:00
Megan Marsh 98f5fa453c move aws specific acceptance test helper into amazon builder dir 2020-12-03 11:34:45 -08:00
Megan Marsh 2d04ef9b99 remove commented code 2020-12-03 11:32:05 -08:00
Megan Marsh afc798c30a Modify vmware_vmx acceptance tests to use builderT framework
Modify builderT framework to enable use of shell and file provisioners
2020-12-03 11:25:02 -08:00
Megan Marsh 3681e2a7ee fix pathing 2020-12-03 10:39:21 -08:00
Megan Marsh 5576bb5caa move packer config constants next to the packer config 2020-12-03 10:17:35 -08:00
Megan Marsh 8558d1241f move TestUi func to sdk 2020-12-03 10:15:30 -08:00
Megan Marsh a0e81806d3
Merge pull request #10328 from hashicorp/sdk_testing
move builder/testing framework into sdk; it imports the core but I th…
2020-12-03 10:11:28 -08:00
Ambrose Chua 436ac8ef26 Fix duplication of main disk in QEMU 2020-12-04 01:16:26 +08:00
Ambrose Chua f5d5e28012
Update step_copy_disk.go (#10333) 2020-12-03 15:30:11 +01:00
Gareth Rees 937e39d9f4 Amend commit author to align with Hashicorp license 2020-12-03 11:33:49 +00:00
Gareth Rees d6831a4de3 Amend commit author for license pass 2020-12-03 11:33:19 +00:00
Gareth Rees 833855eec5 Amend commit author for license pass 2020-12-03 11:33:02 +00:00
Gareth Rees 3ab9bae79c Amend commit author for license pass
$ make test
find: -executable: unknown primary or operator
find: -executable: unknown primary or operator
==> Checking that only certain files are executable...
Check passed.
ok  	github.com/hashicorp/packer	0.098s
ok  	github.com/hashicorp/packer/builder/alicloud/ecs	70.102s
?   	github.com/hashicorp/packer/builder/alicloud/version	[no test files]
ok  	github.com/hashicorp/packer/builder/amazon/chroot	0.076s
ok  	github.com/hashicorp/packer/builder/amazon/common	0.052s
?   	github.com/hashicorp/packer/builder/amazon/common/awserrors	[no test files]
?   	github.com/hashicorp/packer/builder/amazon/common/ssm	[no test files]
ok  	github.com/hashicorp/packer/builder/amazon/ebs	0.053s
?   	github.com/hashicorp/packer/builder/amazon/ebs/acceptance	[no test files]
ok  	github.com/hashicorp/packer/builder/amazon/ebssurrogate	0.057s
ok  	github.com/hashicorp/packer/builder/amazon/ebsvolume	0.052s
ok  	github.com/hashicorp/packer/builder/amazon/instance	0.092s
?   	github.com/hashicorp/packer/builder/amazon/version	[no test files]
ok  	github.com/hashicorp/packer/builder/azure/arm	8.929s
ok  	github.com/hashicorp/packer/builder/azure/chroot	0.071s
ok  	github.com/hashicorp/packer/builder/azure/common	0.032s
ok  	github.com/hashicorp/packer/builder/azure/common/client	2.768s
?   	github.com/hashicorp/packer/builder/azure/common/constants	[no test files]
?   	github.com/hashicorp/packer/builder/azure/common/lin	[no test files]
?   	github.com/hashicorp/packer/builder/azure/common/logutil	[no test files]
ok  	github.com/hashicorp/packer/builder/azure/common/template	0.038s
ok  	github.com/hashicorp/packer/builder/azure/dtl	1.508s
ok  	github.com/hashicorp/packer/builder/azure/pkcs12	0.250s
ok  	github.com/hashicorp/packer/builder/azure/pkcs12/rc2	0.018s
?   	github.com/hashicorp/packer/builder/azure/version	[no test files]
ok  	github.com/hashicorp/packer/builder/cloudstack	0.074s
?   	github.com/hashicorp/packer/builder/cloudstack/version	[no test files]
ok  	github.com/hashicorp/packer/builder/digitalocean	0.078s
?   	github.com/hashicorp/packer/builder/digitalocean/version	[no test files]
ok  	github.com/hashicorp/packer/builder/docker	0.054s
?   	github.com/hashicorp/packer/builder/docker/version	[no test files]
ok  	github.com/hashicorp/packer/builder/file	0.037s
?   	github.com/hashicorp/packer/builder/file/version	[no test files]
ok  	github.com/hashicorp/packer/builder/googlecompute	7.982s
?   	github.com/hashicorp/packer/builder/googlecompute/version	[no test files]
ok  	github.com/hashicorp/packer/builder/hcloud	0.037s
?   	github.com/hashicorp/packer/builder/hcloud/version	[no test files]
ok  	github.com/hashicorp/packer/builder/hyperone	0.031s
?   	github.com/hashicorp/packer/builder/hyperone/version	[no test files]
ok  	github.com/hashicorp/packer/builder/hyperv/common	0.042s
ok  	github.com/hashicorp/packer/builder/hyperv/common/powershell	0.017s
ok  	github.com/hashicorp/packer/builder/hyperv/common/powershell/hyperv	0.027s
ok  	github.com/hashicorp/packer/builder/hyperv/iso	0.193s
?   	github.com/hashicorp/packer/builder/hyperv/version	[no test files]
ok  	github.com/hashicorp/packer/builder/hyperv/vmcx	0.160s
ok  	github.com/hashicorp/packer/builder/jdcloud	0.038s
?   	github.com/hashicorp/packer/builder/jdcloud/version	[no test files]
ok  	github.com/hashicorp/packer/builder/linode	0.074s
?   	github.com/hashicorp/packer/builder/linode/version	[no test files]
ok  	github.com/hashicorp/packer/builder/lxc	0.038s
?   	github.com/hashicorp/packer/builder/lxc/version	[no test files]
ok  	github.com/hashicorp/packer/builder/lxd	0.033s
?   	github.com/hashicorp/packer/builder/lxd/version	[no test files]
ok  	github.com/hashicorp/packer/builder/ncloud	0.038s
?   	github.com/hashicorp/packer/builder/ncloud/version	[no test files]
ok  	github.com/hashicorp/packer/builder/null	0.036s
?   	github.com/hashicorp/packer/builder/null/version	[no test files]
ok  	github.com/hashicorp/packer/builder/oneandone	0.038s
?   	github.com/hashicorp/packer/builder/oneandone/version	[no test files]
ok  	github.com/hashicorp/packer/builder/openstack	0.048s
?   	github.com/hashicorp/packer/builder/openstack/version	[no test files]
ok  	github.com/hashicorp/packer/builder/oracle/classic	0.055s
?   	github.com/hashicorp/packer/builder/oracle/common	[no test files]
ok  	github.com/hashicorp/packer/builder/oracle/oci	6.349s
?   	github.com/hashicorp/packer/builder/oracle/version	[no test files]
ok  	github.com/hashicorp/packer/builder/osc/bsu	0.045s
ok  	github.com/hashicorp/packer/builder/osc/bsusurrogate	0.043s
ok  	github.com/hashicorp/packer/builder/osc/bsuvolume	0.048s
ok  	github.com/hashicorp/packer/builder/osc/chroot	0.035s
ok  	github.com/hashicorp/packer/builder/osc/common	0.030s
ok  	github.com/hashicorp/packer/builder/osc/common/retry	0.018s
?   	github.com/hashicorp/packer/builder/osc/version	[no test files]
ok  	github.com/hashicorp/packer/builder/parallels/common	1.546s
ok  	github.com/hashicorp/packer/builder/parallels/iso	0.047s
ok  	github.com/hashicorp/packer/builder/parallels/pvm	0.044s
?   	github.com/hashicorp/packer/builder/parallels/version	[no test files]
ok  	github.com/hashicorp/packer/builder/profitbricks	0.046s
?   	github.com/hashicorp/packer/builder/profitbricks/version	[no test files]
?   	github.com/hashicorp/packer/builder/proxmox	[no test files]
?   	github.com/hashicorp/packer/builder/proxmox/clone	[no test files]
ok  	github.com/hashicorp/packer/builder/proxmox/common	0.070s
ok  	github.com/hashicorp/packer/builder/proxmox/iso	0.072s
?   	github.com/hashicorp/packer/builder/proxmox/version	[no test files]
ok  	github.com/hashicorp/packer/builder/qemu	0.088s
?   	github.com/hashicorp/packer/builder/qemu/version	[no test files]
ok  	github.com/hashicorp/packer/builder/scaleway	0.062s
?   	github.com/hashicorp/packer/builder/scaleway/version	[no test files]
ok  	github.com/hashicorp/packer/builder/tencentcloud/cvm	0.037s
?   	github.com/hashicorp/packer/builder/tencentcloud/version	[no test files]
ok  	github.com/hashicorp/packer/builder/triton	0.057s
?   	github.com/hashicorp/packer/builder/triton/version	[no test files]
ok  	github.com/hashicorp/packer/builder/ucloud/common	0.039s
ok  	github.com/hashicorp/packer/builder/ucloud/uhost	0.045s
?   	github.com/hashicorp/packer/builder/ucloud/version	[no test files]
ok  	github.com/hashicorp/packer/builder/vagrant	0.046s
?   	github.com/hashicorp/packer/builder/vagrant/version	[no test files]
ok  	github.com/hashicorp/packer/builder/virtualbox/common	2.546s
ok  	github.com/hashicorp/packer/builder/virtualbox/iso	0.053s
?   	github.com/hashicorp/packer/builder/virtualbox/iso/acceptance	[no test files]
ok  	github.com/hashicorp/packer/builder/virtualbox/ovf	0.043s
?   	github.com/hashicorp/packer/builder/virtualbox/version	[no test files]
?   	github.com/hashicorp/packer/builder/virtualbox/vm	[no test files]
ok  	github.com/hashicorp/packer/builder/vmware/common	5.228s
ok  	github.com/hashicorp/packer/builder/vmware/iso	0.104s
?   	github.com/hashicorp/packer/builder/vmware/version	[no test files]
ok  	github.com/hashicorp/packer/builder/vmware/vmx	0.055s
ok  	github.com/hashicorp/packer/builder/vsphere/clone	0.072s
ok  	github.com/hashicorp/packer/builder/vsphere/common	0.037s
?   	github.com/hashicorp/packer/builder/vsphere/common/testing	[no test files]
ok  	github.com/hashicorp/packer/builder/vsphere/driver	0.443s
?   	github.com/hashicorp/packer/builder/vsphere/examples/driver	[no test files]
ok  	github.com/hashicorp/packer/builder/vsphere/iso	0.063s
?   	github.com/hashicorp/packer/builder/vsphere/version	[no test files]
ok  	github.com/hashicorp/packer/builder/yandex	0.098s
?   	github.com/hashicorp/packer/builder/yandex/version	[no test files]
?   	github.com/hashicorp/packer/cmd/generate-fixer-deprecations	[no test files]
?   	github.com/hashicorp/packer/cmd/mapstructure-to-hcl2	[no test files]
?   	github.com/hashicorp/packer/cmd/snippet-extractor	[no test files]
?   	github.com/hashicorp/packer/cmd/ssh-keygen	[no test files]
?   	github.com/hashicorp/packer/cmd/struct-markdown	[no test files]
ok  	github.com/hashicorp/packer/command	3.717s
?   	github.com/hashicorp/packer/command/enumflag	[no test files]
ok  	github.com/hashicorp/packer/command/flag-kv	0.019s
ok  	github.com/hashicorp/packer/command/flag-slice	0.018s
ok  	github.com/hashicorp/packer/fix	0.026s
ok  	github.com/hashicorp/packer/hcl2template	0.281s
?   	github.com/hashicorp/packer/hcl2template/addrs	[no test files]
ok  	github.com/hashicorp/packer/hcl2template/function	0.028s
?   	github.com/hashicorp/packer/hcl2template/internal	[no test files]
?   	github.com/hashicorp/packer/hcl2template/repl	[no test files]
ok  	github.com/hashicorp/packer/hcl2template/shim	0.019s
ok  	github.com/hashicorp/packer/helper/builder/testing	0.027s
ok  	github.com/hashicorp/packer/helper/communicator	0.034s
ok  	github.com/hashicorp/packer/helper/communicator/ssh	4.204s
ok  	github.com/hashicorp/packer/helper/communicator/sshkey	2.744s
?   	github.com/hashicorp/packer/helper/tests	[no test files]
?   	github.com/hashicorp/packer/helper/tests/acc	[no test files]
?   	github.com/hashicorp/packer/helper/wrappedreadline	[no test files]
?   	github.com/hashicorp/packer/helper/wrappedstreams	[no test files]
ok  	github.com/hashicorp/packer/packer	0.221s
ok  	github.com/hashicorp/packer/packer/plugin	0.417s
ok  	github.com/hashicorp/packer/packer/rpc	0.059s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/adapter	0.063s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/bootcommand	2.778s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/chroot	0.038s
?   	github.com/hashicorp/packer/packer-plugin-sdk/common	[no test files]
?   	github.com/hashicorp/packer/packer-plugin-sdk/filelock	[no test files]
ok  	github.com/hashicorp/packer/packer-plugin-sdk/guestexec	0.029s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/iochan	0.019s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/json	0.017s [no tests to run]
ok  	github.com/hashicorp/packer/packer-plugin-sdk/multistep	0.126s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/multistep/commonsteps	0.136s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/net	1.041s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/packerbuilderdata	0.018s
?   	github.com/hashicorp/packer/packer-plugin-sdk/random	[no test files]
ok  	github.com/hashicorp/packer/packer-plugin-sdk/retry	0.021s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/sdk-internals/communicator/none	0.026s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/sdk-internals/communicator/ssh	0.095s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/sdk-internals/communicator/winrm	0.062s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/shell	0.023s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/shell-local	0.045s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/shell-local/localexec	0.031s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/shutdowncommand	0.032s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/template	0.041s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/template/config	0.033s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate	0.032s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/template/interpolate/aws/secretsmanager	0.030s
?   	github.com/hashicorp/packer/packer-plugin-sdk/tmp	[no test files]
ok  	github.com/hashicorp/packer/packer-plugin-sdk/useragent	0.018s
ok  	github.com/hashicorp/packer/packer-plugin-sdk/uuid	0.019s
?   	github.com/hashicorp/packer/packer-plugin-sdk/version	[no test files]
ok  	github.com/hashicorp/packer/plugin/example	0.040s [no tests to run]
?   	github.com/hashicorp/packer/post-processor/alicloud-import	[no test files]
?   	github.com/hashicorp/packer/post-processor/alicloud-import/version	[no test files]
?   	github.com/hashicorp/packer/post-processor/amazon-import	[no test files]
?   	github.com/hashicorp/packer/post-processor/amazon-import/version	[no test files]
?   	github.com/hashicorp/packer/post-processor/artifice	[no test files]
?   	github.com/hashicorp/packer/post-processor/artifice/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/checksum	0.032s
?   	github.com/hashicorp/packer/post-processor/checksum/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/compress	0.046s
?   	github.com/hashicorp/packer/post-processor/compress/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/digitalocean-import	0.038s
?   	github.com/hashicorp/packer/post-processor/digitalocean-import/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/docker-import	0.036s
?   	github.com/hashicorp/packer/post-processor/docker-import/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/docker-push	0.037s
?   	github.com/hashicorp/packer/post-processor/docker-push/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/docker-save	0.038s
?   	github.com/hashicorp/packer/post-processor/docker-save/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/docker-tag	0.042s
?   	github.com/hashicorp/packer/post-processor/docker-tag/version	[no test files]
?   	github.com/hashicorp/packer/post-processor/exoscale-import	[no test files]
?   	github.com/hashicorp/packer/post-processor/exoscale-import/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/googlecompute-export	0.044s [no tests to run]
?   	github.com/hashicorp/packer/post-processor/googlecompute-export/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/googlecompute-import	0.035s
?   	github.com/hashicorp/packer/post-processor/googlecompute-import/version	[no test files]
?   	github.com/hashicorp/packer/post-processor/manifest	[no test files]
?   	github.com/hashicorp/packer/post-processor/manifest/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/shell-local	0.047s
?   	github.com/hashicorp/packer/post-processor/shell-local/version	[no test files]
?   	github.com/hashicorp/packer/post-processor/ucloud-import	[no test files]
?   	github.com/hashicorp/packer/post-processor/ucloud-import/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/vagrant	0.045s
?   	github.com/hashicorp/packer/post-processor/vagrant/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/vagrant-cloud	0.089s
?   	github.com/hashicorp/packer/post-processor/vagrant-cloud/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/vsphere	0.038s
?   	github.com/hashicorp/packer/post-processor/vsphere/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/vsphere-template	0.047s
?   	github.com/hashicorp/packer/post-processor/vsphere-template/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/yandex-export	0.055s
?   	github.com/hashicorp/packer/post-processor/yandex-export/version	[no test files]
ok  	github.com/hashicorp/packer/post-processor/yandex-import	0.052s
?   	github.com/hashicorp/packer/post-processor/yandex-import/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/ansible	0.469s
?   	github.com/hashicorp/packer/provisioner/ansible/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/ansible-local	0.055s
?   	github.com/hashicorp/packer/provisioner/ansible-local/version	[no test files]
?   	github.com/hashicorp/packer/provisioner/azure-dtlartifact	[no test files]
?   	github.com/hashicorp/packer/provisioner/azure-dtlartifact/version	[no test files]
?   	github.com/hashicorp/packer/provisioner/breakpoint	[no test files]
?   	github.com/hashicorp/packer/provisioner/breakpoint/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/chef-client	0.056s
?   	github.com/hashicorp/packer/provisioner/chef-client/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/chef-solo	0.045s
?   	github.com/hashicorp/packer/provisioner/chef-solo/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/converge	0.033s
?   	github.com/hashicorp/packer/provisioner/converge/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/file	0.051s
?   	github.com/hashicorp/packer/provisioner/file/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/inspec	0.050s
?   	github.com/hashicorp/packer/provisioner/inspec/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/powershell	2.095s
?   	github.com/hashicorp/packer/provisioner/powershell/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/puppet-masterless	0.049s
?   	github.com/hashicorp/packer/provisioner/puppet-masterless/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/puppet-server	0.043s
?   	github.com/hashicorp/packer/provisioner/puppet-server/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/salt-masterless	0.054s
?   	github.com/hashicorp/packer/provisioner/salt-masterless/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/shell	0.085s
?   	github.com/hashicorp/packer/provisioner/shell/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/shell-local	0.071s
?   	github.com/hashicorp/packer/provisioner/shell-local/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/sleep	0.027s
?   	github.com/hashicorp/packer/provisioner/sleep/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/windows-restart	0.051s
?   	github.com/hashicorp/packer/provisioner/windows-restart/version	[no test files]
ok  	github.com/hashicorp/packer/provisioner/windows-shell	0.039s
?   	github.com/hashicorp/packer/provisioner/windows-shell/version	[no test files]
?   	github.com/hashicorp/packer/scripts	[no test files]
?   	github.com/hashicorp/packer/version	[no test files]
2020-12-03 11:32:34 +00:00
Gareth Rees a05c554d14 Amend commit author for license pass 2020-12-03 10:05:07 +00:00
Megan Marsh 863e20ad65 move builder/testing framework into sdk; it imports the core but I think we just need to accept that. It doesn't expose the core directly to the SDK. 2020-12-02 09:46:42 -08:00
Megan Marsh 39354f64e5 move helper/communicator dir into packer-plugin-sdk
fix imports; fix website and generated partials
2020-12-02 08:41:32 -08:00
Megan Marsh 307f56f560 move postprocessor to sdk, fix generation code 2020-12-02 08:41:31 -08:00
Megan Marsh b4bc3f1c7b move provisioner interface into sdk 2020-12-02 08:41:31 -08:00
Megan Marsh faa3832537 extract builder interface to sdk 2020-12-02 08:41:31 -08:00
jhawk28 89199a4c57
WaitForIP should not return an error if an IP is not found (#10321) 2020-12-02 10:30:42 +01:00
Megan Marsh 19bdc8b49e fix conflicts 2020-11-30 14:34:20 -08:00
Megan Marsh 0eff73293a fix imports, vendoring, and linting 2020-11-30 14:30:30 -08:00
Megan Marsh d5971ca25e fix tests by moving mock hooks and communicators, and BasicUi definition, into SDK 2020-11-30 14:30:30 -08:00
Megan Marsh 56a45b04ab Move hook and communicator definitions to packer-plugin-sdk 2020-11-30 14:30:30 -08:00
Megan Marsh a6fdeca099 move logsecretfilter into packer sdk 2020-11-30 14:30:30 -08:00
Megan Marsh 14bdb9516c move Artifact and artifact mock to the sdk 2020-11-30 14:29:52 -08:00
Megan Marsh c70870cb83 move multierror and multierrorappend into sdk 2020-11-30 14:29:06 -08:00
Megan Marsh 001886670d move Ui definition into the packer plugin sdk. 2020-11-30 14:26:54 -08:00
Megan Marsh a56477c2e4
Merge branch 'master' into yandex/prepare-user-data 2020-11-30 13:57:35 -08:00
Megan Marsh 862700b1a5
Merge pull request #10306 from bugfood/fix-attach
allow attaching guest additions without a communicator
2020-11-30 10:58:23 -08:00
Wilken Rivera d82b9d2072
builder/qemu: Add ok check for state values (#10249)
This changes fixes two crashes in `step_run` that expects certain
information to be in state from prior steps. This change requires
testing to ensure the bugs have been fixed.

I believe there may be more state values that need to be checked as they
may not be put into state if a build configuration has attributes that
would skip or otherwise not put data into the statebag.
2020-11-30 10:40:03 -05:00
Corey Hickey fdb36e329d allow attaching guest additions without a communicator
This avoids the error:
* guest_additions_mode has to be 'disable' when communicator = 'none'.

...when the following are set:
"communicator": "none",
"guest_additions_mode": "attach",

This particular combination of parameters is valid; for example, in my
case, a kickstart post-install script mounts the CD image from /dev/sr1
and runs the installer, without needing any intervention from packer
itself.

From my reading of the documentation, it appears that the "upload" mode
would indeed require a communicator, so I change the logic to check for
that specifically.
2020-11-24 15:46:14 -08:00
Roman Mingazeev 2b8fcead23 support shellscript 2020-11-23 17:15:12 +03:00
Roman Mingazeev 0101eb1bb1 support merge cloud user-data 2020-11-23 13:19:50 +03:00
Megan Marsh b50fe930e5
fix retries (#10290) 2020-11-23 09:39:17 +01:00
Megan Marsh 5a804de9a3
Merge pull request #10212 from OblateSpheroid/GH8211
Feat (builder/oracle-oci): support image launch mode
2020-11-20 15:53:18 -08:00
Megan Marsh f4041ee4d0
Merge pull request #10200 from aleksandrserbin/feature/describe-instance-on-fail
amazon-ebs: log state details on change
2020-11-20 15:31:40 -08:00
Megan Marsh 10c1b638b6 fix spaces vs tabs in formatting from github commit resolution 2020-11-20 15:24:43 -08:00
Megan Marsh ba1e60ff35
Update builder/amazon/common/block_device_test.go 2020-11-20 15:15:39 -08:00
Megan Marsh b3401b4f4d
Merge branch 'master' into feature/aws-ebs-io-validation 2020-11-20 15:09:22 -08:00
Megan Marsh 6bf4e89615
Merge pull request #10181 from remyleone/profile
scaleway: use the SDK functions to load profile from file and env
2020-11-20 15:06:50 -08:00
Megan Marsh 8ec7ee0ab7
Merge pull request #10093 from ufukty/digitalocean-connect-with-private-ip
Adds the capability of provisioning with private ip for digitalocean
2020-11-20 14:33:03 -08:00
Megan Marsh 60e62bbb51
Merge pull request #10287 from hashicorp/implement_9990
Add configuration options to add additional storage to a cloned vm
2020-11-20 13:34:56 -08:00
Megan Marsh 030f40a7b6
Merge pull request #10286 from hashicorp/hcl2template_extraction
move hcl2template kv types into the config/custom_types
2020-11-20 12:48:26 -08:00
sylviamoss 99e7ac5f42 fix test and generated code 2020-11-20 17:15:47 +01:00
sylviamoss 3b523e147e add config opt to additional storage to cloned vm 2020-11-20 16:20:46 +01:00
Megan Marsh ea1ac530b0 move hcl2template kv types into the config/custom_types with trilean definitions 2020-11-18 15:46:59 -08:00
Megan Marsh cbaecf9077 remove unused SkipValidation field which was a duplicate of the SkipRegionValidation field.
remove duplicate temporary key pair name
change communicator code
2020-11-18 14:21:40 -08:00
Megan Marsh f8f1ebf0c7 move version and useragent definitions into sdk 2020-11-18 11:42:02 -08:00
Megan Marsh 9e47696dff move helper/config to bundle with the other template definitions 2020-11-18 10:34:59 -08:00
Megan Marsh 007337989e move communicator helpers into communicator dir 2020-11-18 10:24:25 -08:00
Megan Marsh 3f6deb8828 move multistep into the plugin sdk 2020-11-17 16:31:03 -08:00
Megan Marsh 7d658149ea update tests and website and generated partials to reflect new package format 2020-11-17 10:36:01 -08:00
Megan Marsh 1ffc358ada move tmp helper func into packer-plugin-sdk 2020-11-16 15:13:08 -08:00
Megan Marsh 4ead224c3b
Merge pull request #10256 from hashicorp/plugin-sdk-4
Plugin sdk 4
2020-11-16 12:00:06 -08:00
Megan Marsh 94a660147e rename retry so it doesn't stutter 2020-11-16 11:49:33 -08:00
Megan Marsh bf7daa1d93
Merge pull request #10255 from hashicorp/plugin-sdk-3
Plugin sdk 3
2020-11-16 11:36:17 -08:00
Megan Marsh efe11da4a3
Merge pull request #10254 from hashicorp/plugin-sdk-2
Plugin sdk 2
2020-11-16 11:29:20 -08:00
Megan Marsh 220bca460e
Merge pull request #10253 from hashicorp/plugin-sdk-1
Plugin sdk 1
2020-11-16 11:13:59 -08:00
Megan Marsh 3e54e9ea80
Merge pull request #10235 from hashicorp/refactor_version_code
Refactor version code
2020-11-16 11:12:59 -08:00
loloolllool 54afe0b880 Generating new hcl2specs for proxmox builder. 2020-11-14 23:41:16 +01:00
lollen 2bdfd53756 Proxmox-builder pass through boot-order
Adding the boot field supported by Proxmox api and proxmox-api-go library.
This is due to a change in Proxmox to allow for multiple boot harddrives which would break the packer proxmox builder (the hardcoded cdn boot value).

Can be specified like the following example:     
      "disks": [
        {
          "type": "scsi",
          "disk_size": "20G",
          "storage_pool": "vmstorage",
          "storage_pool_type": "lvm"
        }
      ],
      "boot": "order=scsi0;ide2",
      "iso_file": "media:iso/{{ user `ubuntu_iso_file` }}"

Not sure this is ideal, but it's a workaround for the #10252 issue.
2020-11-14 07:27:55 +01:00
Megan Marsh f52a2ad0fa move retry function that is only used by osc builder into that builder's common dir instead of the global common dir. Fix bug in quemu where the wrong retry value is checked against. 2020-11-13 15:24:58 -08:00
Megan Marsh c4d0c5505a fix tests
regenerate code
regenerate code, revendor
fix website
2020-11-13 15:00:12 -08:00
Megan Marsh e04eaa89e6 move steps and step configs from packer/common to packer/common/commonsteps 2020-11-13 11:15:04 -08:00
Megan Marsh 6402362018 create packer-plugin-sdk directory and begin moving the relevant folders into it. 2020-11-13 10:47:36 -08:00
Megan Marsh df9febef1b move communicators into sdk-internals directory 2020-11-13 10:44:07 -08:00
Megan Marsh 6871a3a85d
Merge pull request #10250 from Direnol/yandex/change-disk-creation-method
fix(yandex): change disk creation method to manual
2020-11-13 09:28:10 -08:00
Roman Mingazeev 6be26e50e0
Update builder/yandex/config.go
Co-authored-by: GennadySpb <lipenkov@gmail.com>
2020-11-13 17:27:50 +03:00
Roman Mingazeev 5bf03df694 fix fmt 2020-11-13 16:44:15 +03:00
Roman Mingazeev 6a327b1330 add labels for temp disk 2020-11-13 16:35:48 +03:00
Roman Mingazeev fe9dca4c75 change disk creation method to manual 2020-11-13 16:16:35 +03:00
Megan Marsh 3db40194af version files 2020-11-10 14:48:06 -08:00
Megan Marsh 8ecd16db81 regenerate code 2020-11-10 08:16:59 -08:00
Megan Marsh 1ecd715221 refactor code so that packer/version is not a dependency of sdk code or plugin code 2020-11-09 17:20:42 -08:00
Megan Marsh 2bf912bddf
Merge pull request #10203 from aleksandrserbin/feature/launch-template-tags
amazon-ebs: add tags to launch template
2020-11-09 09:14:02 -08:00
Megan Marsh 88e03280b6
Extract plugin-specific examples to plugin directories (#10228)
* move alicloud examples from common example directory to alicloud builder

* move amazon examples to amazon builder dir

* move examples into ansible provisioner directory

* move azure examples to builder dir

* move hyperone examples into builder directory

* move jdcloud builder examples into builder directory

* move tencent cloud examples into the builder directory

* move ucloud examples into ucloud builder directory
2020-11-09 12:17:41 +01:00
Paul Meyer 5ea90fea5b
Merge pull request #10210 from sumit-kalra/master
[builder/azure-arm] Create keyvaults with SoftDelete enabled
2020-11-06 14:07:41 -08:00
Megan Marsh efc117fb55
Merge pull request #10218 from hashicorp/clean_plugin_sdk
Clean plugin sdk
2020-11-06 12:35:23 -08:00
Simon Gottschlag 65b7d3b604
Add Azure CLI authentication (#10157)
Adds the ability to use an active `az login` session for authenticating the Azure builder
2020-11-06 14:24:16 -05:00
Megan Marsh 2d90ffe7a4 move GeneratedData struct and PlaceholderMsg to same package under common 2020-11-06 10:45:38 -08:00
Megan Marsh f13f3d4d5f fix single tag interpolation to allow golang template engine usage 2020-11-05 16:27:53 -08:00
Megan Marsh 7a1680df97
modify a ton of error messages to make them specifically placable. (#10191)
* modify a ton of error messages to make them specifically placable.
* remove specific loglines but keep the specialized error messages

Co-authored-by: Adrien Delorme <azr@users.noreply.github.com>
2020-11-05 11:27:07 +01:00
Megan Marsh 45b5f0c2ee move custom http client creation with env proxy args into same package as other network related helpers 2020-11-04 14:51:14 -08:00
Megan Marsh 7b57e28600 move localexec to common/shell-local dir since it is related to shelling out locally 2020-11-04 11:56:46 -08:00
Aleksandr Serbin a763c8ab02 amazon: validate IOPS only for io volumes 2020-11-04 20:49:04 +01:00
Aleksandr Serbin 09c2620c48 amazon: validate IOPS max and min values 2020-11-04 20:29:09 +01:00
Megan Marsh 23552bfbd7
Merge pull request #10213 from chrisroberts/vagrant-driv-stderr
Return error if ssh-config command fails
2020-11-04 10:39:23 -08:00
Megan Marsh d8fec2e9e5
move the hyperv-only powershell dependency into the hyperv subdirectory (#10198) 2020-11-04 15:15:43 +01:00
Marin Salinas 8b5e2903b9
feat: add hk endpoint support for osc builder (#10207) 2020-11-04 15:13:37 +01:00
Aleksandr Serbin 0cf9b55c5c amazon-ebs: validate IOPS ratio 2020-11-04 14:37:41 +01:00
Chris Roberts 8248f52ff7 Return error if ssh-config command fails
Update error detection to return an error if the process fails instead
of testing for content in stderr.
2020-11-03 16:20:34 -08:00
Aleksandr Serbin 7cb8af1441 amazon: remove region from state for chroot builder 2020-11-03 22:28:19 +01:00
Aleksandr Serbin 8dab31b548 amazon: use spot tags for launch template tags
- use `spot_tags` instead of `run_tags` for launch template
- move region to `StepRunSpotInstance` from state
2020-11-03 22:16:00 +01:00
js-g 749a1372d2 test (builder/oracle-oci): add config test for LaunchMode 2020-11-03 11:36:11 -05:00
js-g ba6173b84c fix (builder/oracle-oci): remove subnet from LaunchInstanceDetails
Deprecated use. Use subnet in CreateVnicDetails instead.
2020-11-03 11:35:34 -05:00
js-g c3ffb3dc22 feat (builder/oracle-oci): add launch mode property to image 2020-11-03 10:33:23 -05:00
Sumit Kalra 2b69a5f496 azure-arm builder: Create keyvaults with SoftDelete enabled 2020-11-02 20:42:55 -08:00