cp -v /boot/config* $TARGET_DIR/
cd /lib/modules/*storage/
/bin/tar -cJvf $TARGET_DIR/modules.tar.xz .
+echo "Job : $JOBNAME" > $TARGET_DIR/sources.txt
+echo "Build-Nr.: $BUILD_NUMBER" >> $TARGET_DIR/sources.txt
+echo "URL : http://jenkins/job/$JOB_NAME/$BUILD_NUMBER/" >> $TARGET_DIR/sources.txt
+echo >> $TARGET_DIR/sources.txt
+apt-cache show profitbricks-linux-image-storage >> $TARGET_DIR/sources.txt
+apt-cache show profitbricks-andbd-modules-storage >> $TARGET_DIR/sources.txt
EOF
chmod +x $BUILD_SCRIPT
sudo pbuilder --execute --bindmounts $TARGET_BASE -- $BUILD_SCRIPT
rm $BUILD_SCRIPT
-
-echo "Garbage collection in debug mode..."
+set +x
+echo "Doing garbage collection now"
#
-# cleanup $TARGET_DIR, keep as many images as jenkins
+# cleanup $TARGET_DIR, keep as many images as jenkins keeps build logs
#
cd $TARGET_BASE/$TARGET_NAME
# loop through all results of current target
for i in $(ls -at1) ; do
- echo $i
# check if the jenkins build log still exists (and doesnt start with ".")
# and if not, delete the old target as well
if [ ! -L $JOB_HOME/$i ] && [ "${i:0:1}" != "." ] ; then
- echo sudo rm -rfv ./$i
- else
- echo "keeping $i"
+ sudo rm -r ./$i
fi
done