Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qa/gdk/entrypoint')
-rwxr-xr-xqa/gdk/entrypoint21
1 files changed, 21 insertions, 0 deletions
diff --git a/qa/gdk/entrypoint b/qa/gdk/entrypoint
new file mode 100755
index 00000000000..3b86f19b9b2
--- /dev/null
+++ b/qa/gdk/entrypoint
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+set -e
+
+# host file can't be modified during docker build because it is created on container start
+# this makes for a more portable solution as other alternative is to use `--add-host` option for 'docker run' command
+# We want a non-loopback ip otherwise some services (maybe just workhorse?) bind to localhost and can't be accessed
+# from outside the container
+echo "$(hostname -i) gdk.test" | sudo tee -a /etc/hosts > /dev/null
+
+# make sure we don't override existing BUNDLE_PATH which happens on CI where all job variables are also passed in to service
+unset BUNDLE_PATH
+
+gdk start
+
+# /builds folder is present when running as a service on CI
+if [ -d /builds ]; then
+ exec "$@" | tee -a /builds/gdk.log
+else
+ exec "$@" | tee -a ${HOME}/gitlab-development-kit/gitlab/log/gdk.log
+fi