summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2020-02-19 01:12:52 +0100
committerNejc Habjan <hab.nejc@gmail.com>2020-02-19 01:12:52 +0100
commitfab17fcd6258b8c3aa3ccf6c00ab7b048b6beeab (patch)
treef309979c01d1992b77e9b40393bfd0e1ae98c363 /tools
parent19242c398b9074e04e35cc687c31c543a10db280 (diff)
downloadgitlab-fab17fcd6258b8c3aa3ccf6c00ab7b048b6beeab.tar.gz
chore: ensure developers use same gitlab image as Travis
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build_test_env.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/build_test_env.sh b/tools/build_test_env.sh
index f5feebf..d8e8166 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'