feat: add Woodpecker CI pipeline, k8s manifests, and application code #4

Merged
forgejo_admin merged 2 commits from 3-add-woodpecker-ci-pipeline-and-k8s-manif into main 2026-03-14 22:19:45 +00:00
Contributor

Summary

  • Add complete FastAPI appointment booking service with Google Calendar integration
  • Add Woodpecker CI pipeline (lint, test, build+push to Harbor) and k8s deployment manifests
  • Follow the proven pattern from notion-mcp-remote with all conventions applied

Changes

  • src/gcal_scheduler/main.py: FastAPI app with /health, /metrics, /api/availability, /api/book endpoints
  • src/gcal_scheduler/calendar_service.py: Google Calendar freebusy queries and event creation via OAuth2
  • src/gcal_scheduler/__init__.py: Package init
  • .woodpecker.yaml: CI pipeline — ruff check, ruff format, pytest, kaniko build+push
  • Dockerfile: Multi-stage Python 3.12-slim build
  • k8s/deployment.yaml: Deployment with all 8 env vars, health/readiness probes, 256Mi memory limit
  • k8s/service.yaml: ClusterIP service on port 8000 (separate file per convention)
  • k8s/servicemonitor.yaml: Prometheus ServiceMonitor scraping /metrics
  • k8s/kustomization.yaml: Kustomize resource list
  • pyproject.toml: Project config with setuptools, ruff (>=0.8), pytest, dev deps
  • static/index.html: Placeholder booking frontend
  • tests/test_health.py: Tests for /health, /metrics, and availability validation
  • .dockerignore: Exclude non-build files
  • .gitignore: Add Python-specific ignores

Test Plan

  • Tests pass locally (pytest: health, metrics, availability validation)
  • Ruff check and format pass
  • Woodpecker CI pipeline runs on PR event
  • Container builds successfully with kaniko
  • k8s deployment has all env vars matching codebase os.environ calls

Review Checklist

  • Passed automated review-fix loop
  • No secrets committed
  • No unnecessary file changes
  • Commit messages are descriptive
  • issue-gcal-scheduler-woodpecker-k8s — the issue this PR addresses
  • plan-2026-02-25-mcp-gateway-migration — Phase 3
  • project-pal-e
## Summary - Add complete FastAPI appointment booking service with Google Calendar integration - Add Woodpecker CI pipeline (lint, test, build+push to Harbor) and k8s deployment manifests - Follow the proven pattern from notion-mcp-remote with all conventions applied ## Changes - `src/gcal_scheduler/main.py`: FastAPI app with /health, /metrics, /api/availability, /api/book endpoints - `src/gcal_scheduler/calendar_service.py`: Google Calendar freebusy queries and event creation via OAuth2 - `src/gcal_scheduler/__init__.py`: Package init - `.woodpecker.yaml`: CI pipeline — ruff check, ruff format, pytest, kaniko build+push - `Dockerfile`: Multi-stage Python 3.12-slim build - `k8s/deployment.yaml`: Deployment with all 8 env vars, health/readiness probes, 256Mi memory limit - `k8s/service.yaml`: ClusterIP service on port 8000 (separate file per convention) - `k8s/servicemonitor.yaml`: Prometheus ServiceMonitor scraping /metrics - `k8s/kustomization.yaml`: Kustomize resource list - `pyproject.toml`: Project config with setuptools, ruff (>=0.8), pytest, dev deps - `static/index.html`: Placeholder booking frontend - `tests/test_health.py`: Tests for /health, /metrics, and availability validation - `.dockerignore`: Exclude non-build files - `.gitignore`: Add Python-specific ignores ## Test Plan - [ ] Tests pass locally (pytest: health, metrics, availability validation) - [ ] Ruff check and format pass - [ ] Woodpecker CI pipeline runs on PR event - [ ] Container builds successfully with kaniko - [ ] k8s deployment has all env vars matching codebase os.environ calls ## Review Checklist - [ ] Passed automated review-fix loop - [ ] No secrets committed - [ ] No unnecessary file changes - [ ] Commit messages are descriptive ## Related Notes - `issue-gcal-scheduler-woodpecker-k8s` — the issue this PR addresses - `plan-2026-02-25-mcp-gateway-migration` — Phase 3 - `project-pal-e`
feat: add Woodpecker CI pipeline, k8s manifests, and application code
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
a4012ee883
Add complete appointment booking service with CI/CD and deployment:
- FastAPI app with /health, /metrics, /api/availability, /api/book endpoints
- Google Calendar integration for availability checking and event creation
- Woodpecker CI: ruff lint, pytest, kaniko build+push to Harbor
- k8s manifests: deployment, service, servicemonitor, kustomization
- All env vars from codebase mapped in deployment.yaml
- Follows proven pattern from notion-mcp-remote

Closes #3

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: remove redundant _request_count metrics counter
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
fa12c8d08a
_requests_total and _request_count were both incremented identically on
every request. Consolidated to just _requests_total and removed the
duplicate _request_duration_seconds_count metric line.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Contributor

Review-fix loop round 1

Found and fixed one nit:

  • Redundant metrics counter: _requests_total and _request_count were both incremented identically on every request. Consolidated to just _requests_total and removed the duplicate gcal_scheduler_request_duration_seconds_count metric line.

No blockers found. Re-reviewing now.

**Review-fix loop round 1** Found and fixed one nit: - **Redundant metrics counter**: `_requests_total` and `_request_count` were both incremented identically on every request. Consolidated to just `_requests_total` and removed the duplicate `gcal_scheduler_request_duration_seconds_count` metric line. No blockers found. Re-reviewing now.
Author
Contributor

Review-fix loop round 2 -- CLEAN PASS

All conventions verified:

  • .woodpecker.yaml naming, $CI_COMMIT_SHA without curly braces, .argocd-source-* excluded
  • No namespace in k8s manifests, memory limit 256Mi, container port named http
  • Separate service.yaml, strategy: Recreate, labels on deployment metadata
  • All 8 env vars from codebase mapped in deployment.yaml
  • /health and /metrics endpoints present, health/readiness probes configured
  • Ruff check and format pass, no secrets committed
  • No PVC (correct -- app is stateless, queries Google Calendar API on demand)
  • Redundant metrics counter fixed in round 1

Ready for user review.

**Review-fix loop round 2 -- CLEAN PASS** All conventions verified: - `.woodpecker.yaml` naming, `$CI_COMMIT_SHA` without curly braces, `.argocd-source-*` excluded - No namespace in k8s manifests, memory limit 256Mi, container port named `http` - Separate `service.yaml`, `strategy: Recreate`, labels on deployment metadata - All 8 env vars from codebase mapped in deployment.yaml - `/health` and `/metrics` endpoints present, health/readiness probes configured - Ruff check and format pass, no secrets committed - No PVC (correct -- app is stateless, queries Google Calendar API on demand) - Redundant metrics counter fixed in round 1 Ready for user review.
forgejo_admin deleted branch 3-add-woodpecker-ci-pipeline-and-k8s-manif 2026-03-14 22:19:45 +00:00
Sign in to join this conversation.
No description provided.