Skip to content

Add gcp_adapter file to generate yaml and deploy to gcp#39

Merged
PVeazie951 merged 1 commit intomainfrom
lorenc-cicd
Dec 16, 2025
Merged

Add gcp_adapter file to generate yaml and deploy to gcp#39
PVeazie951 merged 1 commit intomainfrom
lorenc-cicd

Conversation

@lorencDedaj
Copy link
Copy Markdown
Contributor

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

  1. New GCP Cloud Run Pipeline Generator

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.

  1. GHCR Compatibility Fix (Lowercase Owner)

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.

  1. Improved Pipeline Commit Logic

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.

  1. Real-World Branch Protection Handling

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

@PVeazie951 PVeazie951 merged commit 9167eb3 into main Dec 16, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants