Skip to content

ci: onboard to the OSS Community Develocity instance - #36

Merged
jamesarich merged 1 commit into
mainfrom
feat/develocity-oss
Aug 2, 2026
Merged

ci: onboard to the OSS Community Develocity instance#36
jamesarich merged 1 commit into
mainfrom
feat/develocity-oss

Conversation

@jamesarich

@jamesarich jamesarich commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Publishes Build Scans® and moves the remote build cache to the OSS Community
Develocity instance at https://community.develocity.cloud under project ID
meshtastic, matching the Meshtastic-Android onboarding
(meshtastic/Meshtastic-Android#6531). This is the pilot for rolling the same
configuration out to the rest of the Meshtastic Gradle repos.

What changed

  • gradle/develocity.settings.gradle replaces gradle/build-cache.settings.gradle.
    The cache now comes from Develocity, so scan and cache configuration are one
    concern in one file. Applying com.gradle.develocity and the Common Custom
    User Data plugin happens in settings.gradle.kts; everything else lives in
    the applied script.
  • The self-hosted HttpBuildCache is replaced by remote(develocity.buildCache).
  • All four setup-gradle call sites (ci.yml ×2, release.yml, docs.yml)
    gain an optional develocity-access-key. The GRADLE_CACHE_URL /
    GRADLE_CACHE_USERNAME / GRADLE_CACHE_PASSWORD env block is removed from
    ci.yml.
  • A "Revved up by Develocity" badge in the README.

Behaviour

  • Scans publish only from authenticated builds (publishing.onlyIf { it.authenticated }).
    Fork PRs and developers who have not provisioned a key are unaffected — they
    publish nothing rather than failing.
  • Only authenticated CI runs write to the cache, so unmerged and fork code
    cannot poison it. Local builds read remotely and use a local cache; CI
    disables the local cache, since runners are ephemeral and every hit comes
    from the remote anyway.
  • Scans carry no machine identity: usernames, hostnames, IP addresses and
    external process names are obfuscated to constants.

Local verification

  • Configuration cache is reused across runs (--configuration-cache twice).
  • Scans publish under project meshtastic with root project name kzstd.
  • Cache wiring is effective: a clean jvmTest went 33s → 3s with 3 tasks
    FROM-CACHE.
  • ./gradlew spotlessCheck detekt apiCheck jvmTest is green. apiCheck passes
    without an apiDump, confirming this settings-only change does not move the
    ABI.

Notes for reviewers

  • The GRADLE_CACHE_* repository secrets are now unused but are deliberately
    not deleted
    — they are the rollback path if the community instance turns out
    not to suit us.
  • Developers who want scans and remote cache reads locally can run
    ./gradlew provisionDevelocityAccessKey once.

Summary by CodeRabbit

  • Build & Performance

    • Improved build performance and reliability through Develocity-powered build caching.
    • Enabled build scan publishing for improved build diagnostics and visibility.
    • Updated automated build workflows to support authenticated build services.
  • Documentation

    • Added a Develocity project badge to the README.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jamesarich, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 071c5d19-284d-4a31-8af7-a4757e15893c

📥 Commits

Reviewing files that changed from the base of the PR and between 2fbd0cd and 1e744de.

📒 Files selected for processing (7)
  • .github/workflows/ci.yml
  • .github/workflows/docs.yml
  • .github/workflows/release.yml
  • README.md
  • gradle/build-cache.settings.gradle
  • gradle/develocity.settings.gradle
  • settings.gradle.kts
📝 Walkthrough

Walkthrough

The build now uses Gradle Develocity for build scans and remote caching. CI workflows provide the Develocity access key. The README includes a Develocity badge.

Changes

Develocity integration

Layer / File(s) Summary
Develocity build configuration
gradle/develocity.settings.gradle, gradle/build-cache.settings.gradle
Added Develocity build-scan and remote-cache configuration. Removed the previous shared build-cache configuration.
Gradle settings wiring
settings.gradle.kts
Added the Develocity plugins and switched Gradle to the Develocity settings script.
Workflow access and project visibility
.github/workflows/*, README.md
Passed DEVELOCITY_ACCESS_KEY to Gradle setup in CI, documentation, and release workflows. Added a Develocity badge.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CI Workflow
  participant Gradle
  participant Develocity
  CI Workflow->>Gradle: Provide DEVELOCITY_ACCESS_KEY
  Gradle->>Develocity: Publish build scan when authenticated
  Gradle->>Develocity: Read or write remote build cache
Loading

Poem

A rabbit hops through builds so bright,
Develocity scans take flight.
Keys pass safely through the flow,
Caches help the pipelines go.
Badge in place—now off we sprint!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the repository onboarding to the OSS Community Develocity instance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch feat/develocity-oss

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…tance

Replaces the self-hosted HttpBuildCache with Develocity's remote cache at
community.develocity.cloud under project `meshtastic`, matching the
Meshtastic-Android onboarding (meshtastic/Meshtastic-Android#6531).

Scans publish only from authenticated builds, so fork PRs and developers who
have not provisioned a key are unaffected; only authenticated CI runs write to
the cache. The GRADLE_CACHE_URL / _USERNAME / _PASSWORD secrets are no longer
read, but are deliberately left in place as the rollback path.

Signed-off-by: James Rich <james.a.rich@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@gradle/develocity.settings.gradle`:
- Around line 39-54: Update the remote cache configuration in buildCache so its
enabled state requires a valid trimmed accessKey in addition to the existing
access conditions. Keep push restricted to authenticated CI as currently
implemented, and preserve the local cache behavior.

In `@settings.gradle.kts`:
- Around line 9-14: Update the com.gradle.common-custom-user-data-gradle-plugin
declaration in the plugins block to use an available published release, keeping
the existing Develocity plugin configuration unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0daea208-6ec8-400a-ad29-8bc634cd612e

📥 Commits

Reviewing files that changed from the base of the PR and between b7ae140 and 2fbd0cd.

📒 Files selected for processing (7)
  • .github/workflows/ci.yml
  • .github/workflows/docs.yml
  • .github/workflows/release.yml
  • README.md
  • gradle/build-cache.settings.gradle
  • gradle/develocity.settings.gradle
  • settings.gradle.kts
💤 Files with no reviewable changes (1)
  • gradle/build-cache.settings.gradle

Comment thread gradle/develocity.settings.gradle
Comment thread settings.gradle.kts
@jamesarich
jamesarich force-pushed the feat/develocity-oss branch from 2fbd0cd to 1e744de Compare August 2, 2026 21:52
@jamesarich
jamesarich added this pull request to the merge queue Aug 2, 2026
Merged via the queue into main with commit d887d01 Aug 2, 2026
10 checks passed
jamesarich added a commit to meshtastic/gradle-flatpak-sources that referenced this pull request Aug 3, 2026
…tance

Replaces the self-hosted HttpBuildCache with Develocity's remote cache at
community.develocity.cloud under project `meshtastic`, matching the
Meshtastic-Android onboarding (meshtastic/Meshtastic-Android#6531) and the
kzstd pilot (meshtastic/kzstd#36).

Scans publish only from authenticated builds, so fork PRs and developers who
have not provisioned a key are unaffected; only authenticated CI runs write to
the cache. The GRADLE_CACHE_URL / _USERNAME / _PASSWORD secrets are no longer
read, but are deliberately left in place as the rollback path.
jamesarich added a commit to meshtastic/Meshtastic-Android that referenced this pull request Aug 3, 2026
Remote cache writes were gated on CI plus a non-empty DEVELOCITY_ACCESS_KEY.
A same-repository pull request DOES receive repository secrets, so PR builds
were writing entries into the shared cache — unmerged code could serve results
to main.

Require GITHUB_EVENT_NAME to be push or merge_group as well. Cache population is
unaffected: main-check.yml (push to main) and merge-queue.yml (merge_group) are
both still trusted writers, and they are the runs whose outputs correspond to
code that actually landed. pull-request.yml becomes pull-only, which is what it
should have been.

Verified against a CI-shaped environment:

    CI=true GITHUB_EVENT_NAME=pull_request  -> pull-only
    CI=true GITHUB_EVENT_NAME=push          -> writes enabled
    CI=true GITHUB_EVENT_NAME=merge_group   -> writes enabled

Fork PRs have no key and are excluded twice over; local builds are excluded by
isCI.

This restores the protection the self-hosted HttpBuildCache had before #6531 —
it gated on GITHUB_EVENT_NAME and excluded pull_request. The same gap was found
and fixed across the six repos being onboarded now (meshtastic/kzstd#36 and
siblings); this brings android back in line.
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