Skip to main content

CI/CD

Infrastream generates the CI workflows, computes each version and promotes each build through your environments. This page is the one reference for branches, CI, versions and deployment.

From a git push to a reconciled serviceEight stages. A developer pushes. GitHub Actions run generated workflows. The image goes to Artifact Registry with an attestation. A Pub/Sub notification reaches the CD Manager in the Infrastream Portal. The CD Manager writes the version to the manifest repository. The engine runner, a Cloud Run Job, reconciles the target infrastructure and sends a status webhook back to the CD Manager.Pushgit push orpull request1GitHub Actionsgeneratedworkflows2Artifact Registryimage push,attestation3Pub/Subnotification withcontainer, version4CD Managerdeployments,approval gates5Manifestrepositoryspec.version6RunnerCloud Run Job7TargetinfrastructureCloud Run,Compute Engine8pushimagethennotifywriteversiontriggersa runreconcilestatus webhook
From a git push to a reconciled serviceEight stages. A developer pushes. GitHub Actions run generated workflows. The image goes to Artifact Registry with an attestation. A Pub/Sub notification reaches the CD Manager in the Infrastream Portal. The CD Manager writes the version to the manifest repository. The engine runner, a Cloud Run Job, reconciles the target infrastructure and sends a status webhook back to the CD Manager.Pushgit push or pull request1GitHub Actionsgenerated workflows2Artifact Registryimage push, attestation3Pub/Subcontainer + version4CD Managerdeployments, approval gates5Manifest repositoryspec.version6RunnerCloud Run Job7Target infrastructureCloud Run, Compute Engine8push imagethen notifydelivers itwrite versiontriggers a runreconcilestatuswebhook
All 8 steps

A push runs generated GitHub Actions workflows. The image goes to Artifact Registry, and a Pub/Sub notification reaches the CD Manager. The CD Manager writes the version to git, the runner reconciles, and a status webhook returns to the CD Manager.

Branching strategy​

Set the strategy in the GithubRepository manifest. The engine then provisions three things:

  • GitHub rulesets with merge rules, required reviewers and status checks.
  • CI workflows for each branch.
  • A CODEOWNERS file, built from the permissions and codeOwners fields.
apiVersion: lowops.manifests.v1
kind: GithubRepository
metadata:
name: my-service
github-connection: example-co
organization: example-co
spec:
strategy: GITHUB_FLOW # or GIT_FLOW, TRUNK_BASED
permissions:
administrators:
groups: [platform-team]
contributors:
groups: [backend-engineers]
StrategyBranchMerge policyVersion type
GITHUB_FLOWmainSquash onlyLATEST
GIT_FLOWmainMerge from release/* and hotfix/* onlyLATEST
GIT_FLOWdevelopSquash from feature branchesALPHA
GIT_FLOWrelease/*/*Merge or squash, from fix/* and bugfix/* onlyBETA
GIT_FLOWhotfix/*AnyHOTFIX
TRUNK_BASEDmainSquash onlyLATEST
TRUNK_BASEDrelease/*/*Merge or squash, from fix/* and bugfix/* only. Long-lived, and each branch snapshots a tag.HOTFIX
AllFeature branches. See Branch names.AnyNONE (no tag)
  • Use GITHUB_FLOW for small teams that deploy continuously.
  • Use GIT_FLOW for products with a formal release cycle.
  • Use TRUNK_BASED for fast teams that must maintain older release lines.

All strategies enforce Conventional Commits on pull request titles and on commit messages. With GITHUB_FLOW, the ruleset of main requires one reviewer and the Merge Authorized status check. Organization admins can bypass branch rules.

Branch names​

The Initialize Pipeline job of each pull request workflow checks the name of the source branch. The Merge Authorized check needs this job. If the name does not match, the pull request check fails and the pull request cannot merge.

Target branchAllowed source branches
main, with GITHUB_FLOW or TRUNK_BASEDfeat/, feature/, fix/, bugfix/, docs/, test/, ci/, refactor/, perf/, chore/, revert/ and dependabot/
main, with GIT_FLOWrelease/<name>/<version> and hotfix/ only
developThe prefixes of the first row, release/<name>/<version> and hotfix/
release/*/*fix/ and bugfix/ only
hotfix/*Any name

A branch that GitHub creates with the Revert button has a name that starts with revert- and a number. The check allows it for every target branch.

CI generation​

Declare a BuildDefinition. The engine generates the GitHub Actions workflows from it. You never write a workflow file.

apiVersion: lowops.manifests.v1
kind: BuildDefinition
metadata:
name: my-service
github-repository: my-service
github-connection: example-co
organization: example-co
spec:
type: GOLANG
stages: [analysis, security-scan, test, build, containerize]
golang:
versions: ["stable"]
buildType: bin
target: ./cmd/server
containerize:
- name: my-service
registries: [core-registry]

For each branch the engine writes two workflows:

  • The caller workflow is a small file in your repository. It calls the managed workflow.
  • The managed workflow holds the build logic. It lives in the managed-workflows-private repository, so developers cannot change the pipeline.

A pull request workflow runs the analysis, security-scan, test and build stages. It never tags, containerizes or deploys. A push workflow runs the full pipeline and ends with a Pub/Sub message to the CD Manager.

TypeStagesPackage registry
GOLANGanalysis, security-scan, test, build, release, containerizeDocker (Artifact Registry)
DOCKERcontainerizeDocker
FLUTTERanalysis, test, publishDart (custom registry)
FLUTTER with platforms: [web]analysis, test, build, containerizeDocker
JAVAanalysis, security-scan, test, build, publish, containerizeMaven (Artifact Registry)
PYTHONanalysis, test, build, publish, containerizePyPI (Artifact Registry)
PROTOBUFanalysis, test, publishBuf Schema Registry
HELManalysis, test, publishHelm (OCI registry)
TERRAFORMvalidate, plan, publishTerraform Registry
MOJOtest, build, publishCustom
REACTanalysis, security-scan, test, build, publish, containerizeStatic (CDN bundle) and Docker (Nginx image)

For a private repository with spec.aiAssistant.pullRequest.enabled: true, the engine also generates AI code review, AI documentation and AI pull request helper workflows.

Versioning​

You never bump a version or create a tag. The first job of each push workflow computes the version:

  1. It finds the merged pull request that made the push commit and reads its release label.
  2. release/major gives a major bump. release/minor gives a minor bump. No label gives a patch bump.
  3. It finds the latest tag that is not a pre-release and that the commit can reach.
  4. It applies the version type of the branch.

If the commit already has a tag, the pipeline sets skip=true and all later jobs stop. A replayed push cannot tag twice.

Version typeBranchBase tagResult
LATESTmainv2.4.12v2.4.13 (patch) or v2.5.0 (minor)
ALPHAdevelopv2.4.12v2.4.12-alpha.3
BETArelease/*v2.4.12v2.4.12-beta.0
HOTFIXhotfix/*v2.4.12v2.4.12-hotfix.1
NONEFeature branch—No tag. The pipeline stops.

The platform derives the label from the pull request title:

Pull request titleLabel
feat(auth): add OAuth2 supportrelease/minor
fix(api): correct status codeNone (patch)
feat(db)!: redesign schemarelease/major

Deployment​

A ReleaseTrack defines the stages. The CD Manager in the portal runs them.

apiVersion: lowops.manifests.v1
kind: ReleaseTrack
metadata:
name: my-product-releasetrack
organizational-unit: platform-engineering
organization: example-co
spec:
preReleaseStages:
- environments: [development]
releaseStages:
- environments: [staging]
- environments: [production]
hotfixStages:
- environments: [staging]
- environments: [production]

PreRelease runs on its own when CI publishes a build. It deploys the one service that CI built.

  1. The CD Manager receives the Pub/Sub message with the container name and the version.
  2. It writes the version to spec.version in the DeploymentConfig and pushes to Git.
  3. The push starts an engine run. The engine reports the result to the CD Manager.
  4. The CD Manager moves to the next preReleaseStages entry.

Release starts when a release manager starts it in the portal. It deploys all applications of an ApplicationSet as one bundle.

  1. The portal checks that every application has passed PreRelease.
  2. It tags each container image in Artifact Registry with a Release Candidate (RC) tag, <appSet>-<bundle>-rc.<N>. Example: infrastream-cloud-2026.11-rc.0.
  3. It creates a release/<appSet>/<bundle> branch for each application and writes the RC tag to the manifests.
  4. The portal writes the same tag to each later stage. A stage with an approvalPolicy waits for sign-off in the portal first.
  5. When the last stage succeeds, the portal creates the production tag. It removes the -rc.N suffix. If that tag exists already, it adds a hotfix suffix, for example infrastream-cloud-2026.11-hotfix.1.

All tags in Artifact Registry are immutable. An RC tag always points to the same image digest, so each environment runs the same binary. A new promotion attempt creates the next RC number. This gives a record of each attempt.

A hotfix starts on a hotfix/* branch. CI tags it with a HOTFIX version. The CD Manager then deploys it through hotfixStages.

StageWho signs off
PreRelease (development)Nobody. CI deploys on merge.
Release (staging)QA engineers, when the stage has an approvalPolicy.
Release (production)Product managers and the security team, when the stage has an approvalPolicy.
HotfixA small group, for example SRE or operations staff.

Three roles own three manifests. Development teams own the Application. Release managers own the ApplicationSet. The platform team owns the ReleaseTrack.

TagFormatExampleCreated by
Semverv<major>.<minor>.<patch>v2.4.13CI, push to main
Alphav<major>.<minor>.<patch>-alpha.<N>v2.4.13-alpha.3CI, push to develop
Betav<major>.<minor>.<patch>-beta.<N>v2.4.13-beta.2CI, push to release/*
Hotfixv<major>.<minor>.<patch>-hotfix.<N>v2.4.13-hotfix.1CI, push to hotfix/*
Release Candidate<appSet>-<bundle>-rc.<N>infrastream-cloud-2026.11-rc.0CD Manager, on release start
Production<appSet>-<bundle>infrastream-cloud-2026.11CD Manager, on release end

Components​

ComponentRole
CD ManagerReceives build messages, runs the stage state machine, writes versions to DeploymentConfig files and pushes to Git. It keeps no state of its own. All deployment state is in Spanner.
ReleaserCreates the release branches and tags the images in Artifact Registry. It tags before the manifests change, so each version in a manifest can be pulled.
Engine runnerA Cloud Run Job that a Git push starts. After a promotion it processes only the manifests that the commit changed. See Architectural Overview.
Token BrokerGives CI workflows short-lived GitHub tokens for private repositories. It checks the OIDC token of the runner. Tokens last one hour at most, and the broker never stores them.
FailureResultRecovery
CI build failsNo message is sent.Fix the code and push again.
Pub/Sub delivers a message twiceThe CD Manager handles it once.None needed.
The manifest commit failsThe deployment stays PENDING.Retry in the portal.
The engine run failsThe deployment shows FAILED.Fix the manifest and start the run again.
Image tagging failsThe release does not start.Start the release again.

Supply chain security​

  • Binary Authorization. The pipeline signs an attestation for each published image with a Cloud KMS key. The target projects run only images with a valid attestation. An image with no attestation cannot deploy.
  • Pinned actions. Managed workflows pin each action to a full commit SHA, not to a tag that can change.
  • No stored keys. CI signs in to Google Cloud with Workload Identity Federation (OIDC). GitHub holds no service account key.
  • Minimal permissions. Each job declares only the token permissions that it needs.
  • Container labels. Each image carries OCI labels for the source repository, the version, the commit and the build time.