<type>(scope): <description>

[body]

[footer(s)]
This commit is contained in:
ITQ
2025-11-22 21:25:42 +03:00
parent b521f4c0bf
commit 6ca6c12401
+24 -16
View File
@@ -27,6 +27,13 @@ cache:
- $UV_PROJECT_ENVIRONMENT
policy: pull-push
.docker-job: &docker-job
image: docker:28.5
services:
- docker:28.5-dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
.buildah-job: &buildah-job
image: quay.io/containers/buildah:latest
variables:
@@ -246,18 +253,18 @@ lint:
- if: $CI_COMMIT_TAG
test:
<<: *docker-job
stage: test
tags:
- self-hosted
- beta
variables:
COMPOSE_PROFILES: |
--profile migrations
--profile tests
script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
- apk add --no-cache docker-compose
- export PROFILES="$(printf '%s ' $COMPOSE_PROFILES)"
- cp "$TEST_STAGE_FIREBASE_CONF" ./infrastructure/configs/backend/firebase.json
- |
(
while true; do
@@ -266,24 +273,23 @@ test:
done
) | tee -a compose.log &
- LOGS_PID=$!
- |
REGISTRY_PREFIX=$CI_REGISTRY_IMAGE IMAGE_TAG=$CI_COMMIT_SHA \
docker compose -f compose.yaml -f compose.prod.yaml \
$PROFILES up -d --quiet-pull --quiet-build 2>&1 | tee compose.log
- |
TEST_CONTAINER_ID=$(docker compose -f compose.yaml $PROFILES ps -q tests -a)
timeout 600 docker wait "$TEST_CONTAINER_ID"
TEST_EXIT_CODE=$(docker inspect --format "{{.State.ExitCode}}" "$TEST_CONTAINER_ID")
timeout 600 docker wait $TEST_CONTAINER_ID
TEST_EXIT_CODE=$(docker inspect --format "{{.State.ExitCode}}" $TEST_CONTAINER_ID)
if [ "$TEST_EXIT_CODE" -eq 0 ]; then
if [ $TEST_EXIT_CODE -eq 0 ]; then
echo "Tests passed."
else
echo "Tests failed with exit code $TEST_EXIT_CODE."
exit 1
fi
- docker compose -f compose.yaml $PROFILES down
- |
docker compose -f compose.yaml $PROFILES down
- cat .cov/coverage.txt
artifacts:
paths:
@@ -333,7 +339,6 @@ sast-image-migrations:
# sast-image-ml:
# <<: *trivy-image-scan
# when: manual
# variables:
# IMAGE_NAME: $BASE_IMAGE_NAME/ml
# IMAGE_TYPE: ml
@@ -357,9 +362,9 @@ tag-migrations:
# tag-ml:
# <<: *tag-config
# when: manual
# variables:
# IMAGE_NAME: $BASE_IMAGE_NAME/ml
# when: manual
webhook-migrations-deploy:
<<: *webhook-config
@@ -384,12 +389,15 @@ webhook-backend-deploy:
- build-runtime
- sast-image-runtime
ml-deploy:
webhook-ml-deploy:
<<: *webhook-config
stage: deploy
tags:
- self-hosted
script:
ls -l
variables:
WEBHOOK_URL: $WEBHOOK_URL_ML
resource_group: staging
# dependencies:
# - build-runtime
# - sast-image-runtime
workflow:
rules: