X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=ci%2Fclean.sh;h=079828a0eae37fb90dc10615217ffeba32981d5e;hb=d34b7dfbcee799533c25735db0e8aa47f433c0c7;hp=3c0a71e4ab540c07b636a7c889984d18d2afd927;hpb=7ae91a059f2b498ebacc66440f5de21eea99033c;p=joid.git diff --git a/ci/clean.sh b/ci/clean.sh index 3c0a71e4..079828a0 100755 --- a/ci/clean.sh +++ b/ci/clean.sh @@ -7,15 +7,22 @@ if [ ! -d environments.yaml ]; then cp ~/.juju/environments.yaml ./environments.yaml || true fi +if [ ! -d deployment.yaml ]; then + cp ~/joid_config/deployment.yaml ./deployment.yaml || true + cp ~/.juju/deployment.yaml ./deployment.yaml || true +fi + jujuver=`juju --version` -if [ "$jujuver" > "2" ]; then - controllername=`awk 'NR==1{print $2}' environments.yaml` - cloudname=`awk 'NR==1{print $2}' environments.yaml` +if [[ "$jujuver" > "2" ]]; then + controllername=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployment.yaml` + cloudname=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployment.yaml` juju kill-controller $controllername --timeout 10s -y || true rm -rf precise rm -rf trusty rm -rf xenial + sleep 30 + sudo sysctl -w vm.drop_caches=3 elif [ -d $HOME/.juju/environments ]; then echo " " > status.txt juju status &>>status.txt || true @@ -33,5 +40,8 @@ elif [ -d $HOME/.juju/environments ]; then rm -rf $HOME/.juju/.deployer-store-cache rm -rf $HOME/.juju/environments rm -rf $HOME/.juju/ssh + sudo sysctl -w vm.drop_caches=3 fi +#sudo apt-get purge maas maas-cli maas-common maas-dhcp maas-dns maas-proxy maas-rack-controller maas-region-api maas-region-controller -y +#sudo rm -rf /var/lib/maas