diff --git a/roles/gitlab_runner/files/libvirt-executor b/roles/gitlab_runner/files/libvirt-executor index 7f6a2162ada9e179cb433940ff1ebb31c09d944a..c39d15b8b3276cbeedb785b7e89ac0f368258d05 100755 --- a/roles/gitlab_runner/files/libvirt-executor +++ b/roles/gitlab_runner/files/libvirt-executor @@ -10,6 +10,7 @@ ssh() { -o ServerAliveInterval=15 \ -o UserKnownHostsFile=/dev/null \ -o StrictHostKeyChecking=off \ + -o LogLevel=error \ "root@${1}" "${@:2}" } @@ -39,7 +40,6 @@ wait_for_ssh() { sleep 1 continue fi - printf "%s" "${ip}" return 0 done echo 'Waited 30 seconds for VM to start, exiting...' @@ -68,7 +68,7 @@ prepare() { # https://docs.gitlab.com/runner/executors/custom.html#run run() { local ip - ip="$(wait_for_ssh "$(vm_name)")" + ip="$(vm_ip "$(vm_name)")" ssh "${ip}" bash < "${1}" || exit "${BUILD_FAILURE_EXIT_CODE:-1}" }