From 5816661ab20f2b2641bc3c19dc495b28e531213e Mon Sep 17 00:00:00 2001 From: Varac Date: Thu, 29 Jun 2017 17:14:45 +0200 Subject: [CI] Add upgrade tests to ci-build.sh --- tests/platform-ci/ci-build.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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\"!" ;; -- cgit v1.2.3