-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
45 lines (41 loc) · 816 Bytes
/
.gitlab-ci.yml
File metadata and controls
45 lines (41 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
stages:
- test
- build
- deploy
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
AFRICASTALKING_USERNAME: "sandbox"
# Test backend
test:backend:
stage: test
image: python:3.11-slim
script:
- cd backend
- pip install -r requirements.txt
- python -c "import fastapi; print('FastAPI OK')"
- echo "✅ Tests passed"
only:
- main
# Build Docker image
build:docker:
stage: build
image: docker:24-dind
services:
- docker:24-dind
script:
- cd backend
- docker build -t medlink-backend .
- echo "✅ Build complete"
only:
- main
# Deploy (manual trigger)
deploy:production:
stage: deploy
image: alpine:latest
script:
- echo "✅ Ready to deploy"
- echo "Backend will be deployed to production"
only:
- main
when: manual