Merge pull request #170396 from teto/gitlab-description
services.gitlab-runner: support runner description
This commit is contained in:
commit
ee385d8364
@ -36,12 +36,12 @@ let
|
|||||||
|
|
||||||
# register new services
|
# register new services
|
||||||
${concatStringsSep "\n" (mapAttrsToList (name: service: ''
|
${concatStringsSep "\n" (mapAttrsToList (name: service: ''
|
||||||
if echo "$NEW_SERVICES" | grep -xq ${name}; then
|
if echo "$NEW_SERVICES" | grep -xq "${name}"; then
|
||||||
bash -c ${escapeShellArg (concatStringsSep " \\\n " ([
|
bash -c ${escapeShellArg (concatStringsSep " \\\n " ([
|
||||||
"set -a && source ${service.registrationConfigFile} &&"
|
"set -a && source ${service.registrationConfigFile} &&"
|
||||||
"gitlab-runner register"
|
"gitlab-runner register"
|
||||||
"--non-interactive"
|
"--non-interactive"
|
||||||
"--name ${name}"
|
(if service.description != null then "--description \"${service.description}\"" else "--name '${name}'")
|
||||||
"--executor ${service.executor}"
|
"--executor ${service.executor}"
|
||||||
"--limit ${toString service.limit}"
|
"--limit ${toString service.limit}"
|
||||||
"--request-concurrency ${toString service.requestConcurrency}"
|
"--request-concurrency ${toString service.requestConcurrency}"
|
||||||
@ -365,6 +365,13 @@ in
|
|||||||
with <literal>RUNNER_ENV</literal> variable set.
|
with <literal>RUNNER_ENV</literal> variable set.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
description = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Name/description of the runner.
|
||||||
|
'';
|
||||||
|
};
|
||||||
executor = mkOption {
|
executor = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "docker";
|
default = "docker";
|
||||||
|
Loading…
Reference in New Issue
Block a user