diff options
author | Max Wittig <max.wittig@siemens.com> | 2020-02-24 14:02:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-24 14:02:46 +0100 |
commit | 745bdf7caeffa907bb0594b602194f41d3a75e3e (patch) | |
tree | 7eb5a839bcb5484ae1b1c065311b048b1056c953 /tools | |
parent | 2b3871d85e0f875edacc8eea5542df4d1f4c66f0 (diff) | |
parent | fab17fcd6258b8c3aa3ccf6c00ab7b048b6beeab (diff) | |
download | gitlab-745bdf7caeffa907bb0594b602194f41d3a75e3e.tar.gz |
Merge pull request #1022 from nejch/chore/ensure-latest-image
chore: ensure developers use same gitlab image as CI
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/build_test_env.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/build_test_env.sh b/tools/build_test_env.sh index 7a3fc23..7468a9a 100755 --- a/tools/build_test_env.sh +++ b/tools/build_test_env.sh @@ -29,12 +29,15 @@ REUSE_CONTAINER= NOVENV= PY_VER=3 API_VER=4 +GITLAB_IMAGE="gitlab/gitlab-ce" +GITLAB_TAG="latest" while getopts :knp:a: opt "$@"; do case $opt in k) REUSE_CONTAINER=1;; n) NOVENV=1;; p) PY_VER=$OPTARG;; a) API_VER=$OPTARG;; + t) GITLAB_TAG=$OPTARG;; :) fatal "Option -${OPTARG} requires a value";; '?') fatal "Unknown option: -${OPTARG}";; *) fatal "Internal error: opt=${opt}";; @@ -81,6 +84,7 @@ cleanup() { } if [ -z "$REUSE_CONTAINER" ] || ! docker top gitlab-test >/dev/null 2>&1; then + try docker pull "$GITLAB_IMAGE:$GITLAB_TAG" GITLAB_OMNIBUS_CONFIG="external_url 'http://gitlab.test' gitlab_rails['initial_root_password'] = '5iveL!fe' gitlab_rails['initial_shared_runners_registration_token'] = 'sTPNtWLEuSrHzoHP8oCU' @@ -103,7 +107,7 @@ letsencrypt['enable'] = false " try docker run --name gitlab-test --detach --publish 8080:80 \ --publish 2222:22 --env "GITLAB_OMNIBUS_CONFIG=$GITLAB_OMNIBUS_CONFIG" \ - gitlab/gitlab-ce:latest >/dev/null + "$GITLAB_IMAGE:$GITLAB_TAG" >/dev/null fi LOGIN='root' |