Resources / ReleasePolicy

ReleasePolicy

When a run of the platform's workflow on a branch ends successfully, the release of that commit is made, with no person in between (spec 0047 section 3). The policy says which components may be released by themselves, how many releases may roll out at once and per hour, and how long to hold a commit first. Only components whose build differs from the last release that finished them are released; the release controller activates the newest release whose gates are green.

Overview

APIplatform.etorm.com/v1alpha1
Resourcereleasepolicies (cluster-scoped inside its cluster)
Short namesrelpol
Available inthe platform only
Statuswritten by a controller through /status

Minimal example

apiVersion: platform.etorm.com/v1alpha1
kind: ReleasePolicy
metadata:
  name: example
spec:
  autoActivate:
  - "<autoActivate>"

Spec

FieldTypeRequiredDefaultAllowedDescription
workspacestring"platform"The workspace (project) whose runs are watched.
repositorystring"platform"The repository whose runs are watched.
branchstring"main"The branch whose pushes are released.
autoActivatelist of stringyesup to 64 itemsThe components a release may carry without a person: exact names, or a prefix ending in one `*` (for example `program/*`). A component not listed is never in a release this policy makes.
maxInFlightinteger1at least 1At most this many releases rolling out at once; the next is made when the current one is done.
maxPerHourinteger4at least 1At most this many releases made by this policy in an hour.
holdSecondsinteger0at least 0Seconds a commit waits, from when the policy first saw its successful run, before its release is made (a window to stop a bad commit).

Status

FieldTypeRequiredDefaultAllowedDescription
observedGenerationintegerThe generation of the spec this status describes.
pendingobjectThe commit in its hold window.
pending.commitstringThe commit.
pending.untilintegerUnix time the window ends.
lastReleaseobjectThe last release this policy made.
lastRelease.namestringName of the PlatformRelease.
lastRelease.commitstringIts commit.
lastRelease.atintegerUnix time.
lastDecisionobjectWhat the policy decided last and why.
lastDecision.phasestring (one of)Idle, Waiting, Released, FailingNothing to do, held back, a release was made, or it could not be made.
lastDecision.reasonstringA word from the reason registry.
lastDecision.messagestringA sentence.
lastDecision.commitstringThe commit it was about.
lastDecision.atintegerUnix time.
conditionslist of objectReady.
conditions[].typestringCondition type.
conditions[].statusstringTrue, False or Unknown.
conditions[].reasonstringA word from the reason registry.
conditions[].messagestringA sentence.

Columns in listings

ColumnFrom
Branch.spec.branch
Decision.status.lastDecision.phase
Last.status.lastRelease.name

All resources