]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
Added image link parameter
authorMarjan Schiller <marjan.schiller@profitbricks.com>
Wed, 12 Jun 2013 13:40:44 +0000 (15:40 +0200)
committerMarjan Schiller <marjan.schiller@profitbricks.com>
Wed, 12 Jun 2013 13:40:44 +0000 (15:40 +0200)
liveboot_set_image.sh

index f37eeb977587c5335666430519ea7f9488b4eb23..84e60524df673d16616c17f248cc0228d79f034d 100755 (executable)
@@ -8,6 +8,16 @@ set -e
 export
 echo
 
+#
+# check if we have a LIVEBOOT_IMAGE_LINK
+#
+if [ "$LIVEBOOT_IMAGE_LINK" != "" ] ; then
+        echo "Ok, got LIVEBOOT_IMAGE_LINK=$LIVEBOOT_IMAGE_LINK, which is valid."
+else
+        echo "Fail, no LIVEBOOT_IMAGE_LINK set."
+        exit 1
+fi
+
 #
 # check if we have a LIVEBOOT_BUILD_NUMBER
 #
@@ -33,7 +43,7 @@ fi
 #
 # create pending-approval link
 #
-ssh -oStrictHostKeyChecking=no -i ~/.ssh/id_ritest root@riserver "rm -f /srv/mirror/liveboot/autotest; ln -sfv $(basename $SOURCE_DIR) /srv/mirror/liveboot/autotest"
+ssh -oStrictHostKeyChecking=no -i ~/.ssh/id_ritest root@riserver "rm -f /srv/mirror/liveboot/$LIVEBOOT_IMAGE_LINK; ln -sfv $(basename $SOURCE_DIR) /srv/mirror/liveboot/$LIVEBOOT_IMAGE_LINK"
 #
 # finish
 #