Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
libre
gitlab-runner
Commits
e3b8bae2
Commit
e3b8bae2
authored
Jul 22, 2019
by
Michał "rysiek" Woźniak
Browse files
Being a bit more verbose about registering and config file not being found
parent
677f2106
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
entrypoint
entrypoint
+5
-0
No files found.
entrypoint
View file @
e3b8bae2
...
@@ -28,11 +28,16 @@ fi
...
@@ -28,11 +28,16 @@ fi
# if we don't have a config file...
# if we don't have a config file...
if
[[
!
-e
${
CONFIG_FILE
}
]]
;
then
if
[[
!
-e
${
CONFIG_FILE
}
]]
;
then
echo
"+-- no config file found in: '
${
CONFIG_FILE
}
'"
# ...but we do have config vars...
# ...but we do have config vars...
if
[[
-n
${
CI_SERVER_URL
}
&&
-n
${
RUNNER_TOKEN
}
&&
-n
${
RUNNER_DESCRIPTION
}
&&
-n
${
RUNNER_EXECUTOR
}
]]
;
then
if
[[
-n
${
CI_SERVER_URL
}
&&
-n
${
RUNNER_TOKEN
}
&&
-n
${
RUNNER_DESCRIPTION
}
&&
-n
${
RUNNER_EXECUTOR
}
]]
;
then
echo
" configuration vars found, registering a new runner..."
# 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
}
'"
else
echo
" ERROR: no config file and no configuration vars!"
exit
1
fi
fi
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment