summaryrefslogtreecommitdiffstats
path: root/ci/launch_docker_container.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/launch_docker_container.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/launch_docker_container.sh')
-rwxr-xr-xci/launch_docker_container.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/ci/launch_docker_container.sh b/ci/launch_docker_container.sh
new file mode 100755
index 0000000..60d1a07
--- /dev/null
+++ b/ci/launch_docker_container.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2016 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`
+
+storperf_container=`docker ps -a -q -f name=storperf`
+
+if [ ! -z $storperf_container ]
+then
+ echo "Stopping any existing StorPerf container"
+ docker rm -fv $storperf_container
+fi
+
+if [ ! -f job/admin.rc ]
+then
+ ./generate-admin-rc.sh
+fi
+
+if [ ! -d job/carbon ]
+then
+ mkdir job/carbon
+ sudo chown 33:33 job/carbon
+fi
+
+docker run -d --env-file `pwd`/job/admin.rc \
+ -p 5000:5000 \
+ -p 8000:8000 \
+ -v `pwd`/job/carbon:/opt/graphite/storage/whisper \
+ -v `pwd`/../../storperf:/home/opnfv/repos/storperf \
+ --name storperf opnfv/storperf
+
+