VOL-517 - depend on standard libvirt image and parameterize Jenkins a bit.
Change-Id: Ia2212012e112726dc30381e18f96b6b3daad9f25
diff --git a/Jenkinsfile b/Jenkinsfile
index 2ef8476..05f7bb6 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,4 +1,7 @@
node('build') {
+ stage 'Cleanup workspace'
+ sh 'rm -rf ./build ./component ./incubator ./onos-apps ./orchestration ./test ./.repo'
+
stage 'Checkout cord repo'
checkout([$class: 'RepoScm', currentBranch: true, manifestRepositoryUrl: 'https://gerrit.opencord.org/manifest', quiet: true])
diff --git a/Vagrantfile b/Vagrantfile
index 7806a05..b95e831 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -3,7 +3,13 @@
require 'yaml'
-settings = YAML.load_file 'settings.vagrant.yaml'
+if ENV['VAGRANT_SETTINGS'] and ENV['VAGRANT_SETTINGS'] != ''
+ settings_file = ENV['VAGRANT_SETTINGS']
+else
+ settings_file = 'settings.vagrant.yaml'
+end
+puts("Loading vagrant settings from " + settings_file)
+settings = YAML.load_file settings_file
Vagrant.configure(2) do |config|
@@ -21,13 +27,14 @@
Provider = "virtualbox"
else
puts("Using the QEMU/KVM configuration");
- Box = "ubuntu1604"
+ Box = "elastic/ubuntu-16.04-x86_64"
Provider = "libvirt"
if settings['testMode'] == "true" or settings['installMode'] == "true"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "../..", "/cord", type: "rsync", rsync__exclude: [".git", "venv-linux", "install/volthaInstaller", "install/volthaInstaller-2"], rsync__args: ["--verbose", "--archive", "--delete", "-z", "--links"]
else
- config.vm.synced_folder "../..", "/cord", type: "nfs"
+ config.vm.synced_folder ".", "/vagrant", rsync__exclude: [".git", "venv-linux", "install/volthaInstaller", "install/volthaInstaller-2"], rsync__args: ["--verbose", "--archive", "--delete", "-z", "--links"]
+ config.vm.synced_folder "../..", "/cord", type: "nfs", rsync__exclude: [".git", "venv-linux", "install/volthaInstaller", "install/volthaInstaller-2"], rsync__args: ["--verbose", "--archive", "--delete", "-z", "--links"]
end
end
else
diff --git a/ansible/roles/common/tasks/main.yml b/ansible/roles/common/tasks/main.yml
index aa775c1..8e2c6bd 100644
--- a/ansible/roles/common/tasks/main.yml
+++ b/ansible/roles/common/tasks/main.yml
@@ -26,6 +26,14 @@
with_items: "{{ obsolete_services }}"
tags: [common]
+- name: Ensure SSH directory exists
+ file:
+ path: "{{ ansible_env['HOME'] }}/.ssh"
+ state: directory
+ owner: "{{ ansible_env['SUDO_USER'] }}"
+ group: "{{ ansible_env['SUDO_USER'] }}"
+ mode: 0700
+
- name: Ensure known_hosts file is absent
file:
path: "{{ ansible_env['HOME'] }}/.ssh/known_hosts"
diff --git a/settings.vagrant.nightly.yaml b/settings.vagrant.nightly.yaml
new file mode 100644
index 0000000..10ab061
--- /dev/null
+++ b/settings.vagrant.nightly.yaml
@@ -0,0 +1,9 @@
+---
+# The name to use for the server
+server_name: "voltha"
+# Use KVM for nightly build
+vProvider: "KVM"
+# This determines if test mode is active
+testMode: "false"
+# This determines if installer mode is active
+installMode: "false"