diff options
Diffstat (limited to 'ci/clean.sh')
-rwxr-xr-x | ci/clean.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ci/clean.sh b/ci/clean.sh index 4c507b25..3c0a71e4 100755 --- a/ci/clean.sh +++ b/ci/clean.sh @@ -3,12 +3,13 @@ set -ex if [ ! -d environments.yaml ]; then - cp ~/joid_config/environments.yaml ./environments.yaml + cp ~/joid_config/environments.yaml ./environments.yaml || true + cp ~/.juju/environments.yaml ./environments.yaml || true fi jujuver=`juju --version` -if [ "$jujuver" -ge "2" ]; then +if [ "$jujuver" > "2" ]; then controllername=`awk 'NR==1{print $2}' environments.yaml` cloudname=`awk 'NR==1{print $2}' environments.yaml` juju kill-controller $controllername --timeout 10s -y || true |