Wait for docker base on env RUNNER_WAIT_FOR_DOCKER_IN_SECONDS. (#2440)

This commit is contained in:
Tingluo Huang
2023-02-15 16:05:36 -05:00
committed by GitHub
parent 8c096baf49
commit 982784d704
3 changed files with 15 additions and 2 deletions

View File

@@ -1,7 +1,6 @@
## Features
- Add support for ghe.com domain (#2420)
- Add docker cli to the runner image. (#2425)
- Uploading step logs to Results service (#2422)
## Bugs
- Fix URL construction bug for RunService (#2396)

View File

@@ -18,6 +18,20 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# Wait for docker to start
if [ ! -z "$RUNNER_WAIT_FOR_DOCKER_IN_SECONDS" ]; then
if [ "$RUNNER_WAIT_FOR_DOCKER_IN_SECONDS" -gt 0 ]; then
echo "Waiting for docker to be ready."
for i in $(seq "$RUNNER_WAIT_FOR_DOCKER_IN_SECONDS"); do
if docker ps > /dev/null 2>&1; then
echo "Docker is ready."
break
fi
"$DIR"/safe_sleep.sh 1
done
fi
fi
updateFile="update.finished"
"$DIR"/bin/Runner.Listener run $*

View File

@@ -1 +1 @@
2.302.0
2.302.1