File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 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 : |
You can’t perform that action at this time.
0 commit comments