mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-03 16:04:30 +00:00
40 lines
1.1 KiB
Bash
Executable File
40 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
unset BUNDLE_PATH BUNDLE_WITHOUT
|
|
|
|
if [[ "${WITH_LOAD_BALANCER}" == "true" ]]; then
|
|
gdk config set postgresql.replica.enabled true
|
|
gdk config set postgresql.replica_2.enabled true
|
|
gdk config set load_balancing.enabled true
|
|
gdk reconfigure
|
|
fi
|
|
|
|
if [[ "${QA_GITALY_TRANSACTIONS_ENABLED}" == "true" ]]; then
|
|
gdk config set gitaly.transactions.enabled true
|
|
gdk config set praefect.enabled false
|
|
gdk reconfigure
|
|
fi
|
|
|
|
# Split logs in to multiple files when running in CI
|
|
if [ -z "$CI" ]; then
|
|
gdk start
|
|
|
|
exec "$@" | tee -a ${HOME}/gitlab-development-kit/gitlab/log/gdk-container.log
|
|
else
|
|
logs=("gitaly" "gitlab-workhorse" "postgresql" "rails-background-jobs" "redis" "sshd" "vite" "rails-web" "webpack" "gitlab-http-router")
|
|
for log in "${logs[@]}"; do
|
|
gdk tail $log &>${CI_BUILDS_DIR}/gdk.${log}.log &
|
|
done
|
|
|
|
# TODO: Check if we can reconfigure gitlab to write logs directly to `BUILDS_DIR`
|
|
for logfile in ${HOME}/gitlab-development-kit/gitlab/log/*.log; do
|
|
tail -f $logfile &>${CI_BUILDS_DIR}/$(basename $logfile) &
|
|
done
|
|
|
|
gdk start
|
|
|
|
exec "$@"
|
|
fi
|