From a6264f6298e52d488949e59225c3bb9d6f26a589 Mon Sep 17 00:00:00 2001 From: Schtil Date: Fri, 21 Feb 2025 23:01:05 +0000 Subject: [PATCH 1/4] add try add proxy-env in Dockerfile --- .gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cf23535..dcf0c94 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,6 +27,16 @@ test: - for try in {1..10}; do sleep 0.5; docker info && break ; done - echo "$DOCKER_DEPLOY_KEY" | docker login -u "backend" --password-stdin $CI_REGISTRY - docker compose version + - | + find solution -type f -name "Dockerfile*" ! -name "*.*" -print0 | while IFS= read -r -d '' file; do + echo "Обрабатываем файл: $file" + if ! grep -q "^ENV http_proxy" "$file"; then + sed -i '/^FROM/ a ENV http_proxy=http:\/\/84.201.181.188:15000\nENV https_proxy=http:\/\/84.201.181.188:15000' "$file" + echo "Добавлены прокси-переменные в $file" + else + echo "Прокси-переменные уже присутствуют в $file" + fi + done - cd solution && docker compose up -d script: - docker run -v $CI_PROJECT_DIR:/app/result --network host gitlab.prodcontest.ru:5050/2025-final-indiv-repos/backend-checker:v1.2 From d464e9495b3e1628fc920a3e68d2107dda433596 Mon Sep 17 00:00:00 2001 From: Schtil Date: Fri, 21 Feb 2025 23:36:50 +0000 Subject: [PATCH 2/4] always load artifacts --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dcf0c94..aa0f0fe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,6 +43,7 @@ test: after_script: - cd solution && docker compose logs > ../compose.log && docker compose down artifacts: + when: always paths: - total_stats.json - compose.log From 16e62997dd7e2d652ae820a75f8507456f3969f9 Mon Sep 17 00:00:00 2001 From: Schtil Date: Sat, 22 Feb 2025 19:10:18 +0000 Subject: [PATCH 3/4] prepare for final check --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa0f0fe..eecb6bd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,6 +44,7 @@ test: - cd solution && docker compose logs > ../compose.log && docker compose down artifacts: when: always + access: 'developer' paths: - total_stats.json - compose.log From fcaa3de1fedfd81755acbd3b1339576819b3eb52 Mon Sep 17 00:00:00 2001 From: Schtil Date: Sat, 22 Feb 2025 19:10:58 +0000 Subject: [PATCH 4/4] increase timeout docker start --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eecb6bd..0cab6e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ test: only: - master before_script: - - for try in {1..10}; do sleep 0.5; docker info && break ; done + - for try in {1..10}; do sleep 1; docker info && break ; done - echo "$DOCKER_DEPLOY_KEY" | docker login -u "backend" --password-stdin $CI_REGISTRY - docker compose version - |