We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b92582 commit 46a79e6Copy full SHA for 46a79e6
dockerfiles/agent-discovery/find-name.sh
@@ -81,9 +81,10 @@ done
81
82
# Check if jenkins_controller is reachable, otherwise fall back to multi_jenkins_controller
83
JENKINS_CONTROLLER="jenkins_controller"
84
-if ! curl -s -f http://jenkins_controller:8080/login > /dev/null; then
85
- JENKINS_CONTROLLER="multi_jenkins_controller"
86
-fi
+if ! curl -s -f "http://${JENKINS_CONTROLLER}:8080/login" > /dev/null; then
+ echo "Primary controller not reachable, falling back to multi controller..."
+ JENKINS_CONTROLLER="multi_jenkins_controller"
87
+ fi
88
89
# Check If Jenkins is running or not
90
# If the message is found, awk exits with a non-zero status (1), and the loop continues.
0 commit comments