This commit is contained in:
2025-03-03 22:00:33 +03:00
parent 95003fada9
commit c61f9e0adb

View File

@@ -33,11 +33,11 @@ pre_push:
script:
- echo "Running container to test image"
- echo "$CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_REF_SLUG"
- docker run -d --name test_container $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:5050/health; then
if curl --fail http://localhost:5060/health; then
echo "Healthcheck passed"
else
echo "Healthcheck failed, stopping push"