Commit be97cf06 authored by Holger Levsen's avatar Holger Levsen

g-i: share downloaded isos between jobs and save 50gb of storage space

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent e2fe42e7
#!/bin/bash
# Copyright 2012-2016 Holger Levsen <holger@layer-acht.org>
# Copyright 2012-2018 Holger Levsen <holger@layer-acht.org>
# released under the GPLv=2
DEBUG=false
......@@ -34,7 +34,7 @@ if [ "$(basename $URL)" = "netboot.tar.gz" ] ; then
# URL is for a PXE netboot installer, rather than a CD .iso
NETBOOT=$(pwd)/$(basename $URL)
elif [ "$(basename $URL)" != "amd64" ] ; then
IMAGE=$(pwd)/$(basename $URL)
IMAGE="~/jobs/g-i-installation_maintenance/workspace/$(echo $URL | cut -d '/' -f3-|tr '/' '_'|tr '~' '_')"
IMAGE_MNT="/media/cd-$NAME.iso"
else
KERNEL=linux
......
......@@ -280,12 +280,15 @@ else
report_filetype_usage $1 png
report_filetype_usage $1 bak
report_filetype_usage $1 raw warn
report_filetype_usage $1 iso warn
report_filetype_usage $1 iso
rm $ACTIVE_JOBS $WATCHED_JOBS $RUNNING
for VOLUME in $(sudo lvdisplay jenkins01|grep "LV Path" |grep -v "/dev/jenkins01/swap" | cut -d '/' -f2-) ; do
if [ -z "$(ps fax | grep "$VOLUME" | grep -v grep)" ] ; then
echo "Error: /$VOLUME exists, but no running job is using it."
exit 1
else
echo "/$VOLUME is used by a running job, fine."
fi
done
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment