From f6af39b026c85676a9a980dea51a0e3507db2de3 Mon Sep 17 00:00:00 2001 From: Schtil Date: Thu, 20 Feb 2025 18:28:51 +0000 Subject: [PATCH] Update file .gitlab-ci.yml --- .gitlab-ci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..1443f5b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,34 @@ +stages: + - test + +variables: + DOCKER_TLS_CERTDIR: "/certs" + DOCKER_HOST: "tcp://docker:2376" + DOCKER_TLS_VERIFY: "1" + DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client" + DOCKER_DRIVER: overlay2 + +image: docker:20.10.16 + +services: + - name: docker:20.10.16-dind + command: [ + "--registry-mirror=http://gitlab.prodcontest.ru:5015", + "--registry-mirror=https://dockerhub.timeweb.cloud", + "--registry-mirror=https://huecker.io", + ] + +test: + stage: test + tags: + - backend + only: + - master + before_script: + - 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 + - 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.0 + after_script: + - docker-compose down