Megan Marsh
ae184fe31d
ask for VM by name to reduce looping.
2019-11-08 16:20:03 -08:00
nywilken
3522e13b1e
provisioner/shell: Add `env_var_format` support to shell provisioner
...
* Move setting of default EnvVarFormat to the Prepare function
* Add generated hcl2 structure for the updated Shell provisioner config
* Move `EnvVarFormat` field to shared common shell type
* Add description for the `env_var_format` parameter
* Update `env_var_format` when used with `use_env_var_file`
2019-11-06 16:28:56 -05:00
Adrien Delorme
c0db000dc3
Merge pull request #8310 from alrs/resuscitate-common-floppy-tests
...
common: Resuscitate Floppy Tests
2019-11-04 15:50:46 +01:00
Lars Lehtonen
5926997a31
common: remove unused test function getDirectory()
2019-11-02 11:37:41 -07:00
Lars Lehtonen
9a90aa67e6
common: resuscitate TestStepCreateFloppy_missing()
2019-11-02 10:12:31 -07:00
Lars Lehtonen
8e2885e626
common: resuscitate TestStepCreateFloppy_notfound()
2019-11-02 10:10:36 -07:00
Adrien Delorme
819329228a
Change back to make sure all durations are a time.Duration
...
It is simply the best/simplest solution and trying to prevent users from passing and integer here would be like opening a can of worms. Because:
* we cannot make mapstructure validate our duration string ( with an UnmarshalJSON func etc.)
* we cannot make mapstructure spit a string instead of a duration and packer will decode-encode-decode config.
* the hcl2 generated code asks for a string, so this will be enforced by default.
2019-10-31 16:12:07 +01:00
Adrien Delorme
bf3d9841c6
Force durations to be passed a strings
...
Before this commit it was possible to set a duration using an integer or a float. Go's time.Duration is an int64 internally an mapstructure will take advantage of this and load the number as a int64 but `1` means one ns which is unexpected/confusing. To avoid confusion and enforce readability this forces users to pass a string with a unit for a duration; ex "56s".
2019-10-31 11:47:19 +01:00
Megan Marsh
a783a09ea3
Merge pull request #8269 from paulmey/paulmey/generalize-chroot
...
[amazon/chroot] Move common/generic chroot builder steps to common directory
2019-10-24 14:32:01 -07:00
Paul Meyer
3be7d81ce2
Move common steps together
2019-10-24 04:21:46 +00:00
Paul Meyer
e6dfe301ac
Move CommandWrapper & ShellCommand to common
2019-10-24 04:06:29 +00:00
Lars Lehtonen
731e0332cf
common: collect dropped error
2019-10-23 13:02:08 -07:00
Megan Marsh
d15f43e4eb
Merge pull request #8232 from hashicorp/artifact-tree
...
HCL2 configs - part one
2019-10-22 11:54:34 -07:00
Megan Marsh
e5becfc854
Merge pull request #8248 from marcinbojko/master
...
hyper-v fix for compacting only .vhd|.vhdx files
2019-10-21 11:47:15 -07:00
Marcin Bojko
1b4ffe546f
hyper-v fix for compacting vhdx/vhd only
2019-10-19 12:46:34 +02:00
Adrien Delorme
cf1555bf17
Merge remote-tracking branch 'origin/master' into artifact-tree
2019-10-16 10:22:56 +02:00
Vladimír
d6994df188
Select first adapter attached to host OS's switch
...
If more than one vNic is attached to vmSwitch, use the first one only.
2019-10-15 15:14:22 +02:00
Adrien Delorme
078ba7c8c3
commit old code generation tool
...
for history
2019-10-15 12:56:42 +02:00
Adrien Delorme
7be94f41a6
common.shell-local: unexport Ctx field
...
so that it doesn't temper with hcl2 generation
2019-10-15 12:56:42 +02:00
Davor Kapsa
49e4a2d9ef
Add error check
2019-10-09 15:55:07 +02:00
Megan Marsh
843986c2d4
missing bracket
2019-10-04 10:41:12 -07:00
Megan Marsh
59efa0faee
rename option to error-cleanup-privisoner, which I think is clearer
2019-09-25 13:43:29 -07:00
Megan Marsh
5bd8fee708
Creates a final "cleanup" provisioner to run if an error occurs during a provisioning step, allowing users to perform any custom cleanup tasks that must happen on the VM before the VM is shut down and destroyed.
2019-09-24 16:08:15 -07:00
Adrien Delorme
299544a4c7
Merge remote-tracking branch 'origin/master' into scrape_doc_to_builder_struct_config
2019-09-20 14:47:02 +02:00
Lars Lehtonen
a98f2d2170
common: fix dropped errors and warnings in test
2019-09-20 05:06:25 -07:00
Adrien Delorme
3fe9d52e3f
Merge remote-tracking branch 'origin/master' into scrape_doc_to_builder_struct_config
2019-09-20 11:15:44 +02:00
allinwait
34ba03d3cb
use printf for logging
2019-09-13 01:53:42 +03:00
allinwait
171c2a9a07
add the floppy label option
2019-09-12 12:25:22 +00:00
Adrien Delorme
597a3e323b
Merge remote-tracking branch 'origin/master' into scrape_doc_to_builder_struct_config
2019-09-10 13:20:07 +02:00
Adrien Delorme
aa9cc919ab
Merge branch 'master' into circle_ci_windows
2019-09-10 12:54:35 +02:00
Adrien Delorme
146b88ba1e
Merge remote-tracking branch 'origin/master' into scrape_doc_to_builder_struct_config
2019-09-10 12:44:46 +02:00
DanHam
2b6286c31c
Fix powershell formatting. Match style for conditionals
2019-09-09 23:05:40 +01:00
Adrien Delorme
7ba91b7d25
configure_port_test.go: don't panic when error is not what we expected
2019-09-05 17:03:54 +02:00
Marcin Bojko
d4ff29f6c5
hyper-v fix when management interface is not part of virtual switch
...
2
formatting fix
2019-08-22 07:54:50 +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
Megan Marsh
cd3b39ad17
commit generated code
2019-08-12 15:55:43 -07:00
Stephen Fox
a6830f8348
Move 'ui' variable closer to invocation.
2019-07-31 14:08:40 -04:00
Stephen Fox
e362d2f3ee
Use 'log.Printf()' for StepDownload debug instead of 'ui.Say()'.
2019-07-31 14:02:57 -04:00
Megan Marsh
90c5da40f2
implement abort logic and printing for the askstep implementation as well
2019-07-26 12:24:03 -07:00
Megan Marsh
54034689ef
On abort, return gracefully rather than exiting so that the subprocess doesn't unexpectedly disconnect from the parent and cause a confusing EOF error in the logs
2019-07-25 16:32:16 -07:00
Christian Muehlhaeuser
216afbaa8b
Fixed various typos
...
Just a bunch of nit-picky typo fixes.
2019-07-25 06:49:51 +02:00
Megan Marsh
e9549d2688
add test for local fs download
2019-07-22 09:17:48 -07:00
Megan Marsh
197a283b5e
actually check for filepath being present
2019-07-19 10:35:50 -07:00
Megan Marsh
64f16474f8
fix double slash conundrum
2019-07-19 10:16:40 -07:00
WilliamB
aef77771c0
Correct HTTPIP == FALSE on HyperV builder
2019-07-17 03:41:41 -05:00
Megan Marsh
d6d4eb2087
fix some tests and some config behavior to prevent null dereference errors and incorrect precedence between iso checksum and iso checksum url
2019-06-28 15:29:39 -07:00
Megan Marsh
998ef4053f
parse checksum file so that we can use the checksums inside in the vmware-esxi builder stepuploadiso
2019-06-28 14:35:43 -07:00
Megan Marsh
88d589cc88
enable smb share double backslash pathing too
2019-06-26 13:43:05 -07:00
Megan Marsh
12471a8b06
use file getter for smb shares
2019-06-26 13:21:49 -07:00
Adrien Delorme
735b34e01f
Document the virtualbox-iso builder using partials
2019-06-19 17:37:22 +02:00