summaryrefslogtreecommitdiff
path: root/.woodpecker.yml
diff options
context:
space:
mode:
authorDawid Rycerz <dawid@rycerz.xyz>2025-03-28 20:53:41 +0100
committerDawid Rycerz <dawid@rycerz.xyz>2025-03-28 20:53:41 +0100
commit1745749cd2745c94c3f852e9c02dfde19d8d9c20 (patch)
tree8ed13f3de5fac78d804124e27fbcf1b678e83253 /.woodpecker.yml
Fix ruff errors and warnings in hello_world service
Diffstat (limited to '.woodpecker.yml')
-rw-r--r--.woodpecker.yml113
1 files changed, 113 insertions, 0 deletions
diff --git a/.woodpecker.yml b/.woodpecker.yml
new file mode 100644
index 0000000..ce8125b
--- /dev/null
+++ b/.woodpecker.yml
@@ -0,0 +1,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