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