make complete tests files link as windows can't handle synlinks

This commit is contained in:
Adrien Delorme 2019-10-15 12:47:59 +02:00
parent 21a0cbffba
commit 0e4fec03d7
4 changed files with 136 additions and 4 deletions

View File

@ -1 +0,0 @@
../build/basic.pkr.hcl

View File

@ -0,0 +1,66 @@
// starts resources to provision them.
build {
from "src.amazon-ebs.ubuntu-1604" {
ami_name = "that-ubuntu-1.0"
}
from "src.virtualbox-iso.ubuntu-1204" {
// build name is defaulted from the label "src.virtualbox-iso.ubuntu-1204"
outout_dir = "path/"
}
provision {
communicator = "comm.ssh.vagrant"
shell {
inline = [
"echo '{{user `my_secret`}}' :D"
]
}
shell {
valid_exit_codes = [
0,
42,
]
scripts = [
"script-1.sh",
"script-2.sh",
]
// override "vmware-iso" { // TODO(azr): handle common fields
// execute_command = "echo 'password' | sudo -S bash {{.Path}}"
// }
}
file {
source = "app.tar.gz"
destination = "/tmp/app.tar.gz"
// timeout = "5s" // TODO(azr): handle common fields
}
}
post_provision {
amazon-import {
// only = ["src.virtualbox-iso.ubuntu-1204"] // TODO(azr): handle common fields
ami_name = "that-ubuntu-1.0"
}
}
}
build {
// build an ami using the ami from the previous build block.
from "src.amazon.that-ubuntu-1.0" {
ami_name = "fooooobaaaar"
}
provision {
shell {
inline = [
"echo HOLY GUACAMOLE !"
]
}
}
}

View File

@ -1 +0,0 @@
../communicator/basic.pkr.hcl

View File

@ -0,0 +1,27 @@
communicator "ssh" "vagrant" {
ssh_password = "s3cr4t"
ssh_username = "vagrant"
ssh_agent_auth = false
ssh_bastion_agent_auth = true
ssh_bastion_host = ""
ssh_bastion_password = ""
ssh_bastion_port = 0
ssh_bastion_private_key_file = ""
ssh_bastion_username = ""
ssh_clear_authorized_keys = true
ssh_disable_agent_forwarding = true
ssh_file_transfer_method = "scp"
ssh_handshake_attempts = 32
ssh_host = "sssssh.hashicorp.io"
ssh_port = 42
ssh_keep_alive_interval = "10s"
ssh_private_key_file = "file.pem"
ssh_proxy_host = "ninja-potatoes.com"
ssh_proxy_password = "pickle-rick"
ssh_proxy_port = "42"
ssh_proxy_username = "dark-father"
ssh_pty = false
ssh_read_write_timeout = "5m"
ssh_timeout = "5m"
}

View File

@ -1 +0,0 @@
../sources/basic.pkr.hcl

View File

@ -0,0 +1,37 @@
// a source represents a reusable setting for a system boot/start.
source "virtualbox-iso" "ubuntu-1204" {
iso_url = "http://releases.ubuntu.com/12.04/ubuntu-12.04.5-server-amd64.iso"
iso_checksum = "769474248a3897f4865817446f9a4a53"
iso_checksum_type = "md5"
boot_wait = "10s"
http_directory = "xxx"
boot_command = ["..."]
shutdown_command = "echo 'vagrant' | sudo -S shutdown -P now"
}
source "amazon-ebs" "ubuntu-1604" {
instance_type = "t2.micro"
encrypt_boot = true
region = "eu-west-3"
source_ami_filter {
filters {
virtualization-type = "hvm"
name = "ubuntu/images/*ubuntu-xenial-{16.04}-amd64-server-*"
root-device-type = "ebs"
}
owners = [
"099720109477"
]
}
}
source "amazon-ebs" "that-ubuntu-1.0" {
instance_type = "t2.micro"
encrypt_boot = true
region = "eu-west-3"
source_ami_filter {
most_recent = true
}
}

View File

@ -1 +0,0 @@
../variables/basic.pkr.hcl

View File

@ -0,0 +1,6 @@
variables {
key = "value"
my_secret = "foo"
image_name = "foo-image-{{user `my_secret`}}"
}