]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
create pending-approval link first, then rsync again
authorHolger Levsen <holger@layer-acht.org>
Fri, 14 Dec 2012 11:06:11 +0000 (12:06 +0100)
committerHolger Levsen <holger@layer-acht.org>
Fri, 14 Dec 2012 11:06:11 +0000 (12:06 +0100)
liveboot_testdeploy.sh

index c1be9528f64aaf2b51d50af9e365511cee3be1b9..57e00e8a4fb11136ef6a34d75cc91527d0eb8ea1 100755 (executable)
@@ -12,9 +12,6 @@ TESTSERVER=pserver2
 TESTSERVER_MGMT_IP=192.168.178.49
 TESTSERVER_MGMT_PASSWD_FILE=/etc/jenkins/pserver2.ipmi
 
-##TFTP_TARGET=/srv/tftp/liveboot
-##HTTP_TARGET=/var/www/liveboot/
-
 
 #
 # check if we have a LIVEBOOT_BUILD_NUMBER
@@ -25,6 +22,7 @@ else
        echo "Fail, no LIVEBOOT_BUILD_NUMBER set."
        exit 1
 fi
+
 #
 # check if there is an image for it
 #
@@ -45,18 +43,12 @@ if [ ! -e $MAIL ] ; then
 fi
 
 #
-# reconfigure PXE to make $TESTSERVER boot this image
+# create pending-approval link and rsync again
 #
-###
-### needs ~liveboot@riserver:.ssh/authorized_keys configured like this
-### command="/bin/cp ${SSH_ORIGINAL_COMMAND#* }",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,from="192.168.178.17"
-### thanks to http://larstobi.blogspot.de/2011/01/restrict-ssh-access-to-one-command-but.html
-###
-#ssh liveboot@riserver cp -v $SOURCE_DIR/vmlinuz $TFTP_TARGET/pserver2_vmlinuz
-#ssh liveboot@riserver cp -v $SOURCE_DIR/initramfs.cpio.gz $TFTP_TARGET/pserver2_initramfs.cpio.gz
-#echo "Ok, copied vmlinuz and initramfs.cpio.gz from $SOURCE_DIR to riserver:$TFTP_TARGET/"
-#ssh liveboot@riserver cp -v $SOURCE_DIR/root.tar.xz $HTTP_TARGET/pserver2_root.tar.xz
-#echo "Ok, copied root.tar.xz from $SOURCE_DIR to riserver:$HTTP_TARGET/"
+cd /srv/mirror/liveboot
+ln -sfv $(basename $SOURCE_DIR) pending-approval
+echo "pending-approval link creating, pointing to $SOURCE_DIR"
+$(basename $0)/liveboot_rsync.sh
 
 #
 # reboot TESTSERVER
@@ -119,13 +111,6 @@ if ! $(nc -z $TESTSERVER 22 ) ; then
 fi
 echo
 
-#
-# create pending-approval link
-#
-cd /srv/mirror/liveboot
-ln -sfv $(basename $SOURCE_DIR) pending-approval
-echo "pending-approval link creating, pointing to $SOURCE_DIR"
-echo "will trigger liveboot_rsync job after this job is done."
 
 #
 # output announcement mail headers