Skip to main content

Releases

A Release collects finished branches, merges them together, and deploys the result to a target system. Releases live under the Releases menu (Developer role and above).

The point of a release is that production receives one coherent change set rather than a stream of individual merges.

Release, item, branch

Three levels are involved, and keeping them apart makes the rest of this page much easier to follow.

LevelWhat it is
ReleaseThe standing configuration — which repository, which target branch, when to deploy, what to run on the machines
Release ItemOne concrete deployment. Gets a version number, collects branches, merges them, deploys. A release has many items over time
Release Item BranchOne branch's participation in one item, with the exact commit that went in

You configure the release once. zCICD creates items as needed, and each item collects its own branches.

Configuring a release

FieldPurpose
NameHuman-readable name
Project NameTechnical name. No spaces or !?#/\+:,
RepoThe repository being released
BranchThe target branch that receives the merge — the production line
Version SequenceThe Odoo sequence that numbers each item
Release TriggerHow items are created — see below
Countdown MinutesGrace period shown before a deploy starts
Max Minutes for releaseDeadline. An item that overruns fails as too late. Default: 120
Settings for machinesCommon settings passed to the target machines. May not contain PROJECT_NAME=
Include .gitWhether the .git directory is deployed. Default: off
Update I18NUpdate translations as part of the release
Send Pre-Release InformationNotify before deploying
Release MessageMessage posted to the ticket system

Release triggers

TriggerBehaviour
By Cronjob — merge and preparezCICD creates items on a schedule and collects branches automatically. The normal mode
Release pushed branchAn item is triggered when the branch is pushed
Manual ReleaseNo automatic items. You create them with Hotfix or Build and Deploy

How an item collects branches

While an item is Collecting, zCICD repeatedly looks for branches to include. A branch is picked up when all of these hold:

  • it belongs to the release's repository
  • Block Release is not set on it
  • its state is Tested, Candidate or Merge Conflict
  • it targets this release — or targets no release at all, if this is the only release configured for the repository
  • its latest commit has not already been deployed by a completed item

The set is re-synced continuously: new branches are added, a branch whose commit moved gets its commit updated, and a branch that no longer qualifies is dropped again. Any of these marks the item as needing a fresh merge.

note

If a repository has more than one release configured, a branch must name its target release explicitly via Target Releases. With a single release, branches that name nothing are included by default.

The item lifecycle

StateMeaning
CollectingGathering branches; still accepting changes
Collecting Merge ConflictA collected branch will not merge cleanly
Collecting Merge Technical ErrorThe merge failed for a non-conflict reason
IntegrationCollection closed; merging and testing the combined result
Ready to DeployMerged and tested, waiting for its deploy window
ReleasingDeploying to the target machines
DoneDeployed
Nothing todoNothing had changed; no deploy was needed
Failed: Merge ConflictCould not merge
Failed technicallyFailed for an infrastructure reason
Failed: too lateExceeded Max Minutes for release
Failed: by userAborted by hand
Failed: merge on masterThe final merge into the target branch failed

Collection stops at stop collecting at, which is derived from the planned date. After that the item moves to Integration and no further branches join.

Once an item reaches Ready to Deploy, zCICD opens a new collecting item behind it, so work continues while the current release waits to go out. This is why you will normally see two open items at once.

Each participating branch carries its own state within the item: Candidate, Merged, Already Merged, or Conflict.

Standard, hotfix and build-and-deploy

TypePurpose
StandardThe normal scheduled release
HotfixAn out-of-band release for an urgent fix
Build and DeployRebuild and deploy without the normal collection cycle

Hotfix and Build and Deploy are created by hand from the release form. Only one unfinished item of each type can exist at a time — zCICD refuses to create a second until the first is done or failed.

Build-and-deploy items are excluded from the "last item" calculation, so they do not disturb the ordinary release cadence.

Release actions

Release Actions define what actually happens on each target machine. A release can have several, one per machine.

FieldPurpose
MachineWhich machine this action set runs on
Docker RegistryRegistry to pull or push images from
Shell Script Before UpdateRuns before the update
Shell Script At End (finally)Runs at the end, whether or not the update succeeded
Shell Script at Update FailRuns only if the update failed
SettingsMachine-specific settings, combined with the release's common settings
Update SourcecodeDeploy the new source. Default: on
No 'odoo update'Deploy without running an Odoo update or stopping the machines
Update wodoo imagesRefresh the underlying zodoo images
Always upgrade odooForce the Odoo upgrade step
Load images to registryWhether and how built images are pushed
Build No CacheBuild without the Docker cache (set on the item)

The three shell script hooks are the extension point for anything zCICD does not do natively — stopping a service, warming a cache, notifying a system.

Watching and intervening

  • Log on the item records what happened, and Exception Info holds the error if it failed.
  • Failed Jobs counts failed queue jobs for the item — a non-zero value is usually the reason an item is stuck.
  • Abort stops an item and marks it Failed: by user.
  • Changed Lines and Computed Summary give a quick sense of the size of the release, built from the participating branches' end-user summaries.

Troubleshooting

An item sits in Collecting and never progresses. Check that candidate branches are actually in state Tested or Candidate, that Block Release is not set, and — if you have several releases — that they name this release under Target Releases.

Collecting Merge Conflict. One of the collected branches will not merge. Open the item's branch lines to find the one in state Conflict; resolve it in Git, or set Block Release on that branch to take it out of this release.

Failed: too late. The item exceeded Max Minutes for release. This is usually a symptom rather than a cause — look at failed queue jobs first.

Nothing todo. Not an error. Nothing had changed since the last completed item.