Skip to content

Commit 7122ed4

Browse files
Update pipeline - docker image (#536)
1 parent 6f9072a commit 7122ed4

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/docker-image-pr.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
sleep 3
4646
done
4747
48-
4948
- name: Trigger the installer via POST request
5049
run: |
5150
echo "Running installation with form-data..."
@@ -71,10 +70,19 @@ jobs:
7170
run: |
7271
echo "Waiting for the application to start..."
7372
for i in {1..10}; do
74-
curl -s http://localhost:8080 && echo "Application is up!" && break
75-
echo "Retrying in 3 seconds..."
73+
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:8080 || echo "error")
74+
if [ "$RESPONSE" = "200" ]; then
75+
echo "Application is up with HTTP 200 response!"
76+
exit 0
77+
elif [ "$RESPONSE" = "error" ]; then
78+
echo "Curl encountered an error. Retrying in 3 seconds..."
79+
else
80+
echo "Received HTTP response code: $RESPONSE. Retrying in 3 seconds..."
81+
fi
7682
sleep 3
7783
done
84+
echo "Application did not start successfully. Final response code: $RESPONSE"
85+
exit 1
7886
7987
- name: Stop and remove the container
8088
run: |

0 commit comments

Comments
 (0)