Skip to content

ci generators: Google Cloud Build, as ci: cloudbuild beside the repository's forge #5460

Open

Description

@lex00

chant should render the product pipeline for Google Cloud Build, as ci: cloudbuild beside the forge that hosts the repository. GCP-heavy and regulated teams are often required to run delivery inside their own projects.

Part of #5351. Precedent: ci: prow (#5170).

The shape: a CI system, not a forge

Cloud Build hosts no pull requests. The repository stays on GitHub, GitLab or Bitbucket, connected through a Developer Connect (2nd gen) connection, or on Secure Source Manager. The plan note, comment commands and approvals go through the forge's API. CiSystem (packages/core/src/ci-system.ts) gains cloudbuild, as it has prow.

What exists

  • The gcp lexicon already types CloudBuildTrigger, CloudBuildWorkerPool, and SecureSourceManagerInstance and Repository.
  • Cloud Build triggers take pull-request events. comment_control can hold a build until a writer comments /gcbrun, or require that only for outside contributors. The GitLab 1st gen integration is deprecated in favour of Developer Connect.

What it should be

  • A generator in the gcp lexicon renders chant's pipeline jobs into a cloudbuild.yaml (steps per job) and the triggers (PR, default-branch push). It writes them as resources, so the pipeline is declared and diffed. chant build --components --generate cloudbuild and chant run --generate cloudbuild pick it.
  • Each forge combination is either supported or refused by name. Secure Source Manager is handled as a forge or refused.
  • Comment commands: comment_control gates a build on /gcbrun only. chant's commands (/<product> apply) need either a webhook trigger carrying the comment, or a refusal with a remedy. Decide which. Fork pull requests default to comment control on.
  • Identity:
    • each trigger names its service account, with plan and apply as separate accounts;
    • the forge token comes from Secret Manager;
    • Workload Identity is used where a step reaches another cloud.
  • Signing: check whether Fulcio accepts a Cloud Build service account's Google ID token with the sigstore audience. If yes, keyless works. If not, the release needs release.signing kms (release.signing: KMS, key and private Sigstore modes, and signing on Forgejo #5458) with Cloud KMS.
  • The release pipeline renders for cloudbuild too, with the release scan (release publish: scan every artifact before the stage, with a pinned scanner, under supply-chain #5446).
  • ci-detect.ts recognises a Cloud Build run.

Done when

  • Golden files for the pull-request and release pipelines, with GitHub as the forge.

  • A fake-forge test posts a plan note and approves from a Cloud Build-shaped environment.

  • A docs page lists what works, the supported forges, and what is refused.

  • The gcp lexicon exports a floor for the generator in src/chant-floors.ts.

  • Adds its row to the forge matrix in ci/your-forge.mdx and its line to concepts/forges-ci-and-wardens.mdx (docs: forges, CI systems and wardens, with a feature matrix and why only forges get a warden #5461).

Activity

  1. added
    epic:forges
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic:forges

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions