summaryrefslogtreecommitdiffstats
path: root/ci/01-bootstrap.sh
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2016-10-16 07:54:56 -0500
committerNarinder Gupta <narinder.gupta@canonical.com>2016-10-16 23:43:55 -0500
commitf1dfc0776d32dea2a2fe7e2cb2b15b1836a6b666 (patch)
treeb75bd8543a4ba5cc7919c43588b2522201c88c90 /ci/01-bootstrap.sh
parent498d228be6d2bb1f68b5d63813e01ecd68b315cd (diff)
cmodfiied to add juju 2.0 support.
Change-Id: I3981f796cfb9ceb9f32522f4fed831d66e389c48 Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/01-bootstrap.sh')
-rwxr-xr-xci/01-bootstrap.sh20
1 files changed, 14 insertions, 6 deletions
diff --git a/ci/01-bootstrap.sh b/ci/01-bootstrap.sh
index 59a22197..4a20ca23 100755
--- a/ci/01-bootstrap.sh
+++ b/ci/01-bootstrap.sh
@@ -4,11 +4,19 @@ set -ex
#export JUJU_DEV_FEATURE_FLAGS=address-allocation
-juju bootstrap --debug --to bootstrap.maas
-sleep 5
-#disable juju gui until xenial charms are in charm store.
-juju deploy cs:juju-gui-130 --to 0
+jujuver=`juju --version`
-JUJU_REPOSITORY=
-juju set-constraints tags=
+if [ "$jujuver" -lt "2" ]; then
+ juju bootstrap --debug --to bootstrap.maas
+ sleep 5
+ #disable juju gui until xenial charms are in charm store.
+ juju deploy cs:juju-gui-130 --to 0
+ JUJU_REPOSITORY=
+ juju set-constraints tags=
+
+else
+ controllername=`awk 'NR==1{print $2}' environments.yaml`
+ cloudname=`awk 'NR==1{print $2}' environments.yaml`
+ juju bootstrap $controllername $cloudname --debug --to bootstrap.maas
+fi