This commit is contained in:
2025-03-03 22:11:35 +03:00
parent 327013accd
commit b5665b7531

View File

@@ -32,11 +32,11 @@ pre_push:
- apk add curl
script:
- echo "Running container to test image"
- docker run -d --name 127.0.0.1 -p 5060:5050 $CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_REF_SLUG
- docker run -d --name test_container -p 5060:5050 $CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_REF_SLUG
- |
echo "Waiting for the application to start..."
sleep 10
if curl --fail http://localhost:5060/health; then
if curl --fail http://127.0.0.1:5060/health; then
echo "Healthcheck passed"
else
echo "Healthcheck failed, stopping push"