Add support for vim emu installation
* add auto push to vagrant cloud
Signed-off-by: Michael Marchetti <mmarchetti@sandvine.com>
diff --git a/packer/ubuntu1604-ovf-osm.json b/packer/ubuntu1604-ovf-osm.json
index 08221bd..d4a2c77 100644
--- a/packer/ubuntu1604-ovf-osm.json
+++ b/packer/ubuntu1604-ovf-osm.json
@@ -3,7 +3,12 @@
{
"type": "shell",
"script": "scripts/get-install-osm.sh",
- "execute_command": "{{.Path}} {{user `osm_installer`}}"
+ "execute_command": "{{.Path}} {{user `osm_install_options`}}"
+ },
+ {
+ "type": "shell",
+ "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
+ "script": "scripts/vimemu.sh"
},
{
"type": "shell",
@@ -12,9 +17,9 @@
}
],
"variables": {
- "osm_installer": "https://osm-download.etsi.org/ftp/osm-4.0-four/install_osm.sh",
+ "osm_install_options": "--vimemu",
"input_ovf": "output-virtualbox-iso/packer-ubuntu-16.04-amd64-juju.ovf",
- "vm_name": "packer-ubuntu-16.04-ovf-amd64"
+ "vm_name": "xenial-osm"
},
"builders": [
{
@@ -28,6 +33,7 @@
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
"virtualbox_version_file": ".vbox_version",
"vm_name": "{{user `vm_name`}}",
+ "output_directory": "osm-{{timestamp}}",
"vboxmanage": [
[
"modifyvm",
@@ -45,9 +51,18 @@
}
],
"post-processors": [
- {
- "output": "builds/{{.Provider}}-osm.box",
- "type": "vagrant"
- }
+ [
+ {
+ "output": "osm-{{timestamp}}/{{.Provider}}-osm.box",
+ "type": "vagrant",
+ "keep_input_artifact": true
+ },
+ {
+ "type": "vagrant-cloud",
+ "box_tag": "osm/{{user `release`}}",
+ "access_token": "{{user `cloud_token`}}",
+ "version": "{{user `version`}}"
+ }
+ ]
]
}