Operational steps that a gramps-project/addons-source maintainer
needs to handle once PR 820 (and the branch-neutral follow-up) lands.
The pipeline is otherwise self-driving — this document is only about
the rough edges.
For day-to-day addon-release maintenance see MAINTAINERS.md; for the contributor-facing summary of what a green CI check means on an unreleased branch see CONTRIBUTING.md.
- One-time setup when the PR first merges
- Creating a new maintenance branch
- When a Gramps minor release lands on PyPI
- Diagnostic log markers
- Optional future-proofing knobs
docker-build.yml pushes images to
ghcr.io/gramps-project/addons-source/gramps-ci:<suffix> using the
workflow's GITHUB_TOKEN. GHCR creates the package as private the
first time. Same-repo CI keeps working (token covers own packages),
but fork PRs cannot pull the image because their GITHUB_TOKEN
has no read access to private packages in gramps-project. Fork-PR
container jobs would fail at "Initialize containers" with an
authentication error.
Fix once, immediately after the first Build Docker Images run
finishes:
- Go to https://github.com/orgs/gramps-project/packages/container/addons-source%2Fgramps-ci/settings
- Under "Danger Zone" → "Change visibility" → set to Public
Every existing and future gramps-ci:<suffix> tag inherits public
visibility from this single setting.
The first push event after merge fires both workflows in parallel:
Build Docker Imagesbuilds and pushesgramps-ci:gramps60(~5 min cold).CIrunssetup(~2 s), then its container jobs try to pull the image.
Because both start on the same push, the CI container jobs race the image push and may fail at "Initialize containers" the first time. This race only happens once per branch:
- Wait for
Build Docker Imagesto complete. - Open the failed CI run → click "Re-run failed jobs".
- Subsequent pushes find the image already in GHCR — no race.
This is also explained in the header comment of ci.yml.
When a new Gramps minor series goes into development and addons need
a corresponding branch (e.g. maintenance/gramps62 once 6.2 opens):
git branch maintenance/gramps62 maintenance/gramps61
git push origin maintenance/gramps62
No workflow edits required. The workflows derive everything from
github.ref_name. The first push fires the same race described
above — re-run the failed CI jobs once Build Docker Images
finishes.
The setup job's regex (gramps[0-9][0-9]) requires a two-digit
suffix. When Gramps 10.0 opens this regex needs updating in two
places (ci.yml setup job and docker-build.yml params step).
The hybrid Dockerfile auto-detects PyPI availability:
pip install "gramps==X.Y.*"succeeds → image installs the tagged PyPI release (::notice::log line).- pip reports "No matching distribution found" → image falls back to a
SHA-pinned
git cloneofgramps-project/gramps@maintenance/grampsNNat the SHA captured bydocker-build.yml's params step (::warning::log line).
When gramps==6.1.0 is finally published to PyPI, the next image
rebuild on maintenance/gramps61 silently switches from "git tip" to
"PyPI release" — no maintainer action needed.
To immediately rebuild against the new PyPI release without waiting for the next push:
- Open the
Build Docker Imagesworkflow in the Actions tab. - "Run workflow" → select
maintenance/grampsNN→ Run.
The ::notice:: line in the build log confirms the switch.
When investigating a CI failure, the install-step output in
Build Docker Images carries these annotations:
| Annotation | Meaning |
|---|---|
::notice::installed gramps==X.Y.* from PyPI |
Released-path install. CI is testing against a tagged release. |
::warning::no gramps==X.Y.* on PyPI; installing from gramps-project/gramps@maintenance/grampsNN at <sha> |
Unreleased-branch fallback. CI is testing against the upstream branch tip at <sha>. Visible to contributors via the CONTRIBUTING.md note. |
::error::no gramps==X.Y.* on PyPI and GRAMPS_FALLBACK_SHA is unset |
git ls-remote in docker-build.yml's params step returned no SHA for maintenance/grampsNN on gramps-project/gramps. The matching upstream branch is missing, or the addons-source branch is misnamed. |
::error::pip install gramps failed (non-version reason) |
pip failed for a network/registry reason, not because the version is missing. Captured stderr is dumped after the line. The build does not fall back to git in this case — by design, so a transient PyPI hiccup cannot silently flip a released branch into "git tip" mode. |
Other useful entry points:
ci.ymlsetup job log shows the derivedbranch_suffixandci_image. A failure here means the branch name doesn't matchmaintenance/gramps[0-9][0-9].docker-build.ymlparams step log shows the capturedfallback_sha. An empty value means upstreamgramps-project/grampshas no matching maintenance branch (warning issued; image build will fail iff the fallback is needed).
Not needed today; record here in case they ever come up.
The Dockerfile hardcodes https://github.com/gramps-project/gramps.git
as the fallback source. If the project ever reorgs or renames, this
URL must change in one place (.github/docker/gramps-ci/Dockerfile).
It could be parameterised as a build arg (ARG GRAMPS_UPSTREAM_REPO)
with the current URL as default, but a hardcoded value keeps the
Dockerfile simpler and a rename is a sufficiently large event that
editing one string is not the bottleneck.
docker-build.yml pushes both a moving gramps-ci:<suffix> tag (e.g.
gramps60) and a per-commit gramps-ci:<suffix>-<short-sha> tag.
The moving tag is always overwritten; the SHA tags accumulate over
time. Set a retention policy on the GHCR package settings page if
the count becomes inconvenient — the moving tags are what CI consumes.