Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lukas Werner
cx-custom-gitlab-runner
Commits
63dcbd6c
Commit
63dcbd6c
authored
Aug 05, 2021
by
Lukas Werner
Browse files
Added error function to config.sh
parent
ec8f5f85
Changes
1
Hide whitespace changes
Inline
Side-by-side
runner_scripts/root/config.sh
View file @
63dcbd6c
...
...
@@ -8,6 +8,12 @@ TXT_GREEN="\e[32m"
TXT_CLEAR
=
"
\e
[0m"
TXT_BOLD
=
"
\e
[1m"
function
error
{
:
"
${
RV
:
=
${
2
:-
$BUILD_FAILURE_EXIT_CODE
}}
"
echo
-e
"
${
TXT_RED
}${
TXT_BOLD
}
$1
${
TXT_CLEAR
}
"
>
&2
return
"
$RV
"
}
[
-z
"
${
CUSTOM_ENV_AUTH_USER
:+x
}
"
]
&&
error
"AUTH_USER CI/CD variable has not been set."
[
-z
"
${
CUSTOM_ENV_AUTH_KEY
:+x
}
"
]
&&
error
"AUTH_KEY secret CI/CD variable has not been set."
...
...
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