Commit Graph

46 Commits

Author SHA1 Message Date
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 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
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 6f729d0265
Adding some missing configuration 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 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 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 7a35e2408f
fix pty, some todo and refactor of bash scri[t 2018-10-26 16:59:21 -07:00
Matthew Hooker cd77d00fd8
delete temporary image container 2018-10-26 16:59:21 -07:00
Matthew Hooker 21f786d686
todo and some clean up. correct values for machine image 2018-10-26 16:59:21 -07:00
Matthew Hooker b222d36669
use 2x volume size 2018-10-26 16:59:21 -07:00
Matthew Hooker 7c577abbcb
WIP: register machine image.
remove passwords
2018-10-26 16:59:21 -07:00
Matthew Hooker 96e62236ec
upload volume WIP
check upload for error
increase builder volume size to account for chunking
2018-10-26 16:59:20 -07:00
Matthew Hooker 445c3fb5bb
cleanup temp keys 2018-10-26 16:59:20 -07:00
Matthew Hooker 098764d8ac
WIP 2018-10-26 16:59:20 -07:00
Matthew Hooker 2db0a03142
image upload WIP 2018-10-26 16:59:20 -07:00
Matthew Hooker 7c26ffef9c
builder instance now runs and is connected to 2018-10-26 16:59:20 -07:00
Matthew Hooker b3ffa975c3
Revert "add boot volume to builder instance"
This reverts commit cbce7b42079d2087bc622fd8c6f65d1339b735d1.
2018-10-26 16:59:20 -07:00
Matthew Hooker 2febfa2c7d
attach volume after instance booted 2018-10-26 16:59:20 -07:00
Matthew Hooker b68f214ca4
add boot volume to builder instance 2018-10-26 16:59:20 -07:00
Matthew Hooker 00ff187d77
master instance working 2018-10-26 16:59:19 -07:00
Matthew Hooker e271e88b49
oracle-classic variable volume size WIP 2018-10-26 16:59:19 -07:00
Megan Marsh 38cc525ec7 new option allowing user to clean up the ephemeral ssh key from the authorized_keys file 2018-09-14 11:06:38 -07:00
Adrien Delorme 0f9eddda3a builder.oracle: use c.Comm for ssh 2018-08-29 14:40:33 +02:00
Adrien Delorme 51d2aac9f6 SSHPrivateKey => SSHPrivateKeyFile 2018-08-29 14:40:32 +02:00
Adrien Delorme 41f6e0334d refactor all copy pasted sshConfig with into communicator.Config.SSHConfigFunc
* still need to append the auth methods into an array for gracefullness
2018-08-22 17:02:23 +02:00
Megan Marsh 871ead371a Clean up based on Oracle comments 2018-01-31 10:47:19 -08:00
Megan Marsh 705459c260 add snapshotted machine image to image lists, then delete the snapshot. 2018-01-29 16:50:53 -08:00
Megan Marsh de2e5edf2e remove errant change in amazon builder 2018-01-26 08:43:51 -08:00
Matthew Hooker 4622bb4585
return no artifact if no snapshot was created 2018-01-25 16:32:37 -08:00
Matthew Hooker 77277ebc98
add logging behind "PACKER_OCI_CLASSIC_LOGGING" env var 2018-01-25 16:32:34 -08:00
Matthew Hooker 4dc42942f5
fix multistep path 2018-01-25 14:46:02 -08:00
Matthew Hooker 603881d990
add oci/classic artifact 2018-01-25 14:34:03 -08:00
Megan Marsh 53ff257cf0
it LLIIIIIIIIIVES 2018-01-25 14:34:02 -08:00
Megan Marsh 69ba710c2a
PROGRESS! Now it only fails on the snapshot step 2018-01-25 14:34:01 -08:00
Megan Marsh 6556a851dc
fix ssh key handling 2018-01-25 14:34:01 -08:00
Megan Marsh 46c3113613
it compiles :) 2018-01-25 14:34:00 -08:00
Megan Marsh 007e8f7c14
finish stubbing out step_create_IP_reservation 2018-01-25 14:33:43 -08:00
Matthew Hooker 3bf431a423
construct OCI client 2018-01-25 14:33:41 -08:00
Matthew Hooker 9e8d845c03
create instance reservation 2018-01-25 14:33:41 -08:00
Matthew Hooker 543caf3ec5
WIP OCI Classic builder 2018-01-25 14:33:41 -08:00