2015-03-06 15:59:59 +04:00
|
|
|
#!/bin/bash -e
|
2014-02-18 15:29:14 +04:00
|
|
|
|
2015-01-05 16:13:25 +04:00
|
|
|
cd sahara-ci-config/slave-scripts
|
2014-02-18 15:29:14 +04:00
|
|
|
sleep 20
|
2014-05-05 14:17:38 +04:00
|
|
|
|
2014-07-15 14:57:03 +04:00
|
|
|
source $JENKINS_HOME/credentials
|
2014-11-12 12:54:47 +04:00
|
|
|
set -x
|
2015-03-06 15:59:59 +04:00
|
|
|
job_type=$(echo $PREV_JOB | awk -F '-' '{ print $1 }')
|
2015-03-23 18:06:04 +04:00
|
|
|
export os_username=$os_username
|
|
|
|
export os_password=$os_password
|
|
|
|
export os_tenant_name=$os_tenant_name
|
2016-08-26 14:18:21 +03:00
|
|
|
if [[ "$HOST_NAME" =~ stack-42 ]]; then
|
2016-04-13 17:26:23 +03:00
|
|
|
export os_auth_url="http://$OPENSTACK_HOST_LAB_42:5000/v2.0"
|
2016-04-18 18:14:18 +03:00
|
|
|
export os_image_endpoint="http://$OPENSTACK_HOST_LAB_42:8004/v1/$LAB_42_TENANT_ID"
|
2015-03-06 15:59:59 +04:00
|
|
|
host="c1"
|
2014-07-15 14:57:03 +04:00
|
|
|
else
|
2016-04-13 17:26:23 +03:00
|
|
|
export os_auth_url="http://$OPENSTACK_HOST_LAB_43:5000/v2.0"
|
|
|
|
export os_image_endpoint="http://$OPENSTACK_HOST_LAB_43:8004/v1/$LAB_43_TENANT_ID"
|
2015-03-06 15:59:59 +04:00
|
|
|
host="c2"
|
2014-07-15 14:57:03 +04:00
|
|
|
fi
|
2015-03-04 19:39:27 +04:00
|
|
|
if [[ $(echo $PREV_JOB | awk -F '-' '{ print $2 }') =~ ui ]]; then
|
2015-01-22 17:41:32 +03:00
|
|
|
python cleanup.py cleanup .*$PREV_BUILD-selenium.*
|
2014-06-11 14:18:12 +04:00
|
|
|
else
|
2016-04-11 11:13:25 +03:00
|
|
|
python cleanup.py cleanup-heat .*$host-$CHANGE_NUMBER-$CLUSTER_HASH.*
|
2014-02-18 15:29:14 +04:00
|
|
|
fi
|