blob: ce8125bccaf64577536d37ecff2bfd9b07a760bc (
plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
version: 3
variables:
- &python_image python:3.10-slim
- &install_deps |
pip install uv
uv pip install -e ".[dev]"
pipelines:
pr:
when:
event: pull_request
steps:
lint:
image: *python_image
commands:
- *install_deps
- ruff check .
hadolint:
image: hadolint/hadolint:latest-debian
commands:
- hadolint */Dockerfile
test:
image: *python_image
commands:
- *install_deps
- pytest --cov=. --cov-report=xml --cov-report=term
coverage:
image: plugins/codecov
settings:
token:
from_secret: codecov_token
files:
- coverage.xml
main:
when:
branch: main
event: push
steps:
lint:
image: *python_image
commands:
- *install_deps
- ruff check .
hadolint:
image: hadolint/hadolint:latest-debian
commands:
- hadolint */Dockerfile
test:
image: *python_image
commands:
- *install_deps
- pytest --cov=. --cov-report=xml --cov-report=term
coverage:
image: plugins/codecov
settings:
token:
from_secret: codecov_token
files:
- coverage.xml
# Build and push Docker images for each server
build-server1:
image: plugins/docker
settings:
registry: your-registry.com
repo: your-registry.com/mcp-servers/server1
tags: latest
dockerfile: servers/server1/Dockerfile
context: servers/server1
username:
from_secret: docker_username
password:
from_secret: docker_password
build-server2:
image: plugins/docker
settings:
registry: your-registry.com
repo: your-registry.com/mcp-servers/server2
tags: latest
dockerfile: servers/server2/Dockerfile
context: servers/server2
username:
from_secret: docker_username
password:
from_secret: docker_password
# Add a separate pipeline for tagged releases
release:
when:
event: tag
steps:
build-and-tag:
image: plugins/docker
settings:
registry: your-registry.com
repo: your-registry.com/mcp-servers/${CI_REPO_NAME}
tags:
- ${CI_COMMIT_TAG}
- latest
dockerfile: Dockerfile
username:
from_secret: docker_username
password:
from_secret: docker_password
|