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 @@
stages:
- build
- test
- deploy
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: "unix:///var/run/docker.sock"
DOCKER_BUILDKIT: 1 # Включаем BuildKit для оптимизации
build:
stage: build
image: docker:latest
image: docker:24 # Обновлённый Docker для улучшений
services:
- docker:dind
- docker:24-dind
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:
- python -m venv venv
- source venv/bin/activate
- pip install -r requirements.txt
script:
- pytest tests/
- export DOCKER_TMPDIR=/builds/tmp # Указываем временный каталог для Docker
cache:
key: build-cache
paths:
- /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