From f3f4f844bff0a84d537beaa7ae2731110d90484a Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Thu, 11 Jan 2024 15:49:00 +0000 Subject: [PATCH 1/8] update psql version to 14 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 73fa149..e8505a9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: "3" services: database: - image: "postgres:11" + image: "postgres:14" environment: POSTGRES_USER: omero POSTGRES_DB: omero From 1b76773802516a64910dae64794051ac9f4ba52c Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Thu, 11 Jan 2024 15:49:38 +0000 Subject: [PATCH 2/8] bump actions/checkout to v4 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5d07425..03069ce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Test run: ./test.sh - name: Check logs From 8c9b9fed6c57755434e664b87d50ababca48c3fa Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Sat, 13 Jan 2024 08:01:55 +0000 Subject: [PATCH 3/8] add message --- wait_for_login.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/wait_for_login.sh b/wait_for_login.sh index d5bc116..09b4476 100755 --- a/wait_for_login.sh +++ b/wait_for_login.sh @@ -7,5 +7,6 @@ OMERO_PASS=omero OMERO=/opt/omero/server/OMERO.server/bin/omero # Wait up to 2 mins +echo "Establishing connection with OMERO.server" docker compose exec -T omeroserver $OMERO login -C -s localhost -u "$OMERO_USER" -q -w "$OMERO_PASS" --retry 120 echo "OMERO.server connection established" From a068182e70a3f774bace0b806ee5bc89b1138074 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Sat, 13 Jan 2024 08:02:11 +0000 Subject: [PATCH 4/8] do not run wait_for_login --- test.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/test.sh b/test.sh index 8c7f1f1..aed3403 100755 --- a/test.sh +++ b/test.sh @@ -2,4 +2,3 @@ set -eu docker compose up -d -./wait_for_login.sh From 10af1dea5554eaaedd5578dd60b1587cf2a1b635 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Sat, 13 Jan 2024 08:02:23 +0000 Subject: [PATCH 5/8] split task --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03069ce..a84618f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,9 @@ jobs: - uses: actions/checkout@v4 - name: Test run: ./test.sh + - name: Check login + if: runner.os == 'ubuntu' + run: ./wait_for_login.sh - name: Check logs run: docker-compose logs if: ${{ failure() }} From 478953bdd54de14b2d790680a5f5113b0d7759b9 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Sat, 13 Jan 2024 18:07:13 +0000 Subject: [PATCH 6/8] adjust the check --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a84618f..7ec1356 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: - name: Test run: ./test.sh - name: Check login - if: runner.os == 'ubuntu' + if: runner.os != 'macos' run: ./wait_for_login.sh - name: Check logs run: docker-compose logs From 5ef9a4e502e843eff16963ac174ae2b1cbbed116 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Sat, 13 Jan 2024 20:54:04 +0000 Subject: [PATCH 7/8] check that omero.web is up --- .github/workflows/main.yml | 2 ++ check_web.sh | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 check_web.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7ec1356..5f465e4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,6 +17,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() }} diff --git a/check_web.sh b/check_web.sh new file mode 100755 index 0000000..cad5d63 --- /dev/null +++ b/check_web.sh @@ -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' From 506f7ad678d020a8c8bc64c562df18149591bc0f Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Mon, 29 Jan 2024 21:48:30 +0000 Subject: [PATCH 8/8] remove if statement --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5f465e4..a700ccf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,6 @@ jobs: - name: Test run: ./test.sh - name: Check login - if: runner.os != 'macos' run: ./wait_for_login.sh - name: Check OMERO.web run: ./check_web.sh