Skip to content

feat(ci/cd): release packages to repo.linuxfabrik.ch without a manual step - #32

Merged
markuslf merged 2 commits into
mainfrom
feat/automated-release
Oct 25, 2026
Merged

markuslf merged 2 commits into
mainfrom
feat/automated-release

Conversation

@markuslf

Copy link
Copy Markdown
Member

Every release of a packaged project now reaches repo.linuxfabrik.ch without a manual step: first the testing channel, after 7 days release. Decisions and background: GitLab 001/project-big-picture #1257 and #1252.

Pipeline

  1. lf-check-upstream.yml (hourly, or repository_dispatch type upstream-release) opens a bump PR when an upstream is ahead. Upstreams on GitHub and GitLab, by release or by tag (PKG_UPSTREAM_* in package.conf). An upstream that cannot be queried now fails the run instead of passing as "up to date".
  2. lf-build-pr.yml builds every touched package on all target distros and smoke-tests it in a fresh container (PKG_SMOKE_TEST, run as nobody). Check name Build result, now required in the ruleset.
  3. auto-merge.yml merges bump PRs without review once the required checks pass (app token, so the merge triggers the release).
  4. lf-release.yml creates the GitHub prerelease <package>-<version>-<iteration> with the unsigned packages, SHA256SUMS and a build provenance attestation. The iteration counts up automatically.
  5. lf-promote.yml promotes prereleases after 7 days; manual promote or reject via workflow_dispatch.
  6. build/publish.sh runs on the repository server (systemd timer, LFOps role still to do): it pulls the releases, verifies each file with gh attestation verify, signs RPMs and repodata and publishes with createrepo_c and freight. The signing key never reaches GitHub.

DEB versions carry the distro (4.5.8-1+debian13), so suites never share a file name in a common pool.

Tested

  • Local build and smoke test of glances on rocky-v10 and debian-v13.
  • publish.sh on a Rocky 10.2 test server (fresh clone of the template VM, freight from source, throwaway key) with a gh stub for the GitHub side: publish to testing, promote, reject, tampered asset (run aborts, nothing published). Rocky 10 client with gpgcheck=1/repo_gpgcheck=1 and Debian 13 client with signed-by installed glances.
  • check-upstream.sh against glances, freight, git/git, mydumper (GitHub) and duplicity (gitlab.com, prefix rel., dev tags), 15 cases including error paths.

Not yet tested

The real gh attestation verify and the workflows themselves on GitHub. Merging this changes packages/glances/, so it runs lf-release.yml for the first time and creates the prerelease glances-4.5.8-1.

… step

Upstream bumps are built and smoke-tested on all target distros in the
pull request and merged automatically. The merge creates a GitHub
prerelease with the unsigned packages, SHA256SUMS and a build provenance
attestation (testing channel); lf-promote.yml turns it into a release
after 7 days, or right away / never on manual request.

build/publish.sh runs on the repository server and pulls instead of
GitHub pushing: it verifies each asset against its attestation, signs
RPMs and repodata with the Linuxfabrik key, and publishes into the
aggregated layout from GitLab 001/project-big-picture#1252
(createrepo_c, freight). Verified end-to-end on a Rocky 10.2 test
server with Rocky 10 and Debian 13 clients, using a gh stub for the
GitHub side.

DEB versions now carry the distro (+debian13, +ubuntu24.04), so builds
for different suites never share a file name in a common pool.
check-upstream.sh reads PKG_UPSTREAM_TYPE (github, gitlab, none),
PKG_UPSTREAM_PROJECT, PKG_UPSTREAM_SOURCE (releases, tags),
PKG_UPSTREAM_TAG_PREFIX and PKG_UPSTREAM_URL instead of
PKG_GITHUB_USER/REPO. Releases come from the GitHub or GitLab API, tags
from an anonymous `git ls-remote`, skipping alpha/beta/dev/pre/rc tags.

Errors now really exit 2: a failed curl used to end the script with
curl's own code (22), which lf-check-upstream.yml took for "up to date",
so a project without releases silently never got a bump. The workflow
now reports such packages and fails after checking all others.

Tested against glances, freight, git/git, mydumper (GitHub) and
duplicity (gitlab.com, prefix rel., dev tags).
@markuslf
markuslf merged commit a707c85 into main Oct 25, 2026
14 checks passed
@markuslf
markuslf deleted the feat/automated-release branch October 25, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant