Some of the essential snaps are handled by an automated build and promotion infrastructure. This wiki page is an overview on how this automation works and how it can be managed.

Overview

There is two types of automation for essential snaps: automated builds and automated promotion:

In overall, the build automation always makes sure that the given snaps are automatically built in the edge channel if required and promotion automation makes sure those snaps are promoted from edge to beta, from beta to candidate etc. whenever the required automated testing is performed.

Both those scripts are running periodically as github actions for https://github.com/canonical/core-snap-automation (accessible only for Canonical employees).

core-builder

The core-builder script is only used for core snaps (core16, core18, core20). The script rebuilds the snap using the LP recipe whenever either the snap git branch changes, any packages included in the ubuntu-base tarball used for building have new versions or some extra snaps change in the archive (or the image PPA).

core-promoter

The core-promoter script checks for new snaps in each managed channel (different per snap). If a new version is present, it then runs selected policy checks per channel and if all of those pass, it promotes it to the next defined channel. Those policy check usually involve checking respective trello boards (snapd or certification) for test results, per the established process.

All gadget snaps, once landed in candidate, now age for a selected period of time and then get auto-promoted to stable (if not disabled for some reason). The core* snaps however require manual intervention once in candidate (manual promotion to stable), because they cannot be released without coordination with the snap store.

Testing boards:

Deployment

The build and promotion scripts are running on a PS5 juju instance, hosted on the foundations-bastion-ps5 bastion. The environment is called prod-core-snap-automation. Everyone from the https://launchpad.net/~canonical-foundations/ team have access + a few people from the Ubuntu Core team.

For most changes, no involvement in the scripting or configuration is required. The build and promotion actions usually only prepare the script branch and run the respective script with selected parameters - everything else is done from the actual build/promotion scripting. The build and promotion scripts are executed via a crobtab, defined in /etc/cron.d/core-snap-automation, currently running every 4 hours.

UbuntuCore/CoreSnapAutomation (last edited 2024-11-18 13:05:32 by sil2100)