From: Michael Marchetti Date: Wed, 11 Jul 2018 18:28:44 +0000 (+0200) Subject: Add build_dir variable for build X-Git-Tag: BUILD_v4.0.1_1~7^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=6d3457b79dde5a49850f9f38a5ebb23500835858;p=osm%2Fdevops.git Add build_dir variable for build Change-Id: Ia65ade3e0336e7eddfd250b4c4d74a3a7d1d3c41 Signed-off-by: Michael Marchetti --- diff --git a/packer/ubuntu1604-juju.json b/packer/ubuntu1604-juju.json index 15db3121..8263eef6 100644 --- a/packer/ubuntu1604-juju.json +++ b/packer/ubuntu1604-juju.json @@ -34,6 +34,9 @@ "script": "scripts/cleanup.sh" } ], + "variables": { + "build_dir": "jujubase-{{timestamp}}" + }, "builders": [ { "type": "virtualbox-iso", @@ -64,7 +67,7 @@ "" ], "boot_wait": "10s", - "disk_size": 20480, + "disk_size": 40000, "guest_os_type": "Ubuntu_64", "headless": true, "http_directory": "http", @@ -81,7 +84,7 @@ "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now", "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", "virtualbox_version_file": ".vbox_version", - "output_directory": "jujubase-{{timestamp}}", + "output_directory": "{{user `build_dir`}}", "vm_name": "xenial-jujubase", "vboxmanage": [ [ @@ -101,7 +104,7 @@ ], "post-processors": [ { - "output": "jujubase-{{timestamp}}/{{.Provider}}-jujubase.box", + "output": "{{user `build_dir`}}/{{.Provider}}-jujubase.box", "type": "vagrant", "keep_input_artifact": true } diff --git a/packer/ubuntu1604-ovf-osm.json b/packer/ubuntu1604-ovf-osm.json index d4a2c776..5e0e81a3 100644 --- a/packer/ubuntu1604-ovf-osm.json +++ b/packer/ubuntu1604-ovf-osm.json @@ -20,6 +20,7 @@ "osm_install_options": "--vimemu", "input_ovf": "output-virtualbox-iso/packer-ubuntu-16.04-amd64-juju.ovf", "vm_name": "xenial-osm" + "build_dir": "osm-{{timestamp}}" }, "builders": [ { @@ -33,7 +34,7 @@ "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now", "virtualbox_version_file": ".vbox_version", "vm_name": "{{user `vm_name`}}", - "output_directory": "osm-{{timestamp}}", + "output_directory": "{{user `build_dir`}}", "vboxmanage": [ [ "modifyvm", @@ -53,7 +54,7 @@ "post-processors": [ [ { - "output": "osm-{{timestamp}}/{{.Provider}}-osm.box", + "output": "{{user `build_dir`}}/{{.Provider}}-osm.box", "type": "vagrant", "keep_input_artifact": true },