]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
add script to run liveboot-gw autotests from within jenkins
authorHolger Levsen <holger@layer-acht.org>
Mon, 4 Mar 2013 17:16:25 +0000 (18:16 +0100)
committerHolger Levsen <holger@layer-acht.org>
Mon, 4 Mar 2013 17:16:25 +0000 (18:16 +0100)
liveboot_gw_autotest.sh [new file with mode: 0755]

diff --git a/liveboot_gw_autotest.sh b/liveboot_gw_autotest.sh
new file mode 100755 (executable)
index 0000000..d7fef5a
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# copyright 2013 Holger Levsen <holger@layer-acht.org>
+# GPL2 licenced
+
+set -e
+set -x
+export
+
+CORE_ROUTER=cr13
+GATEWAY=gw1301
+PSERVER=pserver1301
+
+#
+# prepare pserver
+#
+ssh -i ~/.ssh/id_ritest $PSERVER "sudo dmsetup remove_all"
+ssh -i ~/.ssh/id_ritest $PSERVER "sudo mkdir -p /mnt/local_hdd"
+ssh -i ~/.ssh/id_ritest $PSERVER "sudo mount /dev/sda1 -t ext3 /mnt/local_hdd"
+
+#
+# prepare core router
+#
+ssh -i ~/.ssh/id_ritest $CORE_ROUTER "sudo rm /opt/autotest -rf"
+ssh -i ~/.ssh/id_ritest $CORE_ROUTER "git clone git://git/ri/autotest.git /opt/autotest"
+ssh -i ~/.ssh/id_ritest $CORE_ROUTER "cd /opt/autotest ; git checkout develop"
+ssh -A -i ~/.ssh/id_ritest $CORE_ROUTER "cd /opt/autotest ; ./run-compile.sh --config config-jenkins.xml"
+
+