Run Forgejo Android CI from a pinned BookWave image #53

Merged
alexander merged 18 commits from mcp/bookwave-ci-image into main 2026-09-18 20:50:12 +02:00
Owner

Goal

Replace repeated Android/JDK bootstrap work in Forgejo CI with one reusable, repository-owned BookWave Android CI image.

This PR is the complete CI-image slice. It does not include persistent Gradle caching, runner/CT520 configuration changes, dependency upgrades, application changes, PR #5 work, or GitHub workflow redesign.

What changed

  • adds .forgejo/ci/bookwave-ci/Dockerfile;
  • adds .forgejo/ci/bookwave-ci/verify.sh;
  • adds manual-only .forgejo/workflows/build-ci-image.yml;
  • extends scripts/codex/setup.sh with BOOKWAVE_ANDROID_SDK_MODE=preinstalled;
  • pins Android-heavy Forgejo jobs to the published image by immutable digest:
    • pull-request verifyDebug;
    • main release-checks;
    • Build APK apk;
  • removes repeated JDK discovery/install and Android SDK download/install from those jobs;
  • keeps cheap policy/wrapper/schema/secret-scan and Loopbound jobs on the normal runner;
  • documents the image contract and publication path in docs/release.md.

The setup script still validates the environment. In preinstalled mode it verifies the command-line-tools marker, platform-tools, Android 36 platform and build-tools 36.0.0, and it does not mutate/download Android SDK packages.

Published image

Human tag:

forgejo.homebord.org/alexander/bookwave-ci:android36-jdk17-v1

Source-SHA tag:

forgejo.homebord.org/alexander/bookwave-ci:sha-65c7928fabad

Immutable reference consumed by CI:

forgejo.homebord.org/alexander/bookwave-ci@sha256:bf0f8f06ed41f9dd98b36332b2f1170906d0363c89fdd7c918ce0186844b6b85

Image contract verified during publication:

  • Node 22.23.2;
  • OpenJDK 17.0.20.1;
  • Android command-line tools build 15859902;
  • Android platform 36;
  • Android build-tools 36.0.0;
  • platform-tools;
  • gitleaks 8.30.1.

The Android command-line-tools archive and gitleaks archive are SHA-256 pinned.

Registry publication

Forgejo UI run #63 published the image successfully.

The Forgejo runner's internal service URL is HTTP while the canonical registry is forgejo.homebord.org. Authentication to the canonical registry worked, but a large layer upload through the external reverse-proxy path returned HTTP 502. The repository workflow therefore uploads layers directly to the same Forgejo registry service using the runner-provided FORGEJO_SERVER_URL, then resolves both public tags again through forgejo.homebord.org and requires them to have the same digest.

No CT520, Podman, Proxmox, or insecure-registry configuration was changed.

Exact-head validation

Final branch HEAD:

3dd06e10fc925632b3e3bb08820c17b2aab2140c

Current base main:

812a936822652e5553c718a488ddab7730cdea2a

Forgejo UI run #65 ran the strongest manual pull-request gate on that exact final HEAD with force_rerun=true:

  • PASS
  • full workflow wall time: 12m19s
  • verifyDebug --rerun-tasks: 11m16s
  • 1184 actionable tasks, 1184 executed
  • image-provided Android SDK validated in preinstalled mode.

Performance against the post-PR-#52 baseline:

Measurement Baseline CI image Change
Strongest full manual gate 13m05s 12m19s -46s (-5.9%)
verifyDebug --rerun-tasks 11m41s 11m16s -25s (-3.6%)

The image removes the repeated Android/JDK/gitleaks bootstrap, but Gradle/dependency work remains the dominant cost. Persistent Gradle caching remains a separate follow-up by design.

APK smoke

Forgejo UI run #66 exercised the protected Android APK path on the same exact final HEAD with run_checks=false (the full gate had already passed in #65):

  • PASS in 5m24s;
  • digest-pinned CI image started successfully;
  • PR #53 resolved live to 3dd06e10...;
  • protected BookWave signing keystore was staged only after source validation;
  • preinstalled SDK validation passed;
  • :app:assembleDebug completed successfully in 3m02s;
  • built 0.10.6.1-2066-pr53;
  • package org.homebord.bookwave.debug;
  • finished APK signer matched the configured protected signing identity.

Follow-up

Persistent Gradle caching is intentionally not part of this PR and is the next CI-performance slice.

No merge requested. The repository owner will review and merge manually.

## Goal Replace repeated Android/JDK bootstrap work in Forgejo CI with one reusable, repository-owned BookWave Android CI image. This PR is the complete CI-image slice. It does **not** include persistent Gradle caching, runner/CT520 configuration changes, dependency upgrades, application changes, PR #5 work, or GitHub workflow redesign. ## What changed - adds `.forgejo/ci/bookwave-ci/Dockerfile`; - adds `.forgejo/ci/bookwave-ci/verify.sh`; - adds manual-only `.forgejo/workflows/build-ci-image.yml`; - extends `scripts/codex/setup.sh` with `BOOKWAVE_ANDROID_SDK_MODE=preinstalled`; - pins Android-heavy Forgejo jobs to the published image by immutable digest: - pull-request `verifyDebug`; - main `release-checks`; - Build APK `apk`; - removes repeated JDK discovery/install and Android SDK download/install from those jobs; - keeps cheap policy/wrapper/schema/secret-scan and Loopbound jobs on the normal runner; - documents the image contract and publication path in `docs/release.md`. The setup script still validates the environment. In `preinstalled` mode it verifies the command-line-tools marker, platform-tools, Android 36 platform and build-tools 36.0.0, and it does not mutate/download Android SDK packages. ## Published image Human tag: `forgejo.homebord.org/alexander/bookwave-ci:android36-jdk17-v1` Source-SHA tag: `forgejo.homebord.org/alexander/bookwave-ci:sha-65c7928fabad` Immutable reference consumed by CI: `forgejo.homebord.org/alexander/bookwave-ci@sha256:bf0f8f06ed41f9dd98b36332b2f1170906d0363c89fdd7c918ce0186844b6b85` Image contract verified during publication: - Node 22.23.2; - OpenJDK 17.0.20.1; - Android command-line tools build 15859902; - Android platform 36; - Android build-tools 36.0.0; - platform-tools; - gitleaks 8.30.1. The Android command-line-tools archive and gitleaks archive are SHA-256 pinned. ## Registry publication Forgejo UI run **#63** published the image successfully. The Forgejo runner's internal service URL is HTTP while the canonical registry is `forgejo.homebord.org`. Authentication to the canonical registry worked, but a large layer upload through the external reverse-proxy path returned HTTP 502. The repository workflow therefore uploads layers directly to the same Forgejo registry service using the runner-provided `FORGEJO_SERVER_URL`, then resolves both public tags again through `forgejo.homebord.org` and requires them to have the same digest. No CT520, Podman, Proxmox, or insecure-registry configuration was changed. ## Exact-head validation Final branch HEAD: `3dd06e10fc925632b3e3bb08820c17b2aab2140c` Current base `main`: `812a936822652e5553c718a488ddab7730cdea2a` Forgejo UI run **#65** ran the strongest manual pull-request gate on that exact final HEAD with `force_rerun=true`: - **PASS** - full workflow wall time: **12m19s** - `verifyDebug --rerun-tasks`: **11m16s** - **1184 actionable tasks, 1184 executed** - image-provided Android SDK validated in `preinstalled` mode. Performance against the post-PR-#52 baseline: | Measurement | Baseline | CI image | Change | | --- | ---: | ---: | ---: | | Strongest full manual gate | 13m05s | 12m19s | **-46s (-5.9%)** | | `verifyDebug --rerun-tasks` | 11m41s | 11m16s | **-25s (-3.6%)** | The image removes the repeated Android/JDK/gitleaks bootstrap, but Gradle/dependency work remains the dominant cost. Persistent Gradle caching remains a separate follow-up by design. ## APK smoke Forgejo UI run **#66** exercised the protected Android APK path on the same exact final HEAD with `run_checks=false` (the full gate had already passed in #65): - **PASS** in **5m24s**; - digest-pinned CI image started successfully; - PR #53 resolved live to `3dd06e10...`; - protected BookWave signing keystore was staged only after source validation; - preinstalled SDK validation passed; - `:app:assembleDebug` completed successfully in **3m02s**; - built `0.10.6.1-2066-pr53`; - package `org.homebord.bookwave.debug`; - finished APK signer matched the configured protected signing identity. ## Follow-up Persistent Gradle caching is intentionally **not** part of this PR and is the next CI-performance slice. No merge requested. The repository owner will review and merge manually.
Author
Owner

CI image handoff status:

  • validation-only image build #57: PASS;
  • embedded and external image contract checks: PASS;
  • runtime proven: Node 22.23.2, JDK 17.0.20.1, Android command-line tools 15859902, platform 36, build-tools 36.0.0, gitleaks 8.30.1;
  • publish preflight #58: intentionally failed before any push because repository secret BOOKWAVE_PACKAGE_TOKEN is not configured;
  • no registry image has been published yet.

Required owner action:

  1. create a Forgejo personal access token for user alexander with package-registry write permission (minimum practical scope: write:package);
  2. add it directly as repository Actions secret BOOKWAVE_PACKAGE_TOKEN;
  3. do not paste the token into chat.

After the secret exists, the same PR will:

  • publish forgejo.homebord.org/alexander/bookwave-ci:android36-jdk17-v1;
  • resolve its immutable sha256 digest;
  • pin PR/Main/APK Android-heavy jobs to that digest;
  • remove repeated JDK/Android bootstrap;
  • run the full acceptance gate and compare against the 13m05s baseline.

No merge requested.

CI image handoff status: - validation-only image build #57: PASS; - embedded and external image contract checks: PASS; - runtime proven: Node 22.23.2, JDK 17.0.20.1, Android command-line tools 15859902, platform 36, build-tools 36.0.0, gitleaks 8.30.1; - publish preflight #58: intentionally failed before any push because repository secret `BOOKWAVE_PACKAGE_TOKEN` is not configured; - no registry image has been published yet. Required owner action: 1. create a Forgejo personal access token for user `alexander` with package-registry write permission (minimum practical scope: `write:package`); 2. add it directly as repository Actions secret `BOOKWAVE_PACKAGE_TOKEN`; 3. do not paste the token into chat. After the secret exists, the same PR will: - publish `forgejo.homebord.org/alexander/bookwave-ci:android36-jdk17-v1`; - resolve its immutable sha256 digest; - pin PR/Main/APK Android-heavy jobs to that digest; - remove repeated JDK/Android bootstrap; - run the full acceptance gate and compare against the 13m05s baseline. No merge requested.
Author
Owner

CI-image slice is complete on exact branch HEAD 3dd06e10fc925632b3e3bb08820c17b2aab2140c.

Final evidence:

  • published image: forgejo.homebord.org/alexander/bookwave-ci:android36-jdk17-v1;
  • immutable digest: sha256:bf0f8f06ed41f9dd98b36332b2f1170906d0363c89fdd7c918ce0186844b6b85;
  • source tag: sha-65c7928fabad;
  • UI run #65: strongest manual PR gate PASS on exact final HEAD, 12m19s total, verifyDebug --rerun-tasks 11m16s, 1184/1184 tasks executed;
  • baseline comparison: 13m05s -> 12m19s, 46s / 5.9% faster overall;
  • UI run #66: protected debug APK smoke PASS on exact final HEAD, 5m24s total; APK 0.10.6.1-2066-pr53; signer verified against the configured BookWave signing identity;
  • CT520/Podman/Proxmox configuration unchanged;
  • persistent Gradle caching deliberately deferred to a separate follow-up.

The earlier handoff comment about the missing package token is superseded by this result. No merge performed.

CI-image slice is complete on exact branch HEAD `3dd06e10fc925632b3e3bb08820c17b2aab2140c`. Final evidence: - published image: `forgejo.homebord.org/alexander/bookwave-ci:android36-jdk17-v1`; - immutable digest: `sha256:bf0f8f06ed41f9dd98b36332b2f1170906d0363c89fdd7c918ce0186844b6b85`; - source tag: `sha-65c7928fabad`; - UI run #65: strongest manual PR gate PASS on exact final HEAD, 12m19s total, `verifyDebug --rerun-tasks` 11m16s, 1184/1184 tasks executed; - baseline comparison: 13m05s -> 12m19s, 46s / 5.9% faster overall; - UI run #66: protected debug APK smoke PASS on exact final HEAD, 5m24s total; APK `0.10.6.1-2066-pr53`; signer verified against the configured BookWave signing identity; - CT520/Podman/Proxmox configuration unchanged; - persistent Gradle caching deliberately deferred to a separate follow-up. The earlier handoff comment about the missing package token is superseded by this result. No merge performed.
alexander deleted branch mcp/bookwave-ci-image 2026-09-18 20:50:12 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
alexander/Audiobookshelf-Manager-Claude!53
No description provided.