summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMax Wittig <max.wittig95@gmail.com>2020-03-22 17:50:11 +0100
committerGitHub <noreply@github.com>2020-03-22 17:50:11 +0100
commit8173021f996aca60756bfb248fdf8748d7a813df (patch)
treeea6d1654b0990bdbcd0d65b83b6d6ae4d3384e4f /tools
parent1b8e74887945b363eb46908f2b5f9fa7eb6da40d (diff)
parent265bbddacc25d709a8f13807ed04cae393d9802d (diff)
downloadgitlab-8173021f996aca60756bfb248fdf8748d7a813df.tar.gz
Merge pull request #1054 from nejch/chore/cleanup-test-env
chore: improve test environment for upcoming features
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build_test_env.sh16
1 files changed, 5 insertions, 11 deletions
diff --git a/tools/build_test_env.sh b/tools/build_test_env.sh
index 7468a9a..91c2896 100755
--- a/tools/build_test_env.sh
+++ b/tools/build_test_env.sh
@@ -27,16 +27,16 @@ try() { "$@" || fatal "'$@' failed"; }
REUSE_CONTAINER=
NOVENV=
-PY_VER=3
API_VER=4
-GITLAB_IMAGE="gitlab/gitlab-ce"
-GITLAB_TAG="latest"
-while getopts :knp:a: opt "$@"; do
+GITLAB_IMAGE="${GITLAB_IMAGE:-gitlab/gitlab-ce}"
+GITLAB_TAG="${GITLAB_TAG:-latest}"
+VENV_CMD="python3 -m venv"
+while getopts :knp:a:i:t: opt "$@"; do
case $opt in
k) REUSE_CONTAINER=1;;
n) NOVENV=1;;
- p) PY_VER=$OPTARG;;
a) API_VER=$OPTARG;;
+ i) GITLAB_IMAGE=$OPTARG;;
t) GITLAB_TAG=$OPTARG;;
:) fatal "Option -${OPTARG} requires a value";;
'?') fatal "Unknown option: -${OPTARG}";;
@@ -44,12 +44,6 @@ while getopts :knp:a: opt "$@"; do
esac
done
-case $PY_VER in
- 2) VENV_CMD=virtualenv;;
- 3) VENV_CMD="python3 -m venv";;
- *) fatal "Wrong python version (2 or 3)";;
-esac
-
case $API_VER in
4) ;;
*) fatal "Wrong API version (4 only)";;