diff --git a/README.md b/README.md index 5a2dd7e3..12247227 100644 --- a/README.md +++ b/README.md @@ -999,6 +999,10 @@ GitLabHQ releases new versions on the 22nd of every month, bugfix releases immed To upgrade to newer gitlab releases, simply follow this 4 step upgrade procedure. +> **Note** +> +> Upgrading to `sameersbn/gitlab:8.3.2` from `sameersbn/gitlab:7.x.x` can cause issues. It is therefore required that you first upgrade to `sameersbn/gitlab:8.0.5-1` before upgrading to `sameersbn/gitlab:8.1.0` or higher. + - **Step 1**: Update the docker image. ```bash diff --git a/assets/runtime/functions b/assets/runtime/functions index 8e2aa39f..f47ad315 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -1103,6 +1103,19 @@ migrate_database() { return 1 fi + if [[ $(vercmp ${GITLAB_VERSION} 8.0.0) -gt 0 ]]; then + if [[ $(vercmp ${CACHE_VERSION} 8.0.0) -lt 0 ]]; then + echo + echo "ABORT: " + echo " Upgrading to GitLab ${GITLAB_VERSION} from ${CACHE_VERSION} is not recommended." + echo " Please upgrade to version 8.0.5-1 before upgrading to 8.1.0 or higher." + echo " Refer to https://git.io/vur4j for CI migration instructions." + echo " Aborting for your own safety!" + echo + return 1 + fi + fi + echo "Migrating database..." exec_as_git bundle exec rake db:migrate >/dev/null exec_as_git echo "${GITLAB_VERSION}" > ${GITLAB_DATA_DIR}/tmp/VERSION