summaryrefslogtreecommitdiffstats
path: root/jjb/apex/apex-fetch-snap-info.sh
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-08-09 11:32:44 -0400
committerTim Rozet <trozet@redhat.com>2018-08-09 15:24:36 -0400
commit37a38451ebf17ae617037844ed0f6b7eeab5985e (patch)
tree71bf5cfb225abd1fad018c732c901add7b0071fb /jjb/apex/apex-fetch-snap-info.sh
parent545447c4ce40100e30ae20cb3dd25b982a20f308 (diff)
Apex: Use CSIT to gate snapshot promotion
Now that we have CSIT suite passing, we want to use that to gate our snapshot promotion rather than tempest. Change-Id: Ifddaf7921da15150a253021ee5ca64ab2fd438ff Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'jjb/apex/apex-fetch-snap-info.sh')
-rwxr-xr-xjjb/apex/apex-fetch-snap-info.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/jjb/apex/apex-fetch-snap-info.sh b/jjb/apex/apex-fetch-snap-info.sh
new file mode 100755
index 000000000..2cfaa59d7
--- /dev/null
+++ b/jjb/apex/apex-fetch-snap-info.sh
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+
+##############################################################################
+# Copyright (c) 2018 Tim Rozet (Red Hat) and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+set -o errexit
+set -o nounset
+set -o pipefail
+
+echo "Fetching overcloudrc, ssh key, and node.yaml from deployment..."
+
+SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o LogLevel=error)
+
+tmp_dir=/tmp/csit
+rm -rf ${tmp_dir}
+mkdir -p ${tmp_dir}
+
+# TODO(trozet) remove this after fix goes in for tripleo_inspector to copy these
+pushd ${tmp_dir} > /dev/null
+echo "Copying overcloudrc and ssh key from Undercloud..."
+# Store overcloudrc
+UNDERCLOUD=$(sudo virsh domifaddr undercloud | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+')
+sudo scp ${SSH_OPTIONS[@]} stack@${UNDERCLOUD}:overcloudrc ./
+# Copy out ssh key of stack from undercloud
+sudo scp ${SSH_OPTIONS[@]} stack@${UNDERCLOUD}:.ssh/id_rsa ./
+sudo chmod 0600 id_rsa
+popd > /dev/null
+
+echo "Gathering introspection information"
+git clone https://gerrit.opnfv.org/gerrit/sdnvpn.git
+pushd sdnvpn/odl-pipeline/lib > /dev/null
+sudo ./tripleo_introspector.sh --out-file ${tmp_dir}/node.yaml
+popd > /dev/null
+sudo rm -rf sdnvpn
+
+sudo chown jenkins-ci:jenkins-ci ${tmp_dir}/*
+
+ls -lrt ${tmp_dir}
+
+echo "Fetch complete"