1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

Fix CI configuration: separate images for different stages

This commit is contained in:
MoonTestUse1
2025-01-06 09:41:09 +06:00
parent 4aeb9a681a
commit 05963e03d8

View File

@@ -9,17 +9,14 @@ variables:
DOCKER_HOST: tcp://docker:2375
SECRET_KEY: "your-super-secret-key-123"
services:
- docker:dind
before_script:
test:
image: python:3.11
stage: test
before_script:
- python -V
- python -m pip install --upgrade pip
- pip install pytest
- pip install -r backend/requirements.txt
test:
stage: test
script:
- cd backend
- python -m pytest -v
@@ -30,6 +27,10 @@ test:
build_backend:
stage: build
image: docker:latest
services:
- docker:dind
before_script:
- docker info
script:
- cd backend
- docker build -t backend:latest .
@@ -43,6 +44,10 @@ build_backend:
build_frontend:
stage: build
image: docker:latest
services:
- docker:dind
before_script:
- docker info
script:
- cd frontend
- docker build -t frontend:latest .
@@ -55,6 +60,7 @@ build_frontend:
deploy:
stage: deploy
image: python:3.11
script:
- apt-get update -qy
- apt-get install -y sshpass