Commit Graph

146 Commits

Author SHA1 Message Date
Adrien Delorme 51d2aac9f6 SSHPrivateKey => SSHPrivateKeyFile 2018-08-29 14:40:32 +02:00
Megan Marsh 340363a649
Merge pull request #6613 from hashicorp/merge_ssh_config_funcs
Merge ssh config funcs from builders
2018-08-23 16:03:36 -07:00
Megan Marsh 31d4f8af45 use a time.Duration instead of a hardcoded ms 2018-08-23 13:16:01 -07:00
Megan Marsh 918db58604 added new template variables to replace PACKER_KEY_INTERVAL with tunable key and keygroup intervals depending on driver used 2018-08-22 11:37:56 -07:00
Adrien Delorme e5ffa9e5b3 use SSHConfigFunc on right member in builder/parallels/pvm/builder.go 2018-08-22 18:23:23 +02:00
Adrien Delorme 41f6e0334d refactor all copy pasted sshConfig with into communicator.Config.SSHConfigFunc
* still need to append the auth methods into an array for gracefullness
2018-08-22 17:02:23 +02:00
DanHam 475b3978d2
Remove tmp directories created by builder/parallels/common tests 2018-04-30 20:38:03 +01:00
Rickard von Essen 77d0ba492d
parallels-pvm: Add missing compaction of disks 2018-04-26 14:09:17 +02:00
Matthew Hooker 0e80d98805
Merge pull request #6166 from hashicorp/parallelsfixes
forcefully stop parallels vm.
2018-04-23 10:08:35 -07:00
Matthew Hooker 11de2b9759
remove unnecessary log line. 2018-04-19 16:13:24 -07:00
Matthew Hooker c920e0a20b
forcefully stop parallels vm.
also only output parallels version once.
2018-04-19 16:11:29 -07:00
Matthew Hooker c6299972b9
s/boot_command/bootcommand/ 2018-04-19 14:26:31 -07:00
Matthew Hooker 7990966a09
fix boot command config struct name 2018-04-19 14:26:31 -07:00
Matthew Hooker e662927623
Implement boot config struct for parallels 2018-04-19 14:26:30 -07:00
Matthew Hooker 94129b7fe3
we're using PC-XT (set1) not PC-AT 2018-04-19 14:26:30 -07:00
Matthew Hooker a46a7afa20
Remove old tests. 2018-04-19 14:26:29 -07:00
Matthew Hooker 59376294ef
Maximize scancode throughput.
Let's cache the scancodes and flush them at the end. Also make sure to
send only as many as the driver can send correctly. It's important here
to chunk the scancodes correctly, so that we don't accidentally split them
over successive calls to the driver
2018-04-19 14:26:29 -07:00
Matthew Hooker 9b7704c714
Implement new parser for Parallels boot command 2018-04-19 14:26:29 -07:00
Josh Soref dc942a0d8a spelling: first 2018-03-13 07:50:00 +00:00
Josh Soref 041a115f65 spelling: existent 2018-03-13 08:15:56 +00:00
Josh Soref 935c8e9a28 spelling: configuration 2018-03-13 08:19:16 +00:00
Josh Soref 47a4bbd9f5 spelling: compaction 2018-03-13 07:22:09 +00:00
Matthew Hooker 8cd403425e
test fixes WIP 2018-01-24 17:09:17 -08:00
Matthew Hooker 7a189a83a1
fix imports
`find . -type f -name '*.go' -not -path "./vendor/*" -exec goimports -w {} \;`
2018-01-24 17:09:17 -08:00
Matthew Hooker a831d522be
change run signatures
Run now takes a context as well as a statebag. We'll assign the context
to the blank identifier to prevent namespace collisions. We'll let the
step authors opt-in to using the context.

`find . -iname "step_*.go" -exec gsed -i'' 's/func \(.*\)Run(/func \1Run(_ context.Context, /' {} \;`
2018-01-24 17:09:17 -08:00
Matthew Hooker 366dc3da0a
move multistep imports to helper.
gomvpkg -from "github.com/mitchellh/multistep" -to "github.com/hashicorp/packer/helper/multistep"
2018-01-24 17:09:15 -08:00
Jake Champlin 2d3ee06ecd Remove LGPL dependencies
This changeset performs the following:

- Updates `masterzen/winrm` vendor to include change from (https://github.com/masterzen/winrm/pull/73).
- Removes `masterzen/xmlpath` dependency, as it is licensed under the LGPL license.
- Updates `dylanmei/winrmtest` vendor to include change from (https://github.com/dylanmei/winrmtest/pull/4).
- Updates `packer-community/winrmcp` vendor to include the removal of the `masterzen/winrm/winrm` sub-class as a result of the `winrm` CLI tool being removed from the `masterzen/winrm` repository.
- Updates nested dependencies as a result of the above vendor changes.
- Refactors `parallels/driver_9` to use `goxpath` instead of `xmlpath`, as `xmlpath` is licensed under LGPL.
- Adds a basic unit test for the refactor work in `parallels/driver_9` to confirm functionality.

This should completely remove any LGPL licensed dependencies inside of the Packer project.

```
$ make test
/home/jake/src/go/src/github.com/hashicorp/packer/scripts/gofmtcheck.sh $(find . -not -path "./vendor/*" -name "*.go")
==> Checking that code complies with gofmt requirements...
Check passed.
ok      github.com/hashicorp/packer     0.044s
ok      github.com/hashicorp/packer/builder/alicloud/ecs        0.055s
ok      github.com/hashicorp/packer/builder/amazon/chroot       0.040s
ok      github.com/hashicorp/packer/builder/amazon/common       0.021s
ok      github.com/hashicorp/packer/builder/amazon/ebs  0.016s
ok      github.com/hashicorp/packer/builder/amazon/ebssurrogate 0.015s
ok      github.com/hashicorp/packer/builder/amazon/ebsvolume    0.014s
ok      github.com/hashicorp/packer/builder/amazon/instance     0.058s
ok      github.com/hashicorp/packer/builder/azure/arm   2.833s
ok      github.com/hashicorp/packer/builder/azure/common        0.018s
?       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/pkcs12        0.120s
ok      github.com/hashicorp/packer/builder/azure/pkcs12/rc2    0.020s
ok      github.com/hashicorp/packer/builder/cloudstack  0.038s
ok      github.com/hashicorp/packer/builder/digitalocean        0.015s
ok      github.com/hashicorp/packer/builder/docker      0.028s
ok      github.com/hashicorp/packer/builder/file        0.029s
ok      github.com/hashicorp/packer/builder/googlecompute       3.162s
ok      github.com/hashicorp/packer/builder/hyperv/common       0.006s
ok      github.com/hashicorp/packer/builder/hyperv/iso  0.042s
ok      github.com/hashicorp/packer/builder/null        0.018s
ok      github.com/hashicorp/packer/builder/oneandone   0.022s
ok      github.com/hashicorp/packer/builder/openstack   0.052s
ok      github.com/hashicorp/packer/builder/parallels/common    2.549s
ok      github.com/hashicorp/packer/builder/parallels/iso       0.050s
ok      github.com/hashicorp/packer/builder/parallels/pvm       0.033s
ok      github.com/hashicorp/packer/builder/profitbricks        0.023s
ok      github.com/hashicorp/packer/builder/qemu        0.039s
ok      github.com/hashicorp/packer/builder/triton      0.018s
ok      github.com/hashicorp/packer/builder/virtualbox/common   5.533s
ok      github.com/hashicorp/packer/builder/virtualbox/iso      0.044s
ok      github.com/hashicorp/packer/builder/virtualbox/ovf      0.012s
ok      github.com/hashicorp/packer/builder/vmware/common       5.325s
ok      github.com/hashicorp/packer/builder/vmware/iso  0.076s
ok      github.com/hashicorp/packer/builder/vmware/vmx  0.010s
ok      github.com/hashicorp/packer/command     0.062s
ok      github.com/hashicorp/packer/common      0.053s
ok      github.com/hashicorp/packer/common/json 0.003s [no tests to run]
ok      github.com/hashicorp/packer/common/powershell   0.015s
?       github.com/hashicorp/packer/common/powershell/hyperv    [no test files]
?       github.com/hashicorp/packer/common/ssh  [no test files]
ok      github.com/hashicorp/packer/common/uuid 0.010s
ok      github.com/hashicorp/packer/communicator/none   0.008s
ok      github.com/hashicorp/packer/communicator/ssh    0.068s
ok      github.com/hashicorp/packer/communicator/winrm  0.046s
ok      github.com/hashicorp/packer/fix 0.005s
ok      github.com/hashicorp/packer/helper/builder/testing      0.007s
ok      github.com/hashicorp/packer/helper/communicator 0.013s
ok      github.com/hashicorp/packer/helper/config       0.004s
?       github.com/hashicorp/packer/helper/enumflag     [no test files]
ok      github.com/hashicorp/packer/helper/flag-kv      0.009s
ok      github.com/hashicorp/packer/helper/flag-slice   0.006s
ok      github.com/hashicorp/packer/packer      0.219s
ok      github.com/hashicorp/packer/packer/plugin       0.233s
ok      github.com/hashicorp/packer/packer/rpc  0.141s
ok      github.com/hashicorp/packer/plugin/example      0.008s [no tests to run]
?       github.com/hashicorp/packer/post-processor/alicloud-import      [no test files]
?       github.com/hashicorp/packer/post-processor/amazon-import        [no test files]
ok      github.com/hashicorp/packer/post-processor/artifice     0.003s [no tests to run]
ok      github.com/hashicorp/packer/post-processor/atlas        0.018s
ok      github.com/hashicorp/packer/post-processor/checksum     0.015s
ok      github.com/hashicorp/packer/post-processor/compress     0.047s
ok      github.com/hashicorp/packer/post-processor/docker-import        0.012s
ok      github.com/hashicorp/packer/post-processor/docker-push  0.012s
ok      github.com/hashicorp/packer/post-processor/docker-save  0.008s
ok      github.com/hashicorp/packer/post-processor/docker-tag   0.008s
ok      github.com/hashicorp/packer/post-processor/googlecompute-export 0.015s [no tests to run]
?       github.com/hashicorp/packer/post-processor/manifest     [no test files]
ok      github.com/hashicorp/packer/post-processor/shell-local  0.028s
ok      github.com/hashicorp/packer/post-processor/vagrant      0.030s
ok      github.com/hashicorp/packer/post-processor/vagrant-cloud        0.028s
ok      github.com/hashicorp/packer/post-processor/vsphere      0.014s
ok      github.com/hashicorp/packer/provisioner 0.011s
ok      github.com/hashicorp/packer/provisioner/ansible 0.140s
ok      github.com/hashicorp/packer/provisioner/ansible-local   0.056s
ok      github.com/hashicorp/packer/provisioner/chef-client     0.050s
ok      github.com/hashicorp/packer/provisioner/chef-solo       0.061s
ok      github.com/hashicorp/packer/provisioner/converge        0.018s
ok      github.com/hashicorp/packer/provisioner/file    0.015s
ok      github.com/hashicorp/packer/provisioner/powershell      0.168s
ok      github.com/hashicorp/packer/provisioner/puppet-masterless       0.008s
ok      github.com/hashicorp/packer/provisioner/puppet-server   0.031s
ok      github.com/hashicorp/packer/provisioner/salt-masterless 0.010s
ok      github.com/hashicorp/packer/provisioner/shell   0.010s
ok      github.com/hashicorp/packer/provisioner/shell-local     0.037s
ok      github.com/hashicorp/packer/provisioner/windows-restart 0.180s
ok      github.com/hashicorp/packer/provisioner/windows-shell   0.159s
?       github.com/hashicorp/packer/scripts     [no test files]
ok      github.com/hashicorp/packer/template    0.008s
ok      github.com/hashicorp/packer/template/interpolate        0.004s
?       github.com/hashicorp/packer/version     [no test files]
```
2017-08-30 12:10:12 -07:00
Rickard von Essen 8a035ddb8a
parallels: Remove soon to be removed --vmtype flag
In the next release of Parallels Desktop for Mac Pro Ed. the prlctl createvm
command doen't support the --vmtype flag anymore.
2017-07-26 07:27:08 +02:00
Andy Goldstein c6dba6c051 Parallels: skip missing paths when looking for unnecessary files 2017-06-23 14:29:07 -04:00
Matthew Hooker ee5d13611f
update ssh client usage for new crypto/ssh version 2017-05-18 12:01:44 -07:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker 4fcbf75da9
s/non existent/nonexistent/ 2017-03-29 12:38:33 -07:00
Matthew Hooker 230079f73a
spell fixes 2017-03-28 20:36:19 -07:00
huiyang b3c6ef9f6b Skip disk compaction for plain disks 2017-03-07 18:22:23 -08:00
huiyang 52d4514d6a builder/parallels-iso: Configuration of disk type, plain or expanding 2017-03-03 15:32:51 -08:00
Matthew Hooker 22d1322bd9
always check for an error first when walking a path 2017-01-26 16:32:21 -08:00
Matthew Hooker f1175c1921
parallels/vmware: don't wait for shutdown command.
Resolves #4134

replaces/ closes #4379

Leaving Hyper-V builder alone for now until we can get a case that reproduces.
2017-01-20 01:44:18 -08:00
Matthew Hooker d2e59e4e92
set PACKER_HTTP_ADDR env var when available.
If using a builder that has an http server set up for file transfer,
expose the connection info to the shell provisioner through the environment
variable PACKER_HTTP_ADDR.

Closes #2869
2017-01-16 23:19:52 -08:00
Rickard von Essen 85cf00069f Merge pull request #4294 from legal90/iso-target-extension
Add "iso_target_extension" option for all local *-iso builders
2017-01-04 13:48:28 +01:00
Mikhail Zholobov 57d07f227a
Add "iso_target_extension" option for all local *-iso builders
This option allows to set the extension of the ISO file after download.
Defaults to "iso". It makes sense for building Mac OS X guests, where the
bootable image is actually a DMG, not an ISO.
In particular, it is important for "parallels-iso" builder to set the right extension.
2016-12-17 12:50:30 +02:00
Mikhail Zholobov aa623e22a3
golint: Add comments for exported methods 2016-12-17 00:37:04 +02:00
Mikhail Zholobov 73d87b07de
golint: Fix lint offences 2016-12-17 00:37:03 +02:00
Mikhail Zholobov 00a90e622b
Remove unused constant "KeyLeftShift" 2016-12-17 00:37:03 +02:00
Mikhail Zholobov 1ca841b499
Fix shadowed declarations
Performed by "go vet" tool
2016-12-17 00:37:03 +02:00
Mikhail Zholobov dde445bd0d
Fix style: Organize imports in groups
Performed by "goimports" tool
Style conventions: https://github.com/golang/go/wiki/CodeReviewComments#imports
2016-12-17 00:37:03 +02:00
Mikhail Zholobov 319b85cb7a
Fix style: Use a consistent case for initialisms
https://github.com/golang/go/wiki/CodeReviewComments#initialisms
2016-12-17 00:36:56 +02:00
Rickard von Essen 96e9a8e6e9 Removed default value for ssh_username 2016-11-17 22:30:34 +01:00
Matthew Hooker d920b3fbf4 run gofmt 2016-11-01 14:08:04 -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