Commit 557ae891 authored by Baranovskyi's avatar Baranovskyi
Browse files

Update .gitlab-ci.yml file

parent 50f25d9e
Pipeline #10573 failed with stage
in 3 minutes and 46 seconds
...@@ -12,36 +12,23 @@ ...@@ -12,36 +12,23 @@
stages: stages:
- build - build
- test
- deploy
variables: variables:
DOCKER_DRIVER: overlay2 DOCKER_BUILDKIT: 1 # Включаем BuildKit для оптимизации
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: "unix:///var/run/docker.sock"
build: build:
stage: build stage: build
image: docker:latest image: docker:24 # Обновлённый Docker для улучшений
services: services:
- docker:dind - docker:24-dind
script: script:
- docker build -t flask-backend flask_ml_api - docker build --no-cache --pull --progress=plain -t flask-backend flask_ml_api
test:
stage: test
image: python:3.11-slim
before_script: before_script:
- python -m venv venv - export DOCKER_TMPDIR=/builds/tmp # Указываем временный каталог для Docker
- source venv/bin/activate cache:
- pip install -r requirements.txt key: build-cache
script: paths:
- pytest tests/ - /builds/tmp # Кэшируем временные файлы
deploy:
stage: deploy
image: docker:latest
services:
- docker:dind
script:
- docker-compose up -d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment