summaryrefslogtreecommitdiffstats
path: root/ci/generate-environment.sh
diff options
context:
space:
mode:
authorMark Beierl <mark.beierl@dell.com>2016-11-23 16:59:18 -0500
committerMark Beierl <mark.beierl@dell.com>2016-11-25 11:25:43 -0500
commit227bb19115eaab4f689cb570f0a5574cd5e318bb (patch)
tree1d2701784d009f5a97a68c08d3c8733a7bbd227b /ci/generate-environment.sh
parentdef8cbb9d7e45060512594b6e3c89bf2db3cced7 (diff)
Daily Job
Creation of a daily job script that runs under Jenkins and kicks off a series of tests using the freshly cloned workspace. Change-Id: Ibc63c1df954578ad78604321ea410c8fd8c63c41 JIRA: STORPERF-87 Signed-off-by: Mark Beierl <mark.beierl@dell.com>
Diffstat (limited to 'ci/generate-environment.sh')
-rwxr-xr-xci/generate-environment.sh48
1 files changed, 48 insertions, 0 deletions
diff --git a/ci/generate-environment.sh b/ci/generate-environment.sh
new file mode 100755
index 0000000..6b44313
--- /dev/null
+++ b/ci/generate-environment.sh
@@ -0,0 +1,48 @@
+#!/bin/bash -x
+##############################################################################
+# Copyright (c) 2015 EMC 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
+##############################################################################
+
+cd `dirname $0`
+if [ ! -d job ]
+then
+ mkdir job
+fi
+
+# TODO: This assumes JOID. Need to make this programmatic
+
+INSTALLER=JOID
+
+case $INSTALLER in
+ JOID)
+ # Determine Cinder backend
+ if [ ! -z "$(juju status | grep ceph)" ]
+ then
+ CINDER_BACKEND=ceph
+ JUJU_CHARM=ceph-osd
+ fi
+ if [ ! -z "$(juju status | grep scaleio)" ]
+ then
+ CINDER_BACKEND=scaleio
+ JUJU_CHARM=scaleio-sds
+ fi
+ # Determine how many storage blades we have
+ CINDER_NODES=`juju status | grep "$JUJU_CHARM/" | wc -l`
+ # Later, collect info about each node:
+ # juju status | grep hardware: | grep tags | grep -v virtual
+ ;;
+ *)
+ CINDER_BACKEND=ceph
+ CINDER_NODES=4
+esac
+
+cat << EOF > job/environment.rc
+export CINDER_BACKEND=$CINDER_BACKEND
+export CINDER_NODES=$CINDER_NODES
+export INSTALLER=$INSTALLER
+EOF \ No newline at end of file