File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
dockerfiles/agent-discovery Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -79,16 +79,16 @@ while true; do
7979 sleep 2 # Wait for 5 seconds before the next iteration of the loop.
8080done
8181
82- # Check if jenkins_controller is reachable, otherwise fall back to multi_jenkins_controller
82+ # # Check if jenkins_controller is reachable, otherwise fall back to multi_jenkins_controller
8383JENKINS_CONTROLLER=" jenkins_controller"
84- if ! curl -s -f " http://${JENKINS_CONTROLLER} :8080/login" > /dev/null; then
84+ if ! curl -s -f --max-time 60 " http://${JENKINS_CONTROLLER} :8080/login" > /dev/null; then
8585 echo " Primary controller not reachable, falling back to multi controller..."
86- JENKINS_CONTROLLER=" multi_jenkins_controller"
87- if ! curl -s -f " http://${JENKINS_CONTROLLER} :8080/login" > /dev/null; then
88- echo " Error: Neither primary nor multi controller is reachable"
89- exit 1
86+ JENKINS_CONTROLLER=" multi_jenkins_controller"
87+ if ! curl -s -f --max-time 60 " http://${JENKINS_CONTROLLER} :8080/login" > /dev/null; then
88+ echo " Error: Neither primary nor multi controller is reachable"
89+ exit 1
9090 fi
91- fi
91+ fi
9292
9393# Check If Jenkins is running or not
9494# If the message is found, awk exits with a non-zero status (1), and the loop continues.
You can’t perform that action at this time.
0 commit comments