Commit 10e7ad99 authored by Michał "rysiek" Woźniak's avatar Michał "rysiek" Woźniak
Browse files

entrypoint: exit with error if runner fails to register

parent e3b8bae2
...@@ -35,6 +35,10 @@ if [[ ! -e ${CONFIG_FILE} ]]; then ...@@ -35,6 +35,10 @@ if [[ ! -e ${CONFIG_FILE} ]]; then
# register the runner # register the runner
su gitlab-runner -c \ su gitlab-runner -c \
"gitlab-runner register --non-interactive --config '${CONFIG_FILE}' --url '${CI_SERVER_URL}' --registration-token '${RUNNER_TOKEN}' --description '${RUNNER_DESCRIPTION}' --executor '${RUNNER_EXECUTOR}'" "gitlab-runner register --non-interactive --config '${CONFIG_FILE}' --url '${CI_SERVER_URL}' --registration-token '${RUNNER_TOKEN}' --description '${RUNNER_DESCRIPTION}' --executor '${RUNNER_EXECUTOR}'"
if [ $? != 0 ]; then
echo " ERROR: failed to register the runner!"
exit 2
fi
else else
echo " ERROR: no config file and no configuration vars!" echo " ERROR: no config file and no configuration vars!"
exit 1 exit 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment