summaryrefslogtreecommitdiff
path: root/contrib/docker/entrypoint-python-gitlab.sh
diff options
context:
space:
mode:
authorMax Wittig <max.wittig@siemens.com>2018-10-04 11:05:43 +0200
committerGitHub <noreply@github.com>2018-10-04 11:05:43 +0200
commit3a8b1a0b11b9e6a60037f90c99dd288cecd09d3d (patch)
treef6a213c90a372d29daac33771f8ffc6a82bfde5a /contrib/docker/entrypoint-python-gitlab.sh
parentea71f1d121b723140671e2090182174234f0e2a1 (diff)
parent756c73c011b64f94747638f9e5d9afa128aeafe0 (diff)
downloadgitlab-3a8b1a0b11b9e6a60037f90c99dd288cecd09d3d.tar.gz
Merge pull request #600 from hans-d/docker
more flexible docker
Diffstat (limited to 'contrib/docker/entrypoint-python-gitlab.sh')
-rwxr-xr-xcontrib/docker/entrypoint-python-gitlab.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/docker/entrypoint-python-gitlab.sh b/contrib/docker/entrypoint-python-gitlab.sh
new file mode 100755
index 0000000..6422ad0
--- /dev/null
+++ b/contrib/docker/entrypoint-python-gitlab.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+GITLAB_CFG=${GITLAB_CFG:-"/etc/python-gitlab-default.cfg"}
+
+cat << EOF > /etc/python-gitlab-default.cfg
+[global]
+default = gitlab
+ssl_verify = ${GITLAB_SSL_VERIFY:-true}
+timeout = ${GITLAB_TIMEOUT:-5}
+api_version = ${GITLAB_API_VERSION:-4}
+per_page = ${GITLAB_PER_PAGE:-10}
+
+[gitlab]
+url = ${GITLAB_URL:-https://gitlab.com}
+private_token = ${GITLAB_PRIVATE_TOKEN}
+oauth_token = ${GITLAB_OAUTH_TOKEN}
+http_username = ${GITLAB_HTTP_USERNAME}
+http_password = ${GITLAB_HTTP_PASSWORD}
+EOF
+
+exec gitlab --config-file "${GITLAB_CFG}" $@