Commit 345d9d07 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Use a fully-qualified hostname for the default name

parent b5b3584f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -4,7 +4,8 @@ set -eu

declare -r CONFIG_BASE=/etc/gitlab-runner
declare -r CONFIG_FILE=${CONFIG_BASE}/registration.conf
declare -r DEFAULT_NAME=${HOSTNAME}/%02i
declare -r FQDN=$(hostname -f)
declare -r DEFAULT_NAME=${FQDN}/%02i
declare -r SYSTEMD_NAME=gitlab-runner
declare -r IMAGE=gitlab/gitlab-runner:latest

@@ -25,7 +26,7 @@ usage() {
	Arguments:
	  TOKEN  A registration token provided by the co-ordinator (GitLab) instance
	  NAME   An instance name to identify this runner.
	         Defaults to "${HOSTNAME}/%02i" where "%i" is an auto-generated
	         Defaults to "${FQDN}/%02i" where "%i" is an auto-generated
	         index.
	END
}
@@ -43,7 +44,7 @@ config_help() {
	  NAME             A name pattern containing a printf-style '%' token.
	                   This will be used with an auto-generated index value to
	                   generate a name when none is provided in the command line.
	                   Default: "${HOSTNAME}/%02i"
	                   Default: <fully-qualified-hostname> + "/%02i"

	  MAX_INDEX        When looking for a free name using NAME, stop once this
	                   value is reached. This places a safe limit on the search,