[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] g-i: share downloaded isos between jobs and save 50gb of storage space
Holger Levsen
gitlab at salsa.debian.org
Fri Oct 19 16:27:59 BST 2018
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
be97cf06 by Holger Levsen at 2018-10-19T15:27:37Z
g-i: share downloaded isos between jobs and save 50gb of storage space
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
2 changed files:
- bin/g-i-installation.sh
- bin/maintenance.sh
Changes:
=====================================
bin/g-i-installation.sh
=====================================
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2012-2016 Holger Levsen <holger at layer-acht.org>
+# Copyright 2012-2018 Holger Levsen <holger at 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
=====================================
bin/maintenance.sh
=====================================
@@ -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
;;
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/be97cf06690194a2b47318b1dc21f309dfb292b5
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/be97cf06690194a2b47318b1dc21f309dfb292b5
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20181019/10dce4d3/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list