Commit Graph

359 Commits

Author SHA1 Message Date
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