summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVarac <varac@leap.se>2017-06-29 17:14:45 +0200
committerVarac <varac@leap.se>2017-06-30 17:34:08 +0200
commit5816661ab20f2b2641bc3c19dc495b28e531213e (patch)
tree188c68ad079688b67ac36eb980354ed058d352ca /tests
parent1bcd200ec20a28a1c360afdf097dc4fcaa9c00a8 (diff)
[CI] Add upgrade tests to ci-build.sh
Diffstat (limited to 'tests')
-rwxr-xr-xtests/platform-ci/ci-build.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/platform-ci/ci-build.sh b/tests/platform-ci/ci-build.sh
index b02fe89d..256164ac 100755
--- a/tests/platform-ci/ci-build.sh
+++ b/tests/platform-ci/ci-build.sh
@@ -140,6 +140,29 @@ run() {
test
}
+upgrade_test() {
+ # Checkout stable branch containing last release
+ # and deploy this
+ cd "$PLATFORMDIR"
+ git remote add leap https://leap.se/git/leap_platform
+ git fetch leap
+ git checkout -b leap_stable remotes/leap/stable
+ cd "$PROVIDERDIR"
+ build_from_scratch
+ deploy
+ test
+
+ # Checkout HEAD of current branch and re-deploy
+ cd "$PLATFORMDIR"
+ git checkout "$CI_COMMIT_REF"
+ cd "$PROVIDERDIR"
+ deploy
+ test
+
+ cleanup
+
+}
+
cleanup() {
# if everything succeeds, destroy the vm
LEAP_CMD vm rm "${TAG}"
@@ -184,6 +207,9 @@ case "$CI_JOB_NAME" in
test
cleanup
;;
+ upgrade_test)
+ upgrade_test
+ ;;
*)
fail "Don't know what to do for \$CI_JOB_NAME \"$CI_JOB_NAME\"!"
;;