777 Commits

Author SHA1 Message Date
DanHam
a9e22a6bb2
Should return the provider by parsing the json in the box metadata file 2019-08-21 14:32:24 +01:00
DanHam
0bf0e7c078
Should return an error when the metadata file is not in the box tar archive
Split out box creation into new helper function
2019-08-21 14:32:24 +01:00
DanHam
063e4bd3e5
Should return an error if the box tar archive is empty 2019-08-21 14:32:24 +01:00
DanHam
9c6b355088
Should return an error if the box is a plain gzip file 2019-08-21 14:32:24 +01:00
DanHam
35d326de39
Add basic workings to function. Return an error if box file is empty 2019-08-21 14:32:23 +01:00
DanHam
6b5cf6dcb2
Should return an error when the box file is missing 2019-08-21 14:32:23 +01:00
DanHam
e8c586175e
Intention: Allow use of artifice pp with vagrant-cloud pp
The Vagrant-Cloud and Vagrant provider (e.g. virtualbox, vmware_desktop
etc.) must be determined differently depending on the builder or
post-processor supplying the artifact.

Adds a wrapper function that:

* Uses the original method of determining the provider when the artifact
  is provided by either the Vagrant builder or Vagrant post-processor
* Uses a new (currently empty) function when the artifact is provided
  via the Artifice post-processor
2019-08-21 14:32:23 +01:00
DanHam
3f4f429c3d
Should return an error when artifact file does not have .box extension 2019-08-21 14:32:23 +01:00
DanHam
57308b0126
Should return an error with an invalid BuilderId 2019-08-21 14:32:23 +01:00
DanHam
1bffdd9bff
Add option to allow box Vagrantfile to be dynamically generated during build 2019-08-13 09:09:28 +01:00
DanHam
19f3a63ee1
Tests: Should not error when template is to be created during build 2019-08-13 09:09:28 +01:00
DanHam
4b042ac402
Tests: Should not error when vagrantfile_template exists 2019-08-13 09:09:27 +01:00
DanHam
8ddbb791a1
Fix typo 2019-08-05 17:25:21 +01:00
Megan Marsh
a87ce366b3
Merge pull request #7835 from hashicorp/google_oauth
replace some bespoke google auth code with code from golang's oauth2 …
2019-07-08 09:48:27 -07:00
Megan Marsh
0dfb3cc56f replace some bespoke google auth code with code from golang's oauth2 library 2019-07-03 14:27:33 -07:00
Marc Falzon
d82c4f0057 fixup! fixup! fixup! fixup! Add Exoscale Import post-processor 2019-07-03 09:28:42 +02:00
Marc Falzon
9ce5f5dcee fixup! fixup! fixup! Add Exoscale Import post-processor 2019-07-02 10:15:09 +02:00
Marc Falzon
00c2df24df Add Exoscale Import post-processor
This change adds a new `exoscale-import` post-processor allowing users
to create Private Templates on Exoscale.
2019-07-01 08:40:26 +02:00
chhaj5236
6b081cc41c
update alicloud builder to use official SDK (#7477) 2019-04-26 10:37:49 +08:00
Adrien Delorme
aee73d745d update code after go mod update 2019-04-11 14:19:24 +02:00
Adrien Delorme
d72040f4fa move retry code into the common/retry pkg and make retry context aware 2019-04-09 17:46:38 +02:00
Adrien Delorme
f555e7a9f2 allow a provisioner to timeout
* I had to contextualise Communicator.Start and RemoteCmd.StartWithUi
NOTE: Communicator.Start starts a RemoteCmd but RemoteCmd.StartWithUi will run the cmd and wait for a return, so I renamed StartWithUi to RunWithUi so that the intent is clearer.
Ideally in the future RunWithUi will be named back to StartWithUi and the exit status or wait funcs of the command will allow to wait for a return. If you do so please read carrefully https://golang.org/pkg/os/exec/#Cmd.Stdout to avoid a deadlock
* cmd.ExitStatus to cmd.ExitStatus() is now blocking to avoid race conditions
* also had to simplify StartWithUi
2019-04-08 20:09:21 +02:00
Adrien Delorme
a81abd297b Merge remote-tracking branch 'origin/master' into context_provisioner 2019-04-08 20:09:01 +02:00
Megan Marsh
9dafa310f3 remove redundant keep_input_artifact code from googlecompute-export and googlecompute-import pps. The behavior coded here was already enforced by the core postprocessor code in packer/build.go 2019-04-03 12:05:38 -07:00
Megan Marsh
1b77b05ce2 remove redundant keep_input_artifact from compress pp and clarify keep behavior in shell-local pp 2019-04-03 12:03:40 -07:00
Megan Marsh
056fcb7cea fix tests and add a few new ones 2019-04-03 11:32:49 -07:00
Adrien Delorme
c4f3dccc14 rename interpolation context from ctx to ictx and contexts to ctx to avoid conflicts 2019-04-03 15:56:15 +02:00
Adrien Delorme
e65115a7a0 contextualize post-processor 2019-04-03 15:55:55 +02:00
Megan Marsh
12fc1fa751 default_keep_input_artifact 2019-04-02 16:51:58 -07:00
Megan Marsh
2c67cd966b
Merge pull request #7396 from c0sco/amazon-import-encryption
Support S3 and AMI encryption in amazon-import post-processor
2019-03-25 17:24:49 -06: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
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
Vadym Haidamaka
4855bc79c9 Add vagrant-cloud post-processor support for the vagrant builder 2019-03-12 05:33:46 +02:00
Matt Stofko
ab4382360d Support S3 and AMI encryption 2019-03-11 13:21:47 -07: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
Davi Vidal
b0e3128125 Improves test message 2019-03-05 14:39:50 +01:00
Davi Vidal
1a94ad14bd Adds test for insecure_skip_tls_verify 2019-03-05 14:37:37 +01:00
Davi Vidal
a2fd287e56 Ignores SSL verification when on premise vagrant cloud 2019-03-05 10:57:11 +01:00
Megan Marsh
3ed9fe6dee remove unused imports
remove HttpClientWithEnvironmentProxy from amazon builders; let access config handle it
2019-03-04 16:42:33 -08:00
Arnaud Dezandee
f9ae926d8f
googlecompute-export: set network project id to builder 2019-03-01 15:12:31 +01:00
Megan Marsh
be21850e32
Merge pull request #7060 from andrewsomething/do-post-processor
Add digitalocean-import post-processor.
2019-02-14 11:58:00 -08:00
Andrew Starr-Bochicchio
37b3305301 Better varibable naming. 2019-02-13 18:55:27 -05:00
Andrew Starr-Bochicchio
ee430d9a40 Only filter on suffix if more than one file. 2019-02-12 20:20:39 -05:00
Andrew Starr-Bochicchio
203b6ca8b4 Prefix env vars w/ 'DIGITALOCEAN_' 2019-02-11 18:20:35 -05:00
Megan Marsh
6cac03044f
Merge pull request #7248 from oceyral/oceyral/feat/add_user_data
Add "custom_data" key to packer manifest post-processor
2019-02-01 11:37:44 -08:00
Olivier Ceyral
4d10d668ee Add "custom_data" key to packer manifest 2019-02-01 10:41:34 +01:00
Megan Marsh
eef4fc7a01
Merge pull request #7222 from Adezandee/gce-post-processors
googlecompute-postprocessors: service account and export configs
2019-01-31 16:58:42 -08:00
Megan Marsh
035c3506ba manually set proxyfromenvironment in default http client for ec2 sessions 2019-01-25 12:33:25 -08:00
Megan Marsh
c63b54a1e7 move http with proxy call into a helper function 2019-01-25 12:32:52 -08:00
Arnaud Dezandee
8975f67901
googlecompute-export: add exporter instance configs 2019-01-25 11:36:18 +01:00