Commit Graph

11924 Commits

Author SHA1 Message Date
Esten Rye ba5385b224 Fix invalid character issue on Windows.
Output from driver includes a `\r` character.  This change adds logic to
trim `\r` and `\n` values from parsed output.

#7414
2019-03-15 20:00:27 -05:00
Megan Marsh 8853fc1946
Merge pull request #7385 from hashicorp/windows_shell_allow_exit_code
allowed_exit_codes for windows-shell and shell provisioners
2019-03-15 16:13:45 -07:00
Megan Marsh d505bc59a0
Merge pull request #7415 from programmer04/improve-name-conflict-msg
fix 7403: Improve error message for conflicting images name
2019-03-15 16:01:41 -07:00
Megan Marsh 24c42e4a1f
Merge pull request #7397 from vhaidamaka/fix-7321
Add vagrant-cloud post-processor support for the vagrant builder
2019-03-15 16:00:05 -07:00
programmer04 596a9cc7ff Improve error message for AWS and Alibaba 2019-03-15 23:38:05 +01:00
Adrien Delorme 6ab28ba89c
Update common/shell/shell.go
be more descriptive
2019-03-15 12:21:27 +01:00
Adrien Delorme 513999b8e7
Close tty on exit (#7411) 2019-03-15 11:10:30 +01:00
Megan Marsh 4e76f51462
Merge pull request #7390 from hashicorp/do_4837
Allow user variables to be interpreted within the variables section o…
2019-03-14 11:22:23 -07:00
Megan Marsh b52ee14776 remove unreachable code 2019-03-14 10:05:10 -07:00
Adrien Delorme b4ec6e2ed2 Create exit_code_test.go 2019-03-14 13:32:46 +01:00
Adrien Delorme a9e9fff3ad docs: refactor comon shell configurations into a partial 2019-03-14 13:12:03 +01:00
Adrien Delorme eedf5e4387 Update shell.go
remove typo
2019-03-14 12:50:19 +01:00
Adrien Delorme a77ce59e36 Update provisioner_test.go
remove unecessary test
2019-03-14 12:48:21 +01:00
Adrien Delorme 72e5ae9ddc use ValidExitCode in provisioners windows-shell, powershell and shell 2019-03-14 12:47:22 +01:00
Adrien Delorme f0a23bb81d common shell provisioner: define a ValidExitCode func 2019-03-14 12:46:32 +01:00
Adrien Delorme 30a65c858a regroup shell provisioner params into a common struct 2019-03-14 11:57:54 +01:00
Adrien Delorme f369ae2178 Update windows-shell.html.md
copy paste valid_exit_codes from powershell.html.md
2019-03-14 11:17:06 +01:00
Adrien Delorme 8fea9439f8 windows-shell provisioner: allow to pass ValidExitCodes 2019-03-14 11:17:06 +01:00
Megan Marsh 721cad1012 update changelog 2019-03-13 16:59:32 -07:00
Megan Marsh e4a189ce5c
Merge pull request #6999 from hashicorp/gogetter
go getter
2019-03-13 16:23:21 -07:00
Megan Marsh 86c3c44afe switch on err type not string 2019-03-13 14:59:05 -07:00
Megan Marsh a62db1a0c6 add tests fixtures 2019-03-13 10:49:13 -07:00
Megan Marsh bf0d7b3620 make it work and add tests 2019-03-13 10:49:13 -07:00
Megan Marsh 7cb31714ad Allow user variables to be interpreted within the variables section of the template. 2019-03-13 10:49:13 -07:00
Adrien Delorme 9f82b75e57 Use the hashicorp/go-getter to download files
* removed packer.Cache and references since packer.Cache is never used except in the download step. The download step now uses the new func packer.CachePath(targetPath) for this, the behavior is the same.
* removed download code from packer that was reimplemented into the go-getter library: progress bar, http download restart, checksuming from file, skip already downloaded files, symlinking, make a download cancellable by context.
* on windows if packer is running without symlinking rights and we are getting a local file, the file will be copied instead to avoid errors.
* added unit tests for step_download that are now CI tested on windows, mac & linux.
* files are now downloaded under cache dir `sha1(filename + "?checksum=" + checksum) + file_extension`
* since the output dir is based on the source url and the checksum, when the checksum fails, the file is auto deleted.
* a download file is protected and locked by a file lock,
* updated docs
* updated go modules and vendors
2019-03-13 12:11:58 +01:00
Megan Marsh 0196d7f835
Merge pull request #7370 from sargun/allow-users-to-specify-custom-block-device-mapping
amazon-chroot: Allow users to specify custom block device mapping
2019-03-12 14:21:23 -07:00
Megan Marsh fe8f9e98eb
Merge pull request #7387 from vhaidamaka/verify-checksum-output
Print VerifyChecksum log for the download as ui.Message output
2019-03-12 11:18:17 -07:00
Vadym Haidamaka 4855bc79c9 Add vagrant-cloud post-processor support for the vagrant builder 2019-03-12 05:33:46 +02:00
Vadym Haidamaka 535dfd9333 Fix typos in the vagrant builder doc 2019-03-12 05:07:55 +02:00
Vadym Haidamaka f736e2aba5 Print VerifyChecksum log for the download as ui.Message output 2019-03-11 22:33:46 +02:00
Matt Stofko ab4382360d Support S3 and AMI encryption 2019-03-11 13:21:47 -07:00
Sargun Dhillon 0e8eb61699 Add documentation around new behaviour of ami_block_device_mappings
Previously, if ami_block_device_mappings was set, and you were building
from an existing image, it would get silently ignored, and changing
root_device_name would be ignored. This changes that behaviour, so
if ami_block_device_mappings is specified, it's respected.
2019-03-11 11:40:49 -07:00
josepand f2b42f2b4b Expose force_delete for openstack builder
Very similar to how its exposed in terraform adds an optional force_delete config entry on the openstack builder.
2019-03-11 18:39:47 +00:00
Megan Marsh 6e442e616c
Merge pull request #7352 from hashicorp/research_7299
use a tty to ui.Ask
2019-03-07 09:47:01 -08:00
Megan Marsh 67fe820465
Merge pull request #7361 from hashicorp/fix_insecure_skip_tls_verify
fix proxy and tls
2019-03-07 09:21:06 -08:00
Adrien Delorme 640e92d75c
Merge pull request #7386 from davividal/improves_builder_vagrant_docs
Fixes dead link
2019-03-07 16:20:25 +01:00
Adrien Delorme c207a84cb8
Update website/source/docs/builders/vagrant.html.md
Co-Authored-By: davividal <davividal@gmail.com>
2019-03-07 16:19:29 +01:00
Adrien Delorme 09df9fcadd
Merge pull request #7381 from LKaemmerling/fix_hcloud_freebsd64
Fix usage of freebsd64 rescue image
2019-03-07 16:10:08 +01:00
Davi Vidal 0fb89ff4c3 Fixes dead link 2019-03-07 15:09:30 +01:00
Lukas Kämmerling 633934369c
Use Context of run method and allow users to cancel the build 2019-03-07 11:41:39 +01:00
Adrien Delorme cda87d777f Update main.go
move machine readable comment to a more logical place.
2019-03-07 09:44:32 +01:00
Lukas Kämmerling cc2267fd2a
Fix usage of rescue system 2019-03-07 07:24:22 +01:00
Megan Marsh a6d1d852bb
Merge pull request #7377 from davividal/vagrant-cloud-disable-ssl-verify
Ignores SSL verification when on premise vagrant cloud
2019-03-06 14:24:42 -08:00
Davi Vidal e3618bdedf Improves insecure_skip_tls_verify doc, expliciting an use case 2019-03-06 21:38:57 +01:00
Adrien Delorme d177a2647a stop piping stdin
setupStdin switched out stdin for a pipe so that we could close the writer end of the pipe when we receive an interrupt so plugins blocked on reading from stdin are unblocked.

But this is now handled using contexts.
2019-03-06 16:47:26 +01:00
Adrien Delorme 55261f1bf3 Update ui_test.go
fix typo and tty usage
2019-03-06 16:09:08 +01:00
Adrien Delorme 94d6fc10f5 init tty in main 2019-03-06 15:52:59 +01:00
Adrien Delorme a7078a1f9b
Merge pull request #7380 from jugatsu/patch-1
Fix typo in vagrant builder description
2019-03-06 15:34:45 +01:00
Davi Vidal 6c3b74bfd3 Adds documentation on insecure_skip_tls_verify 2019-03-06 11:13:25 +01:00
Lukas Kämmerling b6ee0ea736
Fix Format 2019-03-06 08:05:08 +01:00