Megan Marsh
21a849354b
fix hook data loading
2019-12-16 11:22:21 -08:00
Megan Marsh
a125f81fba
add some more comments
2019-12-14 03:44:09 -08:00
Megan Marsh
82367a88f8
reorganize placeholder data call to live with provisioner implementation; force users to use the generated function, therefore forcing validation, for all variables except winrmpassword, by doing a simple string check against the placeholder data.
2019-12-14 03:32:38 -08:00
Megan Marsh
ac570e0cc0
store ssh public and private keys on shared info
2019-12-13 13:15:03 -08:00
Megan Marsh
88d4ce37c9
template functioin to let Provisioners access PACKER_RUN_UUID
2019-12-13 13:03:09 -08:00
Megan Marsh
84063d2132
implement ID and Type values in the provisioner template info sharing
2019-12-13 11:57:01 -08:00
Megan Marsh
e1652696a6
Rather than using reflection to grab the whole SSH config, for now just use the config convenience functions to get the majority of needed values
2019-12-13 10:02:13 -08:00
Megan Marsh
3389d843f0
update all provisioners that used the winrmpassword tooling to use the new generateddata option
2019-12-12 16:42:53 -08:00
Megan Marsh
39fd462b56
change all provision func signatures to use map[string]interface{}
2019-12-12 15:38:32 -08:00
Megan Marsh
5d266b20d0
generated func now validates based on data provided in context, which needs to include the future values if it is to be interpolated properly.
2019-12-11 15:43:38 -08:00
Megan Marsh
528b853178
stub out generated func for validation
2019-12-11 15:43:38 -08:00
Megan Marsh
7616fbcf3f
skip shell local for now
2019-12-11 15:43:38 -08:00
Megan Marsh
6f418d0e54
get data sharing to a working state with the powershell provisioner
2019-12-11 15:43:38 -08:00
Megan Marsh
f4c3501af5
pass struct of generated data into provision() call
2019-12-11 15:43:38 -08:00
Sylvia Moss
096cab9b48
Fix floppy doc markdown typo ( #8458 )
2019-12-06 14:12:11 +01:00
Megan Marsh
76bfaf9da8
Merge pull request #8394 from hashicorp/fix_iso_target_path
...
Don't cache when TargetPath is non-nil
2019-12-02 16:24:56 -08:00
Megan Marsh
a8ffa60b46
remove the already-included packer config from top level struct
2019-11-25 11:24:00 -08:00
Megan Marsh
7d4353864f
use shell struct in shell-local provisioner and post-processor.
2019-11-21 16:47:29 -08:00
Megan Marsh
cf0130b9ed
pick up dropped error
2019-11-20 16:16:33 -08:00
Megan Marsh
9fc8ed02ae
Don't cache when TargetPath is non-nil; this messes up use of the iso_target_path iso template option.
2019-11-20 16:05:24 -08:00
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