From: Dongsu Park Date: Wed, 17 Apr 2013 12:05:44 +0000 (+0200) Subject: extract_storage_kernel+modules: add support for feature branches X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=6d759865f51b6302f36a1051510d230d6c9b5368;p=profitbricks%2Fjenkins-build-scripts.git extract_storage_kernel+modules: add support for feature branches Now extract_storage_kernel+modules is able to copy kernel images from feature branches. Output tar.gz file will be stored under /srv/storage-kernels/$DISTRIBUTION/, where $DISTRIBUTION indicates target name for a feature branch. (e.g. dev-feature-ssdcache-all) --- diff --git a/extract_storage_kernel+modules.sh b/extract_storage_kernel+modules.sh index 885f4fa..50b1ccc 100755 --- a/extract_storage_kernel+modules.sh +++ b/extract_storage_kernel+modules.sh @@ -18,8 +18,15 @@ if [ "$DISTRIBUTION" = "production-proposed-updates" ] ; then export TARGET_NAME=master elif [ "$DISTRIBUTION" = "pre-staging" ] ; then export TARGET_NAME=develop +elif [[ "$DISTRIBUTION" = dev-feature* ]] ; then + export TARGET_NAME=$DISTRIBUTION + FEATURE_APTCMD=" + echo \"deb http://alexandria.pb.local/dev-repository $DISTRIBUTION main contrib non-free\" \ + > /etc/apt/sources.list.d/profitbricks-linux-image-storage-$DISTRIBUTION.list + " else - echo "DISTRIBUTION must be 'production-proposed-updates' or 'pre-staging', exiting." + echo "DISTRIBUTION must be 'production-proposed-updates', 'pre-staging', or 'dev-feature*'." + echo "exiting." figlet "FAIL" exit 1 fi @@ -32,10 +39,12 @@ cat > $BUILD_SCRIPT <<-EOF #/bin/bash set -e set -x +$FEATURE_APTCMD apt-get update # grub is needed in the postinst... apt-get install -y grub2 -apt-get -y install profitbricks-andbd-modules-storage profitbricks-linux-image-storage || true +apt-get -y install profitbricks-andbd-modules-storage || true +apt-get -t $DISTRIBUTION -y install profitbricks-linux-image-storage || true mkdir -p $TARGET_DIR export KERNEL_VERSION=###(ls /boot/vmlinu* | cut -d "-" -f2-) export GENTOO_KERNEL_VERSION="###(ls /boot/vmlinu* | cut -d "-" -f2).$BUILD_NUMBER"