Commit Graph

42 Commits

Author SHA1 Message Date
Megan Marsh 39ab646236
move plugin and rpc code into sdk; other minor tweaks (#10359) 2020-12-09 12:39:54 +01:00
Megan Marsh 5576bb5caa move packer config constants next to the packer config 2020-12-03 10:17:35 -08:00
Megan Marsh bf6ab0c290 fix tests 2020-12-01 15:02:15 -08:00
Megan Marsh d5971ca25e fix tests by moving mock hooks and communicators, and BasicUi definition, into SDK 2020-11-30 14:30:30 -08:00
Megan Marsh a6fdeca099 move logsecretfilter into packer sdk 2020-11-30 14:30:30 -08:00
Megan Marsh 9e47696dff move helper/config to bundle with the other template definitions 2020-11-18 10:34:59 -08:00
Megan Marsh 6402362018 create packer-plugin-sdk directory and begin moving the relevant folders into it. 2020-11-13 10:47:36 -08:00
Sylvia Moss 9181a435aa
Make max_retries a string to allow variable interpolation (#9673) 2020-08-05 17:41:20 +02:00
Adrien Delorme 44616d3bff
refactor initialization out from packer configs + tests (#9627)
The initialization of packer core in JSON also validates that `null` variables were set, except in the case of `packer validate --syntax-only` , but after the refactor to allow to have all commands work with HCL2 and JSON this subtlety was lost.

This refactors the initialisation of the core in order to allow to have `packer validate --syntax-only` not error in case a variable is not set. Since these calls are refactored this works for HCL2 too.

fix #9478
2020-07-24 10:58:03 +02:00
Adrien Delorme e50eb341bf Update core_test.go 2020-04-30 16:40:58 +02:00
Sylvia Moss 553b1fb9f8
Add RetriedProvisioner to allow retry provisioners (#9061) 2020-04-16 11:58:54 +02:00
Megan Marsh 32595f71cf sort interpolation input to make the interpolation deterministic 2020-03-12 13:40:56 -07:00
Megan Marsh 17f59c4ddc fix regex and actually test the check function 2020-03-12 10:00:56 -07:00
Megan Marsh 051155270f add test for fixed behavior 2020-03-11 12:48:35 -07:00
Megan Marsh 52f03de0f0 adding tests 2020-03-11 10:49:45 -07:00
Sylvia Moss 328eb8ee96
Interpolate boot_command when defined by user variable (#8640) 2020-01-27 19:10:16 +01:00
Lars Lehtonen a709867dee
packer: remove unused testComponentFinder() 2019-11-04 12:50:58 -08:00
Adrien Delorme 3b8f3c5a8b remove any reference to Push 2019-09-16 16:38:17 +02:00
Megan Marsh 1a9adc29b3 fixing interpolation
fix sensitive_vars test which never worked but somehow was passing before this change.
2019-06-10 11:30:52 -07:00
Adrien Delorme a81abd297b Merge remote-tracking branch 'origin/master' into context_provisioner 2019-04-08 20:09:01 +02:00
Megan Marsh c1960840e3 fix tests 2019-04-03 11:01:52 -07:00
Adrien Delorme a4bf94dd3c change Builder to be passed a context for cancellation
we have to to give it to our hook
2019-04-03 15:55:55 +02: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 bf0d7b3620 make it work and add tests 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 8a6441a7a5 add tests for SensitiveVars 2018-08-21 10:28:22 -07:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Mitchell Hashimoto 2498ad02c8 packer: validate minimum version [GH-2310] 2015-06-29 11:49:45 -07:00
Mitchell Hashimoto 472b060394 packer: build_name and build_type work + tests 2015-06-13 16:51:39 -04:00
Mitchell Hashimoto 1b775cca2e packer: core interpolates Push 2015-05-29 15:41:52 -07:00
Mitchell Hashimoto 639e63fd7c packer: test for template path 2015-05-29 14:29:32 -07:00
Mitchell Hashimoto 590997df44 packer: automatically validate when creating a core 2015-05-28 14:43:15 -07:00
Mitchell Hashimoto e0a9215e47 packer: test for environment variables interpolation 2015-05-28 14:40:45 -07:00
Mitchell Hashimoto 53e77eacea packer: overrides work 2015-05-26 09:46:04 -07:00
Mitchell Hashimoto 26c7ac2d90 packer: post-processors 2015-05-26 09:28:59 -07:00
Mitchell Hashimoto 85e615bbe2 packer: a lot more provisioner tests 2015-05-26 09:16:39 -07:00
Mitchell Hashimoto b25ae21e13 packer: run provisioners 2015-05-26 09:14:29 -07:00
Mitchell Hashimoto c12072ecad packer: tests around interpolated names 2015-05-25 18:15:07 -07:00
Mitchell Hashimoto 547d9e759e packer: test Build 2015-05-25 17:58:59 -07:00
Mitchell Hashimoto dc74ec5612 packer: remove Environment 2015-05-25 17:29:10 -07:00
Mitchell Hashimoto 3ebfe06ec8 packer: render build names 2015-05-23 16:12:32 -07:00
Mitchell Hashimoto ded13a8b10 packer: Core, and template validate 2015-05-23 14:48:07 -07:00