Skip to content

Commit

Permalink
check that omero.web is up
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Jan 13, 2024
1 parent 3518f92 commit 1ab720b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
- name: Check login
if: runner.os != 'macos'
run: ./wait_for_login.sh
- name: Check OMERO.web
run: ./check_web.sh
- name: Check logs
run: docker compose logs
if: ${{ failure() }}
21 changes: 21 additions & 0 deletions check_web.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -e
set -u
set -x

# Wait up to 2 mins
i=0
while ! docker compose logs 2>&1 | grep 'Listening at: http://0.0.0.0:4080'; do
i=$(($i+1))
if [ $i -ge 24 ]; then
echo "$(date) - OMERO.web still not listening, giving up"
exit 1
fi
echo "$(date) - waiting for OMERO.web..."
sleep 5
done
echo "OMERO.web listening"

# Check the string "OMERO.web - Login" is present
curl -sL localhost:4080 | grep 'OMERO.web - Login'

0 comments on commit 1ab720b

Please sign in to comment.