gcp-cicd-patterns
Skill4 starsChanged 5 months agoMITView on GitHub
Cloud-native CI/CD patterns for GCP using Cloud Build, Cloud Deploy, and GitOps. Use for pipeline design, deployment strategies (canary, blue-green), artifact management, or automating deployments to Cloud Run and GKE.
In this repository101 other files it gives its agents.
- ai-video-understandingSkill
- apple-foundation-modelsSkill
- arch-dddSkill
- arch-decision-recordsSkill
- arch-diagramsSkill
- arch-eventsSkill
- arch-mvp-roadmapSkill
- arch-python-modernSkill
- aws-app-runnerSkill
- aws-cicd-patternsSkill
- aws-security-hardeningSkill
- azure-functions-python-v2Skill
- azure-identity-m2m-authSkill
- azure-service-bus-messagingSkill
- azure-workflow-execution-modelsSkill
- caddy-tls-proxySkill
- compliance-frameworksSkill
- design-system-workflowSkill
- dev-debugging-strategiesSkill
- dev-standardsSkill
- docker-python-poetrySkill
- docker-pythonSkill
- fastapi-patternsSkill
- ffmpeg-laravel-videoSkill
- formik-yup-react-nativeSkill
- frontend-accessibilitySkill
- frontend-angular-aiSkill
- frontend-angularSkill
- frontend-angular-toolingSkill
- frontend-design-systemsSkill
- frontend-material-chatSkill
- frontend-material-design-3Skill
- frontend-svelteSkill
- gcp-cloud-runSkill
- gcp-cloudsql-infrastructureSkill
- gcp-finopsSkill
- gcp-observabilitySkill
- gcp-security-hardeningSkill
- github-actions-cicdSkill
- healthkit-biofeedbackSkill
- infra-terraformSkill
- ios-app-qualitySkill
- ios-audio-hapticsSkill
- jest-nestjs-testingSkill
- langchain-azure-openai-patternsSkill
- laravel-auth-hardeningSkill
- laravel-ci-mysqlSkill
- laravel-mix-webpackSkill
- laravel-modern-patternsSkill
- laravel-pint-patternsSkill
- laravel-s3-storageSkill
- laravel-sail-dockerSkill
- mobile-app-deploymentSkill
- mobile-e2e-testingSkill
- mobile-offline-syncSkill
- mobile-push-notificationsSkill
- mobile-video-uploadSkill
- mongodb-asyncmongoclient-patternsSkill
- mongodb-atlas-patternsSkill
- nestjs-patternsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 47
Environments-as-code: - All deployments described declaratively in Git
- Very specific: line 97
PR Comment Workflows: use pull-requests: write, invoke skills directly rather than embedding prompt text, avoid path filters that miss …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GCP CI/CD Patterns
Cloud-native continuous integration and delivery patterns for Google Cloud Platform, emphasizing GitOps methodology and managed services.
Core Services
| Service | Purpose | Use When |
| Cloud Build | Serverless CI | Building, testing, scanning artifacts |
| Cloud Deploy | Managed CD | Progressive rollouts to Cloud Run/GKE |
| Artifact Registry | Container storage | Storing and promoting images |
| Cloud Run | Serverless compute | Stateless HTTP workloads |
Note: Cloud Deployment Manager deprecated March 2026. Use Terraform or Infrastructure Manager.
GitOps Methodology
Two-Repository Pattern
app-repo/ # Application code
├── src/
├── Dockerfile
└── cloudbuild.yaml # CI: build, test, push image
env-repo/ # Environment configuration
├── staging/
│ └── deployment.yaml
├── production/
│ └── deployment.yaml
└── cloudbuild.yaml # CD: apply manifestsFlow: Code push → Build image → Push to registry → Update env-repo → Deploy to target
Key Principles
- Environments-as-code - All deployments described declaratively in Git
- Build once, deploy many - Same artifact promoted through environments
- Git is source of truth - Rollback = revert commit
- Automated reconciliation - Drift detection and correction
Deployment Strategies
| Strategy | Risk | Use Case |
| Rolling | Medium | Standard updates, gradual replacement |
| Canary | Low | Production validation with real traffic |
| Blue-Green | Low | Near-zero downtime, instant rollback |
Pipeline Stages
Recommended CI/CD pipeline structure:
- Source - Trigger on push/PR
- Build - Compile, create artifacts
- Unit Test - Fast feedback
- Static Analysis - Security scanning (Trivy, tfsec)
- Publish - Push to Artifact Registry
- Deploy Staging - Automatic
- Integration Test - Validate in staging
- Deploy Production - Manual approval or canary
Critical Rules
- Promote the same image from staging to production - rebuilding for prod re-introduces toolchain drift the staging tests already caught
- Scan before deploy - deploying an unscanned image lets critical CVEs reach production silently
- Tag immutably - SHA-based tags;
latestmakes rollback ambiguous and image-promotion non-auditable - Secrets in Secret Manager - secrets pasted into
cloudbuild.yamlend up in the build log and the repo history - Approval gates - automated production deploys remove the last human check on a bad image
- Match SA keys to permissions - See Service Account section below
GitHub Actions Service Account Configuration
Secret names like GCP_SA_KEY don't indicate which SA they contain — assuming the wrong identity burns hours on phantom permission errors. Debug first:
- name: Debug GCP Service Account
run: echo "${{ secrets.GCP_SA_KEY }}" | jq -r '.client_email'Each workflow needs the SA scoped for its job (Terraform, Liquibase, and Cloud Build each require different roles). See reference.md § GitHub Actions Service Account Configuration for the permission table, anti-pattern YAML, and "Could Not Find Default Credentials" checklist.
GitHub Actions Patterns
Three common CI integration patterns — see reference.md § GitHub Actions Patterns for full YAML and trade-off detail:
- PR Comment Workflows: use
pull-requests: write, invoke skills directly rather than embedding prompt text, avoid path filters that miss Dockerfiles. - Batch Database Jobs: Cloud SQL Proxy sidecar on
ubuntu-latestis simpler than Cloud Run Jobs for scheduled nightly/weekly work. - EAS Builds (Expo/React Native): push-only trigger, pin
eas-cli, use--no-wait; seeexamples.mdfor the workflow YAML.
Angular CI: Budget Enforcement Gap
Angular style budgets are enforced only in production builds — ng serve silently ignores them. Run ng build --configuration=production in CI; use two-tier thresholds (warning 4 kB, error 6 kB). See reference.md § Angular CI for the budget config snippet.
See reference.md for detailed configurations and examples.md for Cloud Build templates.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

