summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2016-11-01 14:30:56 -0400
committerMicah Anderson <micah@riseup.net>2016-11-01 14:30:56 -0400
commit309aadfc6d9af984852922763e4fcfb7be6ebec7 (patch)
tree923cf2237ffdbb557753d955e627d69ea9b6c056
parentd62a5e73adf8bf7be891d815f6132d20f8f732f4 (diff)
Add ugly work around to set the cli version
fix some from/to mistakes remove the singlenode abstract out the get_cli into a function add --continue to tests
-rwxr-xr-xbin/lut.sh61
1 files changed, 39 insertions, 22 deletions
diff --git a/bin/lut.sh b/bin/lut.sh
index df6a006..01903e2 100755
--- a/bin/lut.sh
+++ b/bin/lut.sh
@@ -10,10 +10,30 @@ to_version=$2
#workdir=`mktemp -d`
workdir='/tmp/lut'
platform_link="${workdir}/leap_platform"
-platform_from=${workdir}/platform_$1
-platform_to=${workdir}/platform_$1
-cli_from=${workdir}/cli_master
-cli_to=${workdir}/cli_develop
+
+# note: the following is an ugly way to set the cli version it is based on
+# the fact that the second number in the platform version is the second
+# number of the cli version, with a prepended 1. For example, if the
+# platform version in 0.8.2, then the cli version is 1.8.
+if [ "$1" == 'develop' ]; then
+ cli_fromver='develop'
+else
+ cli_fromver=1.${1:2:1}
+fi
+
+if [ "$2" == 'develop' ]; then
+ cli_tover='develop'
+else
+ cli_tover=1.${2:2:1}
+fi
+
+if [ "$1" == 'develop' -a "$2" == 'develop' ]; then
+ echo 'wut'
+ exit 9000
+fi
+
+cli_from=${workdir}/cli_${cli_fromver}
+cli_to=${workdir}/cli_${cli_tover}
# If you hit control-c or kill the process, stop the VMs
@@ -57,20 +77,15 @@ get_platform () {
}
get_cli () {
- # note: the following is an ugly way to set the cli version it is based on
- # the fact that the second number in the platform version is the second
- # number of the cli version, with a prepended 1. For example, if the
- # platform version in 0.8.2, then the cli version is 1.8.
- version=$2
- if [ "$version" == 'develop' ]; then
- cli_version='develop'
- else
- cli_version=1.${version:2:1}
- fi
- cli_dir=${workdir}/cli_${cli_version}
echo "Setup leap_cli"
- git clone $cli_git $cli_dir --branch $cli_version
- cd $cli_dir
+ git clone $cli_git $cli_from --branch $cli_fromver
+ git clone $cli_git $cli_to --branch $cli_tover
+
+ cd $cli_from
+ rake build
+ bundle --path vendor/bundle
+
+ cd $cli_to
rake build
bundle --path vendor/bundle
}
@@ -109,7 +124,7 @@ deploy () {
if [ $? -ne 0 ]; then
cleanup 1
else
- echo "$2 environment deployed with old version of platform"
+ echo "$2 environment deployed with $1 version of platform"
fi
}
@@ -124,13 +139,13 @@ if [ $# -ne 2 ]; then
help
else
leap vm rm upgrade
+ leap vm rm singlenode
rm -rf $workdir
check_version $platform_git $from_version
check_version $platform_git $to_version
get_platform $platform_git $from_version
get_platform $platform_git $to_version
- get_cli $cli_git $from_version
- get_cli $cli_git $to_version
+ get_cli
cd $provider_dir
switch $to_version
start_nodes
@@ -155,13 +170,15 @@ else
# 0.8 hack, remove after 0.9 release
switch $from_version
deploy $cli_from upgrade
+ $cli_from/bin/leap test --continue upgrade
deploy $cli_from singlenode
- $cli_from/bin/leap test
+ $cli_from/bin/leap test --continue singlenode
switch $to_version
deploy $cli_to upgrade
+ $cli_to/bin/leap test --continue upgrade
deploy $cli_to singlenode
- $cli_to/bin/leap test
+ $cli_to/bin/leap test --continue singlenode
cleanup 0
fi