Commit Graph

639 Commits (72166febee89db489655938a047500a4569c6b3e)

Author SHA1 Message Date
Lars Lehtonen 9a90aa67e6
common: resuscitate TestStepCreateFloppy_missing()
7 years ago
Lars Lehtonen 8e2885e626
common: resuscitate TestStepCreateFloppy_notfound()
7 years ago
Adrien Delorme 819329228a Change back to make sure all durations are a time.Duration
7 years ago
Adrien Delorme bf3d9841c6 Force durations to be passed a strings
7 years ago
Megan Marsh a783a09ea3
Merge pull request #8269 from paulmey/paulmey/generalize-chroot
7 years ago
Paul Meyer 3be7d81ce2 Move common steps together
7 years ago
Paul Meyer e6dfe301ac Move CommandWrapper & ShellCommand to common
7 years ago
Lars Lehtonen 731e0332cf common: collect dropped error
7 years ago
Megan Marsh d15f43e4eb
Merge pull request #8232 from hashicorp/artifact-tree
7 years ago
Megan Marsh e5becfc854
Merge pull request #8248 from marcinbojko/master
7 years ago
Marcin Bojko 1b4ffe546f
hyper-v fix for compacting vhdx/vhd only
7 years ago
Adrien Delorme cf1555bf17 Merge remote-tracking branch 'origin/master' into artifact-tree
7 years ago
Vladimír d6994df188
Select first adapter attached to host OS's switch
7 years ago
Adrien Delorme 078ba7c8c3 commit old code generation tool
7 years ago
Adrien Delorme 7be94f41a6 common.shell-local: unexport Ctx field
7 years ago
Davor Kapsa 49e4a2d9ef
Add error check
7 years ago
Megan Marsh 843986c2d4 missing bracket
7 years ago
Megan Marsh 59efa0faee rename option to error-cleanup-privisoner, which I think is clearer
7 years ago
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.
7 years ago
Adrien Delorme 299544a4c7 Merge remote-tracking branch 'origin/master' into scrape_doc_to_builder_struct_config
7 years ago
Lars Lehtonen a98f2d2170
common: fix dropped errors and warnings in test
7 years ago
Adrien Delorme 3fe9d52e3f Merge remote-tracking branch 'origin/master' into scrape_doc_to_builder_struct_config
7 years ago
allinwait 34ba03d3cb use printf for logging
7 years ago
allinwait 171c2a9a07 add the floppy label option
7 years ago
Adrien Delorme 597a3e323b Merge remote-tracking branch 'origin/master' into scrape_doc_to_builder_struct_config
7 years ago
Adrien Delorme aa9cc919ab Merge branch 'master' into circle_ci_windows
7 years ago
Adrien Delorme 146b88ba1e Merge remote-tracking branch 'origin/master' into scrape_doc_to_builder_struct_config
7 years ago
DanHam 2b6286c31c
Fix powershell formatting. Match style for conditionals
7 years ago
Adrien Delorme 7ba91b7d25 configure_port_test.go: don't panic when error is not what we expected
7 years ago
Marcin Bojko d4ff29f6c5 hyper-v fix when management interface is not part of virtual switch
7 years ago
Adrien Delorme 4cb7c30987 Merge remote-tracking branch 'origin/master' into scrape_doc_to_builder_struct_config
7 years ago
Megan Marsh cd3b39ad17 commit generated code
7 years ago
Stephen Fox a6830f8348 Move 'ui' variable closer to invocation.
7 years ago
Stephen Fox e362d2f3ee Use 'log.Printf()' for StepDownload debug instead of 'ui.Say()'.
7 years ago
Megan Marsh 90c5da40f2 implement abort logic and printing for the askstep implementation as well
7 years ago
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
7 years ago
Christian Muehlhaeuser 216afbaa8b
Fixed various typos
7 years ago
Megan Marsh e9549d2688 add test for local fs download
7 years ago
Megan Marsh 197a283b5e actually check for filepath being present
7 years ago
Megan Marsh 64f16474f8 fix double slash conundrum
7 years ago
WilliamB aef77771c0 Correct HTTPIP == FALSE on HyperV builder
7 years ago
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
7 years ago
Megan Marsh 998ef4053f parse checksum file so that we can use the checksums inside in the vmware-esxi builder stepuploadiso
7 years ago
Megan Marsh 88d589cc88 enable smb share double backslash pathing too
7 years ago
Megan Marsh 12471a8b06 use file getter for smb shares
7 years ago
Adrien Delorme 735b34e01f Document the virtualbox-iso builder using partials
7 years ago
Adrien Delorme 4c1abf828c
Merge branch 'master' into scrape_doc_to_builder_struct_config
7 years ago
Megan Marsh 8d25cc578f
Merge pull request #7746 from hashicorp/fix_7671
7 years ago
Adrien Delorme daa9f9d34e Merge remote-tracking branch 'origin/master' into scrape_doc_to_builder_struct_config
7 years ago
Adrien Delorme 425ad1c67e generate Shutdown command docs from strutc & use in hyperv
7 years ago
Adrien Delorme c11ef90cb6 use interpolate.NewContext() instead of testConfigTemplate(t)
7 years ago
Adrien Delorme 926c8bbaa6 refactor ShutdownConfig into a single struct
7 years ago
Adrien Delorme 24fad50b00 hyperv-iso: document boot config, http & floppy from partials
7 years ago
Adrien Delorme 3bb8c92902 qemu: document boot command from struct
7 years ago
Adrien Delorme b48d22b43b qemu: document FloppyConfig from struct
7 years ago
Adrien Delorme 3b66cac617 document HTTPConfig from struct
7 years ago
Megan Marsh 2e821da84b check to make sure a vm-name isn't already in use before trying to launch a vm with said name.
7 years ago
Adrien Delorme dbfadc0eea generate struct markdown from common/iso_config.go
7 years ago
Adrien Delorme 20a152d4aa add comments to common/iso_config.go from docs
7 years ago
Adrien Delorme ca33f8bc5c Revert "Backoff.Linear: panic when InitialBackoff > MaxBackoff"
7 years ago
Adrien Delorme 39cfacd5fa Backoff.Linear: panic when InitialBackoff > MaxBackoff
7 years ago
Adrien Delorme 36e4eaff99 document retry.Backoff better
7 years ago
Radek Simko 8519da6ce9
common/net: Cleanup cache of used port after closing
7 years ago
Adrien Delorme b329073e54 remove trying port log as retry code will show errors
7 years ago
Adrien Delorme 38f789eedc add error types to test for
7 years ago
Adrien Delorme 14f2d1c132 ListenRangeConfig:Listen: use the retry pkg to wait a bit in between opens
7 years ago
Adrien Delorme e14d1b8b0b add a timeout trying to open a random port
7 years ago
Adrien Delorme 2fd7adffc4 add tests for ListenRangeConfig.Listen
7 years ago
Adrien Delorme d9e5145de9 Shadow the flock pkg & add a noop filelock so that at least the solaris binary can be built
7 years ago
Adrien Delorme 5d9d43c01d add tests for ListenRangeConfig.Listen
7 years ago
Adrien Delorme fd63ec9a6c ListenRangeConfig.Listen: move trying port log after fslock trylock for less logs
7 years ago
Adrien Delorme 79ae62801f ListenRangeConfig: default network ( protocol ) to tcp
7 years ago
Adrien Delorme 65be2be38b step_download: force copy of local files only on windows
7 years ago
Adrien Delorme 200e26ea85 Step download: always copy local files
7 years ago
Adrien Delorme 9f1136db77 retry: encapsulate & return the last seen error in a RetryExhaustedError
7 years ago
Megan Marsh e69d95eb37 when retries were exhausted in the retry Run, we were returning nil instead of an error.
7 years ago
Adrien Delorme 5f0259fe89 step download: don't fail when checksum_type is not set
7 years ago
Adrien Delorme 4dc12701d3 step_download: display clearer error messages, also when the checksum is not set
7 years ago
Megan Marsh 78cf1405ab
Merge pull request #7480 from BobSilent/fix-hyperv-multiple-hostadapter-same-switch
7 years ago
Adrien Delorme 9ac8d8aed8 step download: ovf files usually point to a file in the same directory, using them in place is the only way
7 years ago
Adrien Delorme 63f5bbbc73 use our own copy of iochan.LineReader
7 years ago
Adrien Delorme d72040f4fa move retry code into the common/retry pkg and make retry context aware
7 years ago
BobSilent 5b289f67fe Update hyperv.go
7 years ago
Adrien Delorme f555e7a9f2 allow a provisioner to timeout
7 years ago
Adrien Delorme a81abd297b Merge remote-tracking branch 'origin/master' into context_provisioner
7 years ago
Megan Marsh 3e72e65a6c
Merge pull request #7456 from hashicorp/do_5770
7 years ago
Megan Marsh 217a93fc30 fix build_test.go on windows. This code needs to not be run in parallel, or else there can be race conditions with the post-processors all trying to access the same file at once. Additionally, I changed the test template itself so that it is valid code on either bash or cmd. Finally, I found and fixed a small bug in naming the file extensions in shell local inline scripts.
7 years ago
Adrien Delorme c4f3dccc14 rename interpolation context from ctx to ictx and contexts to ctx to avoid conflicts
7 years ago
Adrien Delorme 82c4b76639 [Builder|Build|PostProcessor|Provisioner|Hook]Server: context cancel using a RPC cancel method
7 years ago
Adrien Delorme 14048b1e11 Revert "WIP: go towards context cancelled rpc pkg"
7 years ago
Adrien Delorme 9e3a179c0d WIP: go towards context cancelled rpc pkg
7 years ago
Adrien Delorme 829851fc8a change hooks to be passed a context for cancellation
7 years ago
Adrien Delorme 9836dad0c9 introduce the clean_resource_name to clean image names and deprecate the old ones
7 years ago
Adrien Delorme 91cc7e1091 net.ListenRangeConfig.Listen: don't swap ports if max < min
7 years ago
Adrien Delorme a4a83be2b9 net.ListenRangeConfig.Listen: allow to have a port rage of zero
7 years ago
Adrien Delorme cd39aa9988 net.ListenRangeConfig.Listen: log tried ports a bit earlier in the process
7 years ago
Adrien Delorme 5a6dffde9a use port as ints
7 years ago
Adrien Delorme c214f6735b make everything a uint
7 years ago
Adrien Delorme 51294287fa StepHTTPServer: display error if we could not connect
7 years ago
Adrien Delorme 6df4128517 StepHTTPServer: use the common/net pkg
7 years ago
Adrien Delorme 1685a1c4c0 add common/net package that can listen on a random port in a range
7 years ago
Adrien Delorme 6ab28ba89c
Update common/shell/shell.go
7 years ago
Adrien Delorme b4ec6e2ed2 Create exit_code_test.go
7 years ago
Adrien Delorme eedf5e4387 Update shell.go
7 years ago
Adrien Delorme f0a23bb81d common shell provisioner: define a ValidExitCode func
7 years ago
Adrien Delorme 30a65c858a regroup shell provisioner params into a common struct
7 years ago
Adrien Delorme 9f82b75e57 Use the hashicorp/go-getter to download files
7 years ago
Vadym Haidamaka f736e2aba5 Print VerifyChecksum log for the download as ui.Message output
7 years ago
Megan Marsh 3dc1dafe58
Merge pull request #7287 from stephen-fox/ephemeral-ssh-key-pair-issue-7225
7 years ago
Stephen Fox 56c17941fe Added comment to authorized_keys 'sed' calls per review.
7 years ago
Megan Marsh 2a9f49a5c6 make sure we don't try to load an iso into memory because of a user mistake
7 years ago
xinau 36c1e8d838 moved adapter to common package
7 years ago
Stephen Fox 354fcc5cc6 Merge branch 'master' into 'ephemeral-ssh-key-pair-issue-7225'.
7 years ago
Stephen Fox e40aa515f2 Added TODO about public key removal logic.
7 years ago
Megan Marsh 2d3f84abf0
Merge pull request #7271 from hashicorp/make_generate
7 years ago
Stephen Fox 4c2851013e Fixed 'sed' regex to remove public key by magic string.
7 years ago
Adrien Delorme 8621949e01 make generate
7 years ago
Megan Marsh 482ba644a8 quote variables in powershell script to account for spaces
7 years ago
Megan Marsh 3602180b45 re-add missing import
7 years ago
Megan Marsh c63b54a1e7 move http with proxy call into a helper function
7 years ago
Tom Parker-Shemilt d72fb9bcb3 If checksums for a download don't match, display the checksum that was found
7 years ago
Megan Marsh 97a791389a deduplicate step_output_dir and move to common folder
7 years ago
Adrien Delorme 9f2a3bdfbc
Merge pull request #7181 from hashicorp/python_shell_docs
7 years ago
Megan Marsh a2c3de9396 remove outdated logline
7 years ago
Adrien Delorme 9f7b4ffc17
Merge branch 'master' into pr/6950
7 years ago
Adrien Delorme 19cbb9cb24
Merge pull request #7136 from hashicorp/fix_5984
7 years ago
Megan Marsh 93053e0488 update comments
7 years ago
Megan Marsh 9557f3eea7 use script options struct rather than passing all the variables around an extra time
7 years ago
Megan Marsh a1b3b63cb9 use golang templating logic
7 years ago
Ladar Levison e6de727c25
Fix the Hyper-V gen 1 guest boot order.
7 years ago
Megan Marsh f26051a7da code comments yo
7 years ago
Megan Marsh 24d2cc34e5 tests
7 years ago
Megan Marsh 427a35fc7e tests
7 years ago
Megan Marsh d4de89e057 move powershell templating into separate script so we can test it
7 years ago
Megan Marsh 006682a09c add version option and also refactor powershell script to use golang templates for ease of testing and variable passing.
7 years ago
Ladar Levison 348c267054 Updated support for legacy network adapters on Hyper-V.
7 years ago
Megan Marsh b95123f457 add new copy_in_compare flag so users can set the copy var to whatever they need in order to get the compatibility report to work.
7 years ago
Adrien Delorme b7222d1f56 Add tmp package that offers Dir & File funcs
7 years ago
Anish Bhatt d5f88b154f
Better fix for #7095
7 years ago
Anish Bhatt 916375183b
Don't run StepCleanupTempKeys when communicator is set to none
7 years ago
Megan Marsh e69391f28b save users some bash scripting by exposing IP and port separately as well as together
7 years ago
pgrmega 2d1e3efadb
Fix a problem when calling Hyper-V\Compare-VM PowerShell cmdlet (#6726)
8 years ago
Megan Marsh f9ceaee4f1 fix variable casing convention
8 years ago
Joel Vasallo 5d17b3de84 fix: config validator output
8 years ago
Joel Vasallo 23ad90f2c4 fix: condensed and simplified os check logic and added validate output
8 years ago
Joel Vasallo d408c9e69c fix: moved os check to entry of func
8 years ago
Joel Vasallo 0912adea34 fix: converted onlyon param to only_on and added validation step
8 years ago
Joel Vasallo 25c0b98363 feat: ability to specify runtime OSs where shell-local should run
8 years ago
Adrien Delorme 02ba6ccfab make common/iso_config_test.go invisible to windows
8 years ago
Megan Marsh 847a3b0061 provide useful powershell error
8 years ago