From de8ce41b2f00cbd50f40f909ba99419173c2a0d6 Mon Sep 17 00:00:00 2001 From: Denis Egorenko Date: Wed, 25 Jun 2014 19:05:55 +0400 Subject: [PATCH] Fix deleting clusters for diskimage-integration job Change-Id: Ic29345e1500a4c4f77ad88e3c8d4dbe3eed6fa98 --- slave-scripts/integration-cleanup.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/slave-scripts/integration-cleanup.sh b/slave-scripts/integration-cleanup.sh index aa3936da..5f02fbad 100644 --- a/slave-scripts/integration-cleanup.sh +++ b/slave-scripts/integration-cleanup.sh @@ -8,14 +8,21 @@ if [ $JOB_TYPE == 'diskimage' ]; then PLUGIN=$(echo $PREV_JOB | awk -F '-' '{ print $3 }') if [ $PLUGIN == 'vanilla' ]; then IMAGE_TYPE=$(echo $PREV_JOB | awk -F '-' '{ print $4 }') - python cleanup.py cleanup $IMAGE_TYPE-$PREV_BUILD-vanilla-v1 - python cleanup.py cleanup $IMAGE_TYPE-$PREV_BUILD-vanilla-v2 + if [ "$IMAGE_TYPE" == "centos" ]; then + os="cos" + elif [ "$IMAGE_TYPE" == "fedora" ]; then + os="fos" + elif [ "$IMAGE_TYPE" == "ubuntu" ]; then + os="uos" + fi + python cleanup.py cleanup $os-$PREV_BUILD-vanilla-v1 + python cleanup.py cleanup $os-$PREV_BUILD-vanilla-v2 elif [ $PLUGIN == 'hdp1' ]; then - python cleanup.py cleanup centos-$PREV_BUILD-hdp + python cleanup.py cleanup cos-$PREV_BUILD-hdp elif [ $PLUGIN == 'hdp2' ]; then - python cleanup.py cleanup centos-$PREV_BUILD-hdp-v2 + python cleanup.py cleanup cos-$PREV_BUILD-hdp-v2 else - python cleanup.py cleanup ubuntu-$PREV_BUILD-$PLUGIN + python cleanup.py cleanup uos-$PREV_BUILD-$PLUGIN fi else JOB_TYPE=$(echo $PREV_JOB | awk -F '-' '{ print $4 }')