diff options
-rw-r--r-- | jenkins-helpers.sh | 12 | ||||
-rwxr-xr-x | start-container-docker.sh | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh index d6f0d3a3..f75e4b57 100644 --- a/jenkins-helpers.sh +++ b/jenkins-helpers.sh @@ -124,7 +124,12 @@ print_arch_for_host () local arch case "$host" in - "localhost"*) + *".tcwglab") + # While not strictly correct, print_arch_for_label is relaxed + # enough to handle this. + print_arch_for_label "$host" + ;; + *) arch=$(uname -m) case "$arch" in "aarch64") arch="arm64" ;; @@ -134,11 +139,6 @@ print_arch_for_host () esac echo "$arch" ;; - *) - # While not strictly correct, print_arch_for_label is relaxed - # enough to handle this. - print_arch_for_label "$host" - ;; esac ) } diff --git a/start-container-docker.sh b/start-container-docker.sh index ce3014ae..fc3b1f05 100755 --- a/start-container-docker.sh +++ b/start-container-docker.sh @@ -160,7 +160,9 @@ if [ x"$node" != x"" ]; then fi if [ x"$session_host" = x"" ]; then - session_host=localhost + # Get first FQDN. This name needs to have .tcwglab suffix for VPN'ed + # machines and entries in .ssh/config for external machines. + session_host=$(hostname -A | cut -d" " -f 1) fi if [ x"${container_arch}" = x"default" ]; then |