From: Holger Levsen Date: Fri, 14 Dec 2012 11:06:11 +0000 (+0100) Subject: create pending-approval link first, then rsync again X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=e343c1a658e5b99c1aca25140d03a775d498a057;p=profitbricks%2Fjenkins-build-scripts.git create pending-approval link first, then rsync again --- diff --git a/liveboot_testdeploy.sh b/liveboot_testdeploy.sh index c1be952..57e00e8 100755 --- a/liveboot_testdeploy.sh +++ b/liveboot_testdeploy.sh @@ -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