提交 eae3e3d2 编写于 作者: S Sami Tikka

osx: Fix for JENKINS-12622 - opening browser too early

上级 b816be60
......@@ -61,6 +61,10 @@ Upcoming changes</a>
<li class=bug>
Broken links to test results with '#' or '?' in the name
(a href="https://issues.jenkins-ci.org/browse/JENKINS-10458">issue 10458</a>)
<li class="bug">
Fix launching browser too early to http://localhost:8080 in OS X
installer.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-12622">issue 12622</a>)
</ul>
</div><!--=TRUNK-END=-->
......
......@@ -10,3 +10,15 @@ find /Users/Shared/Jenkins \( -not -user daemon -or -not -group daemon \) -print
# Load and start the launch daemon
/bin/launchctl load -w ${JENKINS_PLIST}
# Wait for port 8080 to start accepting connections.
# But don't wait forever.
timeout=$(($(date +%s) + 60))
while [ $(date +%s) -lt $timeout ] && ! curl -s http://localhost:8080 >/dev/null; do
sleep 1
done
if [ $(date +%s) -ge $timeout ]; then
echo "Timed out waiting for Jenkins port 8080 to start listening!"
echo "Either Jenkins did not load or this system is very slow."
fi
......@@ -42,3 +42,15 @@ find "$JENKINS_HOMEDIR" \( -not -user jenkins -or -not -group jenkins \) -print0
# Load and start the launch daemon
/bin/launchctl load -w ${JENKINS_PLIST}
# Wait for port 8080 to start accepting connections.
# But don't wait forever.
timeout=$(($(date +%s) + 60))
while [ $(date +%s) -lt $timeout ] && ! curl -s http://localhost:8080 >/dev/null; do
sleep 1
done
if [ $(date +%s) -ge $timeout ]; then
echo "Timed out waiting for Jenkins port 8080 to start listening!"
echo "Either Jenkins did not load or this system is very slow."
fi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册