-
-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail early for SGE rather than waiting the CI max time (#492)
- Loading branch information
Showing
1 changed file
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
#!/bin/bash | ||
|
||
docker-compose up -d --no-build | ||
|
||
START=$(date +%s) | ||
MAX_WAIT_SECONDS=300 | ||
|
||
while [ `docker exec sge_master qhost | grep lx26-amd64 | wc -l` -ne 2 ] | ||
do | ||
do | ||
if [[ $(($(date +%s) - $START)) -gt $MAX_WAIT_SECONDS ]]; then | ||
echo "Exiting after failing to start the cluster in $MAX_WAIT_SECONDS seconds" | ||
exit 1 | ||
fi | ||
echo "Waiting for SGE slots to become available"; | ||
sleep 1 | ||
done | ||
done | ||
|
||
echo "SGE properly configured" |