summaryrefslogtreecommitdiffstats
path: root/jjb/apex/apex-snapshot-create.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/apex/apex-snapshot-create.sh')
-rw-r--r--jjb/apex/apex-snapshot-create.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/jjb/apex/apex-snapshot-create.sh b/jjb/apex/apex-snapshot-create.sh
index 5725ac641..f146dd810 100644
--- a/jjb/apex/apex-snapshot-create.sh
+++ b/jjb/apex/apex-snapshot-create.sh
@@ -35,8 +35,9 @@ popd > /dev/null
echo "Gathering introspection information"
git clone https://gerrit.opnfv.org/gerrit/sdnvpn.git
pushd sdnvpn/odl-pipeline/lib > /dev/null
-./tripleo_introspector.sh --out-file ${tmp_dir}/node.yaml
+sudo ./tripleo_introspector.sh --out-file ${tmp_dir}/node.yaml
popd > /dev/null
+sudo rm -rf sdnvpn
echo "Shutting down nodes"
# Shut down nodes
@@ -63,10 +64,11 @@ for node in $nodes; do
fi
done
+pushd ${tmp_dir} > /dev/null
echo "Gathering virsh definitions"
# copy qcow2s, virsh definitions
for node in $nodes; do
- cp -f /var/lib/libvirt/images/${node}.qcow2 ./
+ sudo cp -f /var/lib/libvirt/images/${node}.qcow2 ./
sudo virsh dumpxml ${node} > ${node}.xml
done
@@ -75,11 +77,13 @@ for net in admin api external storage tenant; do
sudo virsh net-dumpxml ${net} > ${net}.xml
done
+sudo chown jenkins-ci:jenkins-ci *
+
# tar up artifacts
DATE=`date +%Y-%m-%d`
tar czf ../apex-csit-snap-${DATE}.tar.gz .
popd > /dev/null
-rm -rf ./.tmp
+sudo rm -rf ${tmp_dir}
echo "Snapshot saved as apex-csit-snap-${DATE}.tar.gz"
# update opnfv properties file