# GCP Pipeline

> Generate GCP Cloud Build CI/CD configuration

- Skill: `erp-core-dev/gcp-pipeline` (Agent Skill)
- Install (CLI): `npx skillmds@latest add erp-core-dev/gcp-pipeline`
- Raw SKILL.md: https://api.skillmd.com/api/skills/erp-core-dev/gcp-pipeline/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: ERP-CORE-DEV (https://skillmd.com/u/erp-core-dev)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/erp-core-dev/gcp-pipeline

---


# GCP Cloud Build Pipeline

Generate GCP Cloud Build configuration for the given service.

## Pipeline Steps

### 1. Build
- cloudbuild.yaml with build steps
- Install dependencies, lint, compile
- Run unit tests with coverage
- Build container image, push to Artifact Registry
- Kaniko cache for faster Docker builds

### 2. Test
- Integration tests against staging
- Container scanning with Binary Authorization
- Publish test results

### 3. Deploy
- GKE: gcloud container clusters get-credentials + kubectl apply
- Cloud Run: gcloud run deploy with traffic splitting
- Cloud Deploy: delivery pipeline with promotion stages

## Best Practices
- Substitution variables for environment-specific config
- Service account per build trigger with least privilege
- Cloud KMS for secret decryption in build steps
- Pub/Sub notification on build failure
- Build approval via Cloud Deploy promotion

## Arguments
- `<service-name>`: Service name in kebab-case
- `--deploy-target=<gke|cloudrun>`: Deployment target

