Add gcp_adapter file to generate yaml and deploy to gcp#39
Merged
PVeazie951 merged 1 commit intomainfrom Dec 16, 2025
Merged
Conversation
PVeazie951
approved these changes
Dec 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR extends AutoDeploy with first-class support for generating and installing GCP Cloud Run CI/CD pipelines, following modern best practices (GHCR → Artifact Registry → Cloud Run) and secure authentication via GitHub OIDC.
It also hardens the pipeline commit flow to work reliably across repositories with varying branch protections and naming constraints.
Key Changes
Added a gcp_adapter that generates a production-grade GitHub Actions workflow to:
build backend and frontend Docker images
push images to GitHub Container Registry (GHCR)
copy images into Google Artifact Registry
deploy services to Cloud Run
Uses Workload Identity Federation (OIDC) instead of long-lived GCP keys.
Supports separate backend and frontend services with configurable ports and Dockerfiles.
GHCR requires image repository names to be lowercase.
The generator now computes a lowercase repository_owner inside each workflow job and uses it consistently across build and deploy steps.
This prevents CI failures for repos owned by users/orgs with uppercase characters.
Enhanced pipeline_commit to:
accept either repoUrl or owner/repo
normalize repo identifiers safely
default workflow paths based on provider (e.g. gcp-cloud-run-ci.yml)
use provider-aware commit messages
Preserves existing logging and pipeline version history.
Validated behavior on repositories with protected branches.
Acknowledges that workflow installation may require a PR when direct commits are blocked.
Lays groundwork for future auto-PR fallback logic.
Why This Matters
This PR moves AutoDeploy closer to its core OSP goal:
Automatically installing secure, production-ready CI/CD pipelines into any repository with minimal user input.
It ensures generated pipelines:
work across cloud providers (now including GCP)
comply with registry constraints
follow enterprise-grade security and governance patterns
How to Test
Generate a GCP pipeline via /agent/pipeline
Commit the workflow via /mcp/v1/pipeline_commit
Merge PR if the target repo enforces branch protections
Verify GitHub Actions builds images and deploys to Cloud Run successfully