Add build_dir variable for build 30/6330/1
authorMichael Marchetti <mmarchetti@sandvine.com>
Wed, 11 Jul 2018 18:28:44 +0000 (20:28 +0200)
committerMichael Marchetti <mmarchetti@sandvine.com>
Wed, 11 Jul 2018 18:28:44 +0000 (20:28 +0200)
Change-Id: Ia65ade3e0336e7eddfd250b4c4d74a3a7d1d3c41
Signed-off-by: Michael Marchetti <mmarchetti@sandvine.com>
packer/ubuntu1604-juju.json
packer/ubuntu1604-ovf-osm.json

index 15db312..8263eef 100644 (file)
@@ -34,6 +34,9 @@
         "script": "scripts/cleanup.sh"
     }
   ],
+  "variables": {
+    "build_dir": "jujubase-{{timestamp}}"
+  },
   "builders": [
     {
       "type": "virtualbox-iso",
@@ -64,7 +67,7 @@
         "<enter><wait>"
       ],
       "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": [
         [
   ],
   "post-processors": [
     {
-      "output": "jujubase-{{timestamp}}/{{.Provider}}-jujubase.box",
+      "output": "{{user `build_dir`}}/{{.Provider}}-jujubase.box",
       "type": "vagrant",
       "keep_input_artifact": true
     }
index d4a2c77..5e0e81a 100644 (file)
@@ -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
       },