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.
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
CODEOWNERSfile, built from thepermissionsandcodeOwnersfields.
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]
| Strategy | Branch | Merge policy | Version type |
|---|---|---|---|
GITHUB_FLOW | main | Squash only | LATEST |
GIT_FLOW | main | Merge from release/* and hotfix/* only | LATEST |
GIT_FLOW | develop | Squash from feature branches | ALPHA |
GIT_FLOW | release/*/* | Merge or squash, from fix/* and bugfix/* only | BETA |
GIT_FLOW | hotfix/* | Any | HOTFIX |
TRUNK_BASED | main | Squash only | LATEST |
TRUNK_BASED | release/*/* | Merge or squash, from fix/* and bugfix/* only. Long-lived, and each branch snapshots a tag. | HOTFIX |
| All | Feature branches. See Branch names. | Any | NONE (no tag) |
- Use
GITHUB_FLOWfor small teams that deploy continuously. - Use
GIT_FLOWfor products with a formal release cycle. - Use
TRUNK_BASEDfor 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 branch | Allowed source branches |
|---|---|
main, with GITHUB_FLOW or TRUNK_BASED | feat/, feature/, fix/, bugfix/, docs/, test/, ci/, refactor/, perf/, chore/, revert/ and dependabot/ |
main, with GIT_FLOW | release/<name>/<version> and hotfix/ only |
develop | The 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-privaterepository, 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.
| Type | Stages | Package registry |
|---|---|---|
GOLANG | analysis, security-scan, test, build, release, containerize | Docker (Artifact Registry) |
DOCKER | containerize | Docker |
FLUTTER | analysis, test, publish | Dart (custom registry) |
FLUTTER with platforms: [web] | analysis, test, build, containerize | Docker |
JAVA | analysis, security-scan, test, build, publish, containerize | Maven (Artifact Registry) |
PYTHON | analysis, test, build, publish, containerize | PyPI (Artifact Registry) |
PROTOBUF | analysis, test, publish | Buf Schema Registry |
HELM | analysis, test, publish | Helm (OCI registry) |
TERRAFORM | validate, plan, publish | Terraform Registry |
MOJO | test, build, publish | Custom |
REACT | analysis, security-scan, test, build, publish, containerize | Static (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:
- It finds the merged pull request that made the push commit and reads its release label.
release/majorgives a major bump.release/minorgives a minor bump. No label gives a patch bump.- It finds the latest tag that is not a pre-release and that the commit can reach.
- 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 type | Branch | Base tag | Result |
|---|---|---|---|
LATEST | main | v2.4.12 | v2.4.13 (patch) or v2.5.0 (minor) |
ALPHA | develop | v2.4.12 | v2.4.12-alpha.3 |
BETA | release/* | v2.4.12 | v2.4.12-beta.0 |
HOTFIX | hotfix/* | v2.4.12 | v2.4.12-hotfix.1 |
NONE | Feature branch | — | No tag. The pipeline stops. |
The platform derives the label from the pull request title:
| Pull request title | Label |
|---|---|
feat(auth): add OAuth2 support | release/minor |
fix(api): correct status code | None (patch) |
feat(db)!: redesign schema | release/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.
- The CD Manager receives the Pub/Sub message with the container name and the version.
- It writes the version to
spec.versionin theDeploymentConfigand pushes to Git. - The push starts an engine run. The engine reports the result to the CD Manager.
- The CD Manager moves to the next
preReleaseStagesentry.
Release starts when a release manager starts it in the portal. It deploys all applications of an ApplicationSet as one bundle.
- The portal checks that every application has passed PreRelease.
- 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. - It creates a
release/<appSet>/<bundle>branch for each application and writes the RC tag to the manifests. - The portal writes the same tag to each later stage. A stage with an
approvalPolicywaits for sign-off in the portal first. - When the last stage succeeds, the portal creates the production tag. It removes the
-rc.Nsuffix. If that tag exists already, it adds a hotfix suffix, for exampleinfrastream-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.
| Stage | Who 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. |
| Hotfix | A 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.
| Tag | Format | Example | Created by |
|---|---|---|---|
| Semver | v<major>.<minor>.<patch> | v2.4.13 | CI, push to main |
| Alpha | v<major>.<minor>.<patch>-alpha.<N> | v2.4.13-alpha.3 | CI, push to develop |
| Beta | v<major>.<minor>.<patch>-beta.<N> | v2.4.13-beta.2 | CI, push to release/* |
| Hotfix | v<major>.<minor>.<patch>-hotfix.<N> | v2.4.13-hotfix.1 | CI, push to hotfix/* |
| Release Candidate | <appSet>-<bundle>-rc.<N> | infrastream-cloud-2026.11-rc.0 | CD Manager, on release start |
| Production | <appSet>-<bundle> | infrastream-cloud-2026.11 | CD Manager, on release end |
Components
| Component | Role |
|---|---|
| CD Manager | Receives 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. |
| Releaser | Creates 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 runner | A Cloud Run Job that a Git push starts. After a promotion it processes only the manifests that the commit changed. See Architectural Overview. |
| Token Broker | Gives 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. |
| Failure | Result | Recovery |
|---|---|---|
| CI build fails | No message is sent. | Fix the code and push again. |
| Pub/Sub delivers a message twice | The CD Manager handles it once. | None needed. |
| The manifest commit fails | The deployment stays PENDING. | Retry in the portal. |
| The engine run fails | The deployment shows FAILED. | Fix the manifest and start the run again. |
| Image tagging fails | The 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.