gate: custom handling of cloudera images

Generating cloudera images requires lots of space, in terms of cached
resources (distribution base images, packages, etc) and generated
images. This causes the generation of all the cloudera images to
(almost?) always fail on the gate slaves, as running out of space.

As a workaround to this, manually invoke the generation of cloudera
images per-distro, cleaning the cache (which contains mostly stuff
specific to the last built distribution) and the generated images after
each run.

Change-Id: I4468f9e2926e101864e73f8aedf7b0612a3f7a96
This commit is contained in:
Pino Toscano 2015-09-14 13:10:05 +02:00
parent bd64337f9d
commit eaf37bdace
1 changed files with 15 additions and 1 deletions

View File

@ -2,4 +2,18 @@
PLUGIN=$1
tox -e venv -- sahara-image-create -x -u -p $PLUGIN
case "$PLUGIN" in
"cloudera")
# manually call each distro for cloudera, so we can cleanup
# cache and generated images from the previous run
# (saving space a bit)
for distro in ubuntu centos; do
tox -e venv -- sahara-image-create -x -u -p $PLUGIN -i $distro
find . -maxdepth 1 -name '*cloudera*.qcow2' -delete
sudo rm -rf ~/.cache/image-create
done
;;
*)
tox -e venv -- sahara-image-create -x -u -p $PLUGIN
;;
esac