An automated, cloud-native Go microservice gateway deployed to Google Cloud Run using modern Platform Engineering principles, keyless OpenID Connect (OIDC) authentication via Workload Identity Federation, and local pre-push testing.
| Environment | Repository | Remote | Description |
|---|---|---|---|
| DEV | capstone_dev |
origin |
Active feature development & automated unit/integration tests |
| STAGING | capstone_staging |
staging |
Pre-production validation and environmental parity testing |
| PROD | capstone_prod |
prod |
Production environment for live traffic releases |
This repository provides a frictionless "Golden Path" for developers. The infrastructure is abstracted, allowing developers to focus solely on business logic while the platform handles security, builds, and deployment.
- Local Go 1.26 development environment.
- Cloudflare Tunnel (
cloudflared) for securely testing external webhooks without opening firewall ports. - Pre-Flight Checks: Local SonarQube CLI scanning and
.git/hooks/pre-pushscripts to block bad commits before they leave the workstation.
- Automated GitHub Actions trigger on push.
- Go unit testing, coverage reporting (
86.0%), and GoSec vulnerability scans. - SonarQube quality gate enforcement (PASSED).
- Keyless Authentication: Workload Identity Federation (WIF) via OIDC tokens (zero static GCP keys stored).
- Containerization: Minimal (< 20MB) Alpine Linux Docker builds running as non-root
appuser. - Artifact Registry: Automated, secure image tagging and pushing.
- Environment isolation via dedicated Service Accounts (
sa-capstone-dev,sa-capstone-staging,sa-capstone-prod). - Automated zero-downtime deployment to Google Cloud Run.
- Runtime: Go 1.26 on a minimal Alpine Linux base container.
- Cloud Infrastructure: Google Cloud Run (
us-central1) + Google Artifact Registry. - Authentication: Keyless Workload Identity Federation (OIDC) across all 3 GitHub Action environments.
- IAM Permissions: Strictly scoped service accounts requiring explicit
roles/artifactregistry.writer,roles/run.admin, androles/iam.serviceAccountUserbindings.
| Endpoint | Method | Response | Description |
|---|---|---|---|
/health |
GET | 200 OK (JSON) | Health probe returning uptime and service status. |
/metrics |
GET | 200 OK (JSON) | Basic runtime telemetry and system status. |
This repository enforces local verification before code reaches any remote environment using ./push_all.sh.
Before CI/CD takes over, code quality and security are analyzed locally.
- Configuration: Governed by
sonar-project.properties. Security "Hotspots" and coverage reports are validated against global Quality Gates.
- GitHub Actions (
deploy.yml): Our primary CI/CD orchestrator. It uses OIDC to securely log into GCP, runs scans, builds the Docker image, and triggers Cloud Run. - Google Cloud Build (
cloudbuild.yaml): Included as the GCP-native alternative for container builds in case we ever need to bypass GitHub Actions and execute builds directly inside Google Cloud's infrastructure.
PLATFORM_ENGINEERING_GUIDE.md— Technical blueprint and setup history.PROJECT_STATE.md— Operational multi-environment state tracker.