Commit Graph

186 Commits

Author SHA1 Message Date
Adrien Delorme 078ba7c8c3 commit old code generation tool
for history
2019-10-15 12:56:42 +02:00
Adrien Delorme 3fa614b5e1 builder.oracle.oci: make ConfigProvider unexported
so that it doesn't temper with hcl2 code generation & parsing.

The field is set only later on after further processing.
2019-10-15 12:56:41 +02:00
Robert Neumayer 7dd579f630 Remove commented code 2019-09-30 12:17:47 +02:00
Robert Neumayer 70b2d300e6 Support defined tags for oci builder 2019-09-27 15:10:04 +02:00
Megan Marsh 242f5b1c9f typos 2019-07-03 13:34:23 -07:00
Megan Marsh c03c3f4410 replace duplicate commHost functions with a single communicator helper that checks for ssh_host and does a statebag lookup for a given key 2019-07-03 13:30:29 -07:00
Megan Marsh eb8c74bf85 allow ssh_host config option to override host logic for all builders 2019-07-02 13:56:28 -07: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 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 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 b764b1d7e1 fix tests 2019-03-29 15:05:51 -07:00
Megan Marsh a84fc6bde9 remove default ssh_username from oracle classic builder, but add note in docs. 2019-03-29 14:24:12 -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 19144111dd fix packer crash that occurs when image is nil 2018-12-17 14:54:27 -08:00
Ali Rizvi-Santiago 040a33567e Trying again one more time to prevent import cycles.. Moved common.ExpandUser into packer.ExpandUser.. 2018-12-04 16:54:47 -06:00
Ali Rizvi-Santiago 79b68fb89c Replaced the previous incorrect logic with an re-implementation of common.ExpandUser. 2018-12-04 16:53:33 -06:00
Ali Rizvi-Santiago e04986659a Changed the logic for when to actually prefix a path with a u.HomeDir so that it's only done when a non-absolute path is specified. 2018-12-04 16:53:33 -06:00
Ali Rizvi-Santiago 1a3c3f2ffc Replaced all instances of mitchellh/go-homedir with an implementation based on os/user. 2018-12-04 16:53:33 -06:00
Mikhail Ushanov 536252683e builders: reuse private key file reading function
Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
2018-11-08 14:25:50 +03:00
Matthew Hooker 3ff038d4d1
remove todo 2018-10-31 12:00:33 -07:00
Matthew Hooker 42cd3e4bf7
Warn if not a pv build but builder image entry is set. cleanup 2018-10-29 15:23:58 -07:00
Matthew Hooker eb976894fc
cleanup 2018-10-27 02:04:36 -07:00
Matthew Hooker c697c9d3de
cleanup 2018-10-26 21:59:26 -07:00
Matthew Hooker f322397413
add config tests 2018-10-26 21:56:39 -07:00
Matthew Hooker 6d6d262308
some final fixes and documentation work 2018-10-26 21:56:00 -07:00
Matthew Hooker 4eba1ee724
remove unused config key 2018-10-26 20:02:51 -07:00
Matthew Hooker 03932f1157
Clean up volumes 2018-10-26 20:02:13 -07:00
Matthew Hooker e2a0cbf7df
move upload script to const 2018-10-26 16:59:23 -07:00
Matthew Hooker 7331d6fc7f
some final clean up 2018-10-26 16:59:23 -07:00
Matthew Hooker ab4f205bf6
correctly building linux/windows now 2018-10-26 16:59:23 -07:00
Matthew Hooker 09de194d8e
trying to wrap the base communicator config but it needs to be prepared 2018-10-26 16:59:22 -07:00
Matthew Hooker ab5e964ca6
Connecting to master instance but not builder 2018-10-26 16:59:22 -07:00
Matthew Hooker ade396e140
don't echo image creation commands 2018-10-26 16:59:22 -07:00
Matthew Hooker 3e966ae38d
make fmt 2018-10-26 16:59:22 -07:00
Matthew Hooker 86f6cf478a
cleanup 2018-10-26 16:59:22 -07:00
Matthew Hooker 6f729d0265
Adding some missing configuration 2018-10-26 16:59:22 -07:00
Matthew Hooker c42be62d90
fix identifier changes from oracle sdk 2018-10-26 16:59:22 -07:00
Matthew Hooker bbb0d450f1
todo 2018-10-26 16:59:22 -07:00
Matthew Hooker be91c99d29
warn about dangling segments.
The client offers no way to bulk delete keys, so for now let's just warn users.
The issue is tracked upstream here: https://github.com/hashicorp/go-oracle-terraform/issues/172
2018-10-26 16:59:22 -07:00
Matthew Hooker ce30e1053e
wip 2018-10-26 16:59:22 -07:00
Matthew Hooker 9f310045fc
split image upload/creation. clean up 2018-10-26 16:59:22 -07:00
Matthew Hooker 420d0ebe3e
fix artifact generation 2018-10-26 16:59:21 -07:00
Matthew Hooker 84bb5d2f6f
create image list 2018-10-26 16:59:21 -07:00
Matthew Hooker fa54a64d28
WIP 2018-10-26 16:59:21 -07:00
Matthew Hooker b84c7df9da
Segments going into per-run subfolder 2018-10-26 16:59:21 -07:00
Matthew Hooker b5c6beb8a3
don't delete segments. registering works now. 2018-10-26 16:59:21 -07:00
Matthew Hooker 705fa976a8
more debugging 2018-10-26 16:59:21 -07:00
Matthew Hooker 2536790e0a
todo 2018-10-26 16:59:21 -07:00
Matthew Hooker 7a35e2408f
fix pty, some todo and refactor of bash scri[t 2018-10-26 16:59:21 -07:00
Matthew Hooker fc301601e1
actually delete temp container 2018-10-26 16:59:21 -07:00