From 1745749cd2745c94c3f852e9c02dfde19d8d9c20 Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Fri, 28 Mar 2025 20:53:41 +0100 Subject: Fix ruff errors and warnings in hello_world service --- .woodpecker.yml | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 .woodpecker.yml (limited to '.woodpecker.yml') 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 -- cgit v1.2.3