Files
mailserver/docs/content
Alan SavageandGeorg Lauterbach 172848ccda feat(ci): rebuild supported releases when package updates are available (#4839)
* ci: rebuild supported releases when package updates are available

Check the published image of each supported release every hour and only
rebuild when `apt-get upgrade` would change something in it, instead of
rebuilding blindly once a week. Scheduled runs skip an image younger than
3 hours. Manual runs still rebuild unconditionally unless
`only-if-updates` is set.

* docs: describe rebuilds on package updates instead of weekly rebuilds

* ci: ignore packages that never clear when checking for updates

dovecot-fts-xapian is built from source as 1.9.1-1~bpo12+1 in v16, which
apt always sorts below the Debian package, so it would trigger a rebuild
on every cooldown. List the pending packages in the log.

* ci: schedule the check at minute 17 instead of the start of the hour

* docs: link the changelog entry to the PR

* docs: fix the changelog link text

* ci: do not trigger release rebuilds on Rspamd updates

v16 installs Rspamd from the rspamd.com apt repository, so every upstream
release showed up as a pending update and would be published to the floating
tags. Rebuilds should only pick up Debian updates. From v17 on, Rspamd is a
pinned `.deb` without an apt repository.

* ci: attempt a scheduled release rebuild only once per set of pending updates

The cooldown is based on the age of the published image, but a failed rebuild
publishes nothing. A rebuild that keeps failing was therefore started again on
every hourly run, and an update that never clears every 3 hours.

Each attempt is now recorded as an artifact named after the release and a hash
of the pending updates (`name=version`, ignored packages left out). The
`resolve` job skips a release whose pending updates were already attempted. The
record is written by a new `record-attempt` job that runs in parallel to the
rebuild, so it exists whatever the outcome is. It expires after 7 days, so the
same updates are retried at most once a week. New updates change the name and
are attempted right away.

Also pass `--error-on=any` to `apt-get update` in the check: without it, apt
exits 0 when index downloads fail, which made an outage look like "nothing
pending" instead of failing the job.

* ci: check for package updates daily instead of hourly

The check runs at 06:17 UTC. A fix reaches the floating tags within about a day
plus the build time instead of within about an hour, which is sufficient for
Debian security updates and needs far fewer scheduled runs.

* ci: remove the cooldown for scheduled release rebuilds

The check runs once a day, which already limits how often the floating tags
move. A rebuild loop is prevented by the recorded attempts, so the age of the
published image no longer needs to be checked.

---------

Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2026-11-06 00:29:10 +01:00
..
2026-09-04 14:09:12 +02:00
2024-01-16 08:38:08 +00:00