Skip to content

Commit

Permalink
Wait for docker base on env RUNNER_WAIT_FOR_DOCKER_IN_SECONDS. (#2440)
Browse files Browse the repository at this point in the history
  • Loading branch information
TingluoHuang authored Feb 15, 2023
1 parent 8c096ba commit 982784d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 0 additions & 1 deletion releaseNote.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
14 changes: 14 additions & 0 deletions src/Misc/layoutroot/run-helper.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -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 $*

Expand Down
2 changes: 1 addition & 1 deletion src/runnerversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.302.0
2.302.1

0 comments on commit 982784d

Please sign in to comment.