Repository navigation
Description
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, andSecureSourceManagerInstanceandRepository. - Cloud Build triggers take pull-request events.
comment_controlcan 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 cloudbuildandchant run --generate cloudbuildpick it. - Each forge combination is either supported or refused by name. Secure Source Manager is handled as a forge or refused.
- Comment commands:
comment_controlgates a build on/gcbrunonly. 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
sigstoreaudience. If yes, keyless works. If not, the release needsrelease.signingkms(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.tsrecognises 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.mdxand its line toconcepts/forges-ci-and-wardens.mdx(docs: forges, CI systems and wardens, with a feature matrix and why only forges get a warden #5461).
Activity