Commit Graph

485 Commits

Author SHA1 Message Date
Megan Marsh 0683bc409b add test for error-cleanup provisioner, and fix tests by fixing null builder to use an actual none communicator instead of skipping communicator generation altogether 2019-09-25 13:39:09 -07:00
Megan Marsh 6688f436dd
Merge pull request #7960 from guidodobboletta/master
Fix console help text
2019-08-12 16:32:29 -07:00
xiaohan.liang f4fc9dd09a Rewrite all files, remove sensitive information 2019-08-09 15:00:23 +08:00
Guido Dobboletta e79d62d006 Fix text 2019-08-08 13:22:59 -05:00
Thomas Meckel d3202497ae First working version of virtualbox/vm builder 2019-07-26 12:29:44 +02:00
Thomas Meckel 2a531f8ad6 Merged changes from local branch 2019-07-26 12:29:44 +02:00
Brendan Devenney 2b16b5cae4
Move fixer test to fix package
Signed-off-by: Brendan Devenney <brendan.devenney@form3.tech>
2019-07-24 18:04:17 +01:00
Brendan Devenney 6520814a6c
Ensure help output is consistently formatted
Signed-off-by: Brendan Devenney <brendan.devenney@form3.tech>
2019-07-24 17:41:57 +01:00
Brendan Devenney 75d8d7fce5
Update and futureproof fix command usage
* Dynamically generate the fixer documentation (in order) from
FixerOrder
* Update fixers which used linebreaks in their Synopsis

Signed-off-by: Brendan Devenney <brendan.devenney@form3.tech>
2019-07-24 17:18:07 +01:00
Brendan Devenney 91b7d8c572
Add test to ensure all fixers are enabled
Signed-off-by: Brendan Devenney <brendan.devenney@form3.tech>
2019-07-24 16:52:07 +01:00
Brendan Devenney 9f0bc29db5
Test that Fixers and FixerOrder are equal length
Signed-off-by: Brendan Devenney <brendan.devenney@form3.tech>
2019-07-24 16:51:39 +01:00
Marin Salinas 80dadaf3f1 feature: add bsuvolume builder and acceptance test 2019-07-18 09:39:08 -07:00
Marin Salinas 0c47ee55e6 feature: add chroot builder structure 2019-07-18 09:39:07 -07:00
Marin Salinas c4e69d3169 wip: add bsu plugin acc testing 2019-07-18 09:39:07 -07:00
Marin Salinas 1281f28f6d add prevalidate step 2019-07-18 09:39:07 -07: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
mingsheng.su 6109ad79a3
Merge branch 'master' into feature/ucloud_builder 2019-06-26 10:09:28 +08:00
Adrien Delorme 5efab58ed8 allow to have timestamped colorless ui messages 2019-06-19 15:04:13 +02:00
mingsheng.su d1b9ad90c8 Merge remote-tracking branch 'origin' into feature/ucloud_builder 2019-06-18 18:17:19 +08:00
mingsheng.su c8bab9b382 add ucloud packer 2019-06-13 15:16:49 +08:00
Megan Marsh f7bf80724c document what a REPL is 2019-06-10 11:39:42 -07:00
Megan Marsh 53a5e90d78
Update command/console.go
Co-Authored-By: Adrien Delorme <azr@users.noreply.github.com>
2019-06-10 11:38:29 -07:00
Megan Marsh 7cce3157a8
Update command/console.go
Co-Authored-By: Adrien Delorme <azr@users.noreply.github.com>
2019-06-10 11:38:14 -07:00
Megan Marsh 668e92f2ca add docs and the option to list variables from inside the console 2019-06-06 14:26:12 -07:00
Megan Marsh df916e805e borrow wrappedreadline workarounds from terraform and implement a similar check for piped commands; this makes the cli experience much cleaner 2019-06-06 13:26:07 -07:00
Megan Marsh b8ac1a800d implement a packer console analogous to the terraform console 2019-06-05 16:35:22 -07:00
Adrien Delorme cb2d89af6f simplify path parsing by making at string instead of an array + add tests 2019-05-07 11:51:21 +02:00
Adrien Delorme a4b8570991 refactor arg parsing into it's own cfg maker & test it 2019-05-07 11:43:18 +02:00
Adrien Delorme 7e8c42d243 BuildCommand: put config in a local struct 2019-05-07 11:15:35 +02:00
Adrien Delorme cdbb742496 add more cancellation tests 2019-05-06 16:29:35 +02:00
Adrien Delorme 73a55631c4 fix testfile call 2019-05-06 15:47:53 +02:00
Adrien Delorme 2890687b2b fix race condition in BuildCommand
a map[string]error was being written on unprotectedly
2019-05-06 15:42:23 +02:00
Adrien Delorme af15ed3583 nil signals are probably just a cancellation in disguise 2019-05-06 15:29:59 +02:00
Adrien Delorme 583d93790f add tests for cancellation while building 2019-05-06 15:07:57 +02:00
Adrien Delorme dd2785ff08 BuildCommand.Run: avoid triggering a cancellation on termination 2019-05-06 12:26:22 +02:00
Adrien Delorme 0094d2878c Build: move BuildCommand.Run into a RunContext command to allow testing for cancellation, put cancellation in `Run` 2019-05-06 12:19:59 +02:00
Adrien Delorme a2cc2532ea add TestBuildParallel_Timeout to test errors on parallel builds 2019-05-03 09:02:56 +02:00
Adrien Delorme d40d3eca88 swap semaquire and wg.Add to avoid a deadlock 2019-05-03 08:19:33 +02:00
Adrien Delorme 263f318e82 be true to docs 2019-05-02 17:48:34 +02:00
Adrien Delorme 1dca416f87 move the semacquire to the main build loop so that the build order is kept
* a goroutine could start before another !
2019-05-02 16:58:28 +02:00
Adrien Delorme 852af993e6 BuildParallel: test with 3 parallel builds 2019-05-02 16:24:28 +02:00
Adrien Delorme 9281fada2d prevent a breaking change so that we can merge the `-parallel-builds` option first. 2019-05-02 16:24:28 +02:00
Adrien Delorme 14486003a1 fix test to be race free 2019-05-02 15:04:02 +02:00
Adrien Delorme c1527d9b47 fix text 2019-05-02 14:41:44 +02:00
Adrien Delorme ae71a81c1e Merge remote-tracking branch 'origin/master' into pr/7501 2019-05-02 11:47:43 +02:00
Brett Wandel aaf56ffd26 added: testing 2019-05-02 08:38:56 +10:00
Brett Wandel 76b5c1995f fixed: small changes to cancellation on ctrl-c 2019-04-19 17:10:36 +10:00
Marques Johansson 99987c2d56 Add Linode Images builder
Packer Builder for [Linode Images](https://www.linode.com/docs/platform/disk-images/linode-images/)

Adds the following builder:

  * `linode`

Based on https://github.com/linode/packer-builder-linode (MPL/2)
(formerly maintained by @dradtke).  Includes website docs and tests.

Relates to #174, #3131
2019-04-15 20:40:59 -04:00
Adrien Delorme 97f2914c6a
Merge pull request #7484 from yandex-cloud/yandex-cloud-builder
Builder for Yandex.Cloud
2019-04-15 14:02:43 +02:00
Brett Wandel 92e75f838a added the ability to limit number of builds running in parallel 2019-04-13 22:31:54 +10:00
Adrien Delorme d2f036ec44 Revert "Revert "Merge pull request #7391 from carlpett/proxmox-builder""
This reverts commit 032527ecfe.
2019-04-12 12:26:34 +02:00
Gennady Lipenkov 8f53ca5e5e Add 'yandex' plugin as Builder 2019-04-12 01:00:54 +03:00
Adrien Delorme 032527ecfe Revert "Merge pull request #7391 from carlpett/proxmox-builder"
This reverts commit b7d62b2ae0, reversing
changes made to c36eaf16f7.
2019-04-11 14:19:25 +02:00
Adrien Delorme 0b4ada9690 make sleep provisioner available to packer 2019-04-08 20:09:22 +02:00
Adrien Delorme d7b1b597a7 test provisionning timeout 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
Calle Pettersson 9f8fc37fde Implement Proxmox builder 2019-04-04 15:20:46 -07:00
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. 2019-04-04 14:57:56 -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
Adrien Delorme 045f2f41bd display received signal in debug mode 2019-03-22 14:25:06 +01: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
Andrew Widdersheim a5b753820c
Fix build commands -except help message
The `-except` option needed some updates that were missed in 270f851e.
2019-03-05 10:54:35 -05:00
Megan Marsh b8510f35fc
Merge pull request #7330 from hashicorp/except_post_processor_tests
name a post-processor to it's type when it is not named
2019-02-26 09:26:17 -08:00
Miłosz Smółka 94a7a07c87 Merge branch 'master' into hyperone 2019-02-24 15:16:21 +01:00
Adrien Delorme 7e2d86731e tests: add a post-processor that creates an unnamed.txt file 2019-02-20 11:03:17 +01:00
Adrien Delorme de336ef15e TestBuildOnlyFileMultipleFlags: check that tomato.txt is not created 2019-02-19 16:40:42 +01:00
Adrien Delorme b04b8b3857 test building with `-except=""` 2019-02-19 15:25:41 +01:00
Megan Marsh 75f574bd4b
Merge pull request #7221 from hashicorp/vagrant_builder
Vagrant builder
2019-02-15 10:05:44 -08: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
xinau c207451f7e Merge branch 'master' of https://github.com/hashicorp/packer into packer-provisioner-inspec 2019-02-12 05:32:05 +00:00
Miłosz Smółka 228829139b Merge branch 'master' into hyperone 2019-02-07 14:12:13 +01:00
Megan Marsh ad21367b21 vagrant builder 2019-02-04 14:08:43 -08:00
Adrien Delorme 8621949e01 make generate 2019-02-04 15:16:38 +01:00
Adrien Delorme dd3e2c255c respect a 'only' defined in a post-processor 2019-02-01 15:50:06 +01:00
Adrien Delorme 074a74ec38 make sure 'only' completely ignores post-processor
before this commit, if one would put a 'only' inside the post-processor definition, the post process could be skipped
2019-02-01 15:21:41 +01:00
Miłosz Smółka be30415395 Add HyperOne builder 2019-01-23 14:04:05 +01:00
xinau f5b13e3cb5 added inspec.io provisioner 2019-01-20 15:43:47 +00:00
Adrien Delorme 58245f2557 break a chain of post-processors when one is skipped & make `-only`
"blind" to post-processors

* to avoid trouble
* other arrays of post processors might still be there !
* add docs
* update tests
2019-01-11 14:08:30 +01:00
Adrien Delorme 61ade0e127 allow to use --only with post-processors 2019-01-10 15:44:34 +01:00
Adrien Delorme 4bf3cd44fc allow to skip a post processor 2019-01-10 15:44:34 +01:00
Adrien Delorme 905db043c4 command.TestBuildOnlyFileCommaFlags: create some files using post processors 2019-01-10 15:44:02 +01:00
Adrien Delorme 7655d2efb2
Add tencent cloud builder (#7135 & #6839) 2018-12-20 17:09:44 +01:00
Megan Marsh 98e933ca54 make packer inspect not print sensitive variables. 2018-12-07 12:02:20 -08:00
Andrew Starr-Bochicchio c0c5c6afac Add DigitalOcean post-processor. 2018-11-29 21:00:57 -05:00
Megan Marsh ba25e68fe0 add a new breakpoint provisioner 2018-11-29 14:32:52 -08:00
Megan Marsh c5b6eff691
Merge pull request #6871 from LKaemmerling/master
Add hcloud builder
2018-10-18 11:13:16 -07:00
Lukas Kämmerling 270110767c
Add hcloud Builder 2018-10-17 12:15:47 +02:00
Josh Soref 66738ccaf4 Try to make help more consistent
Also try to synchronize the completion script
2018-10-10 21:34:35 -04:00
Adrien Delorme 626a3cc2a4 have -timestamp-ui match what's in doc
this was just an omission
also `=true` is not a necessary precision in this case

#6784
2018-10-03 14:40:13 +02:00
Ashley Lowde 2884f6fab6 improve formatting and documentation for PR#6784 2018-10-02 20:00:45 +09:30
Ashley Lowde 12496e3702 add optional timestamps to build log 2018-09-29 22:39:24 +09:30
Matthew Hooker 8a7d43dd44
bug fix and add test 2018-09-06 12:19:31 -07:00
Megan Marsh cb35829f80
Merge pull request #6411 from jmartin-r7/esxi_compact
add support for disk compaction to esx5 builder
2018-09-04 12:44:32 -07:00
Oleg Butuzov 079b317b62 Misaligned help entries
Descriptions for `build` subcommand aligned.
hashicorp/packer#6652
2018-09-01 10:32:23 +03:00
Jeffrey Martin e8f04c34a3
add vmware-compaction fixer help 2018-08-30 16:44:00 -05:00
Megan Marsh c5b346b07b
Merge pull request #6393 from DanHam/fix-hyperv-export
Various improvements to Hyper-V ISO and VMCX builders
2018-08-24 15:52:49 -07:00
Matthew Hooker ddf23a2c46
Complete Atlas deprecation.
Removes the push command and the Atlas post-processor.  Please see our
guide on building immutable infrastructure with Packer on CI/CD for
ideas on implementing these features yourself.
https://www.packer.io/guides/packer-on-cicd/
2018-08-02 20:23:28 -07:00
Matthew Hooker 9bb0681586
Merge pull request #6423 from hashicorp/fix5513
cmd/validate: Warn users if configs need fixing
2018-07-23 13:52:28 -07:00
DanHam c8f54d5291
Fixer and tests to convert 'clone_from_vmxc_path' -> 'clone_from_vmcx_path' 2018-07-20 02:12:48 +01:00
DanHam 3c5d7aec74
Ensure new fixer appears in 'packer fix' usage message 2018-07-20 02:12:47 +01:00
DanHam 1347f07618
Update 'packer fix' command usage output to include all fixers 2018-07-11 12:38:50 +01:00
Matthew Hooker dde6805ee8
ignore empty top-level config keys when vetting fix 2018-07-02 13:57:11 -07:00
Sean Malloy 3622a669dc Add new post processor googlecompute-import 2018-06-26 21:39:55 -05:00
Matthew Hooker a5e29e68da
cmd/validate: notify user if config is "fixable" 2018-06-25 22:21:16 -07:00
M. Marsh eb557af8bf
Merge branch 'master' into f-autocomplete 2018-04-26 11:18:37 -07:00
Matthew Hooker 3c37aaf4e6
update atlas deprecation language
This is a follow-on to #6018
2018-03-19 10:50:29 -07:00
Josh Soref e7a30b4ba2 spelling: attempt 2018-03-13 07:11:42 +00:00
Edouard BONLIEU 7e36cfcff1
Add Scaleway builder 2018-02-08 12:09:24 -08:00
Matthew Hooker 6205c71f98
Merge pull request #5791 from YuSungDuk/master
Naver Cloud Platform builder
2018-02-08 11:10:18 -08:00
Matthew Hooker c03ce222b2
add atlas deprecation warnings. 2018-02-07 15:45:00 -08:00
SwampDragons 997f8e4a2a
Merge pull request #5318 from hashicorp/sigtermcleanup
Gracefully clean up on SIGTERM
2018-02-02 11:56:56 -08:00
유성덕 5714108ef9 Merge branch 'master' into support_ncloud 2018-01-29 22:10:18 +09:00
Megan Marsh 7d85b31b29
make fmt 2018-01-25 14:34:03 -08:00
Megan Marsh 46c3113613
it compiles :) 2018-01-25 14:34:00 -08:00
Matthew Hooker 807e88245b
trying to add context to state bag 2018-01-24 17:09:15 -08:00
유성덕 5189d65467 Support Naver Cloud Platform 2018-01-11 18:57:53 +09:00
Krzysztof Wilczynski 0e08640fff
Re-factor version command to use version.FormattedVersion() function.
This commit removes surplus code which is almost a duplicate of the code
available in the version package by favouring the package implementation
instead.

Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
2017-12-03 23:07:16 +01:00
Jeremy Voorhis bfc75eb9d9 Implement cli.CommandAutocomplete for most commands 2017-10-13 11:57:44 -07:00
Jeremy Voorhis a4cb8ae41b Define methods on *BuildCommand (consistency) 2017-10-13 11:57:44 -07:00
SwampDragons f3c33240fa Merge pull request #5444 from vijayinvites/packer-vhdx
Hyperv vmcx builder and allow vhd/vhdx instead of ISO
2017-10-13 11:53:27 -07:00
Matthew Hooker fcfdff0efd rerun scripts/generate-plugins.go 2017-10-11 22:05:52 +05:30
Taliesin Sisson efa62e1550 Can specify an iso, vhd or vhdx for download. If it is a vhd or vhdx it is used as the hard drive for spinning up a new machine, importing an exported virtual machine or cloning a virtual machine.
Can import a virtual machine from a folder
Can clone an existing virtual machine
2017-10-11 22:05:45 +05:30
Taliesin Sisson 452fcbd9a1 Only attach dvd drive if there is one
Fix debug messages for cloning

Add hyperv-vmcx as a builder from command line
2017-10-11 21:42:32 +05:30
Jearvon Dharrie e918dc89bc Add `/downloads.html` to the outdated version message 2017-10-10 23:31:33 -04:00
Andrew Pryde 6fd2f6701d
Rename Oracle BMCS builder to OCI
Oracle Bare Metal Cloud Services (BMCS) has been rebranded as Oracle
Cloud Infrastructure (OCI).
2017-09-12 10:40:56 -07:00
Matthew Hooker 624b1e5110 Merge pull request #4554 from prydie/f-oracle-bmcs
Oracle Bare Metal Cloud Services (BMCS) builder
2017-09-11 09:42:14 -07:00
Matthew Hooker fdaf4ed8d3
Gracefully clean up on SIGTERM 2017-09-08 11:42:32 -07:00
Megan Marsh 8d24b3930a cleanup imports and rebase artifacts 2017-09-05 15:23:22 -07:00
Michele Catalano f4f0ab9f50 add integrate lxc builder in packer
add lxc with scripts/generate-plugins.go
2017-09-05 15:17:15 -07:00
Chris Lundquist 7366b6c78e [lxd] first pass 2017-09-05 12:44:39 -07:00
Andrew Pryde 630ee5d650 Change imports mitchelh/packer -> hashicorp/packer 2017-08-02 09:53:48 +01:00
Andrew Pryde 9728f890cf Implemented and documented oracle-bmcs builder
Implements a new Packer builder (oracle-bmcs) which adds support for
building custom images for Oracle Bare Metal Cloud Services (BMCS)
https://cloud.oracle.com/en_US/bare-metal.

Additionally includes documentation for the oracle-bmcs builder.
2017-08-02 09:53:48 +01:00
bugbuilder 3cc9f204ac Moving vsphere-tpl to vsphere-template, fixed root folder creation and updated docs 2017-07-10 20:52:48 -04:00
bugbuilder dc2124aa2a Initial vSphere-tpl post-processor 2017-07-09 14:12:37 -04:00
Megan Marsh 17d3671601 make sure that flagVars is not a nil map 2017-07-06 09:27:05 -07:00
Matthew Hooker 056104ace4
fix tests 2017-06-08 19:12:04 -07:00
Matthew Hooker d5c228ee98
additional renaming of private to sensitive 2017-06-08 15:52:16 -07:00
Matthew Hooker 01f64009ed
spacing 2017-06-08 15:47:46 -07:00
Matthew Hooker baf31980c7
remove unneeded cast 2017-06-08 15:44:48 -07:00
Megan Marsh 33af49d980 rename private to be in line with tfe 2017-06-08 15:42:17 -07:00
Matthew Hooker cd147e2da4 Merge pull request #4970 from hashicorp/4727_sensitive_vars
allow user to mark variables as sensitive for packer push
2017-06-08 15:27:37 -07:00
Megan Marsh a21870e614 addressing PR comments 2017-06-08 13:24:07 -07:00
Megan Marsh 7ac429b9ca add private to help function 2017-06-08 13:04:40 -07:00
Megan Marsh fdca364f4b allow user to mark variables as sensitive for packer push 2017-06-08 13:01:23 -07:00
Matthew Hooker 8933690e90 Merge pull request #4950 from hashicorp/warn_atlas_users
add warning about vagrant.box vms being uploaded to atlas
2017-06-07 13:44:41 -07:00
Megan Marsh dbd7aa6b95 capitalize all the things 2017-06-07 13:30:39 -07:00
Megan Marsh 1c1db91715 add instructions 2017-06-07 13:20:02 -07:00
Megan Marsh b31f8bb0f6 clean up formatting and add warning to packer push. 2017-06-01 11:25:53 -07:00
Matthew Hooker 1a26fbd59c
update changelog 2017-05-15 13:52:29 -07:00
zhuzhih2017 d646e1d035 refactor the code according hashicorp rename the repository 2017-04-18 15:14:45 +08:00