Skip to content

Reach the Code Genome Project from the release and bump workflows - #1190

Merged
timtebeek merged 1 commit into
mainfrom
tim/cgp-creds-release-workflows
Aug 11, 2026
Merged

Reach the Code Genome Project from the release and bump workflows#1190
timtebeek merged 1 commit into
mainfrom
tim/cgp-creds-release-workflows

Conversation

@timtebeek

@timtebeek timtebeek commented Aug 11, 2026

Copy link
Copy Markdown
Member
  • Follow-up to Allow resolving dependencies from the Code Genome Project #1183. That PR added the codegenome profile to pom.xml and exported CODEGENOME_USERNAME/CODEGENOME_TOKEN on ci.yml's build step — but only that step. Everywhere else the profile silently stays inactive, because it activates on the presence of env.CODEGENOME_USERNAME.

What that costs today

  • bump-snapshots.yml runs versions:update-properties against Maven Central and ossrh-snapshots only. A rewrite.version published solely to CGP is invisible to it, and the failure mode is silence: the weekly job just stops finding newer snapshots. publish.yml runs the same goal twice and has the same blind spot.
  • publish.yml's release:prepare/release:perform rebuilds from a fresh checkout on a fresh runner. Any CGP-only dependency fails outright there.
  • ci.yml's publish-snapshots step is unaffected in practice — it runs after build on the same runner, so ~/.m2 is already warm — but it inherits the same wiring gap.

None of this bites while CGP publishing is additive to Sonatype (RewriteCgpPublishPlugin registers the S3 bucket "so publish uploads there too"). It bites when ossrh snapshot publishing stops.

The --global-settings bit

setup-java writes a single server per call and overwrites settings.xml on each one, so the two servers can't come from one file. Steps that pass --settings=$GITHUB_WORKSPACE/settings.xml ignore ~/.m2/settings.xml entirely, so a second setup-java call alone wouldn't reach them — worse, exporting the env var without credentials would activate the profile and send unauthenticated requests at CGP.

So those steps now pass the codegenome file as --global-settings as well. Maven merges global and user settings, unioning servers with distinct ids. Verified locally:

$ ./mvnw --global-settings=global.xml --settings=user.xml help:effective-settings
      <id>ossrh</id>
      <id>codegenome</id>

release:perform forks a Maven process, and the release plugin propagates the outer build's effective settings to it, so the fork inherits the merged servers; the profile re-activates in the fork from the inherited env.

Notes

  • bump-snapshots.yml deploys nothing, so its ossrh server was unused — that call is repurposed for codegenome rather than adding a third.
  • The rollback step is left alone: release:rollback reverts poms and drops the tag, and resolves nothing from CGP.
  • Fork PRs receive no secrets, so the profile stays inactive there, unchanged from Allow resolving dependencies from the Code Genome Project #1183.
  • Repository order is already correct — the effective pom with the profile active resolves codegenome → ossrh-snapshots → central, matching what RewriteDependencyRepositoriesPluginTest.codegenomeResolvedBeforeSnapshotsAndMavenCentral asserts on the Gradle side. Out of scope here, but unlike the Gradle plugin the pom can't group-scope CGP to org.openrewrite/io.moderne, so every third-party artifact is queried against it first.

Follow-up to #1183, which wired the codegenome profile into the ci.yml
build step only. The release and snapshot-bump workflows never export
CODEGENOME_USERNAME, so the profile stays inactive there and they resolve
from Maven Central and ossrh-snapshots alone.

setup-java writes one server per call, and the steps that pass --settings
would ignore a second ~/.m2/settings.xml, so those steps now also pass it
as --global-settings; Maven merges the two, yielding both servers.
@timtebeek
timtebeek force-pushed the tim/cgp-creds-release-workflows branch from b8834b4 to 7ae743c Compare August 11, 2026 13:50
@timtebeek
timtebeek merged commit 068603b into main Aug 11, 2026
1 check passed
@timtebeek
timtebeek deleted the tim/cgp-creds-release-workflows branch August 11, 2026 13:59
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Aug 11, 2026
timtebeek added a commit that referenced this pull request Aug 11, 2026
Resolves the ci.yml and publish.yml conflicts with #1190, which taught the
release and snapshot workflows to reach the Code Genome Project while still
publishing to Sonatype. This branch drops Sonatype as a target altogether, so
codegenome is the only server setup-java writes and the second setup-java call
plus the --settings/--global-settings pair are no longer needed.

The main-side additions that stand on their own are kept: CODEGENOME
credentials on the version-bump steps in both workflows, and bump-snapshots.yml
switching to the codegenome server.
mergify Bot added a commit to robfrank/linklift that referenced this pull request Aug 20, 2026
â€Ķ 6.45.0 to 6.46.1 [skip ci]

Bumps [org.openrewrite.maven:rewrite-maven-plugin](https://github.com/openrewrite/rewrite-maven-plugin) from 6.45.0 to 6.46.1.
Release notes

*Sourced from [org.openrewrite.maven:rewrite-maven-plugin's releases](https://github.com/openrewrite/rewrite-maven-plugin/releases).*

> 6.46.1
> ------
>
> What's Changed
> --------------
>
> * Publish releases and snapshots to the Code Genome Project by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-maven-plugin#1191](https://redirect.github.com/openrewrite/rewrite-maven-plugin/pull/1191)
>
> **Full Changelog**: <openrewrite/rewrite-maven-plugin@v6.46.0...v6.46.1>
>
> 6.46.0
> ------
>
> What's Changed
> --------------
>
> * Renew OWASP suppressions through 2026-09-01 by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-maven-plugin#1186](https://redirect.github.com/openrewrite/rewrite-maven-plugin/pull/1186)
> * Bump license-maven-plugin to 5.1.1 and drop the unused git extension by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-maven-plugin#1187](https://redirect.github.com/openrewrite/rewrite-maven-plugin/pull/1187)
> * chore(ci): bump org.apache.maven:maven-api-xml from 4.0.0-rc-5 to 4.0.0-rc-6 by [`@​dependabot`](https://github.com/dependabot)[bot] in [openrewrite/rewrite-maven-plugin#1188](https://redirect.github.com/openrewrite/rewrite-maven-plugin/pull/1188)
> * chore(ci): bump org.owasp:dependency-check-maven from 12.2.2 to 13.0.0 by [`@​dependabot`](https://github.com/dependabot)[bot] in [openrewrite/rewrite-maven-plugin#1189](https://redirect.github.com/openrewrite/rewrite-maven-plugin/pull/1189)
> * Reach the Code Genome Project from the release and bump workflows by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-maven-plugin#1190](https://redirect.github.com/openrewrite/rewrite-maven-plugin/pull/1190)
>
> **Full Changelog**: <openrewrite/rewrite-maven-plugin@v6.45.1...v6.46.0>


Commits

* [`cf5d285`](openrewrite/rewrite-maven-plugin@cf5d285) [maven-release-plugin] prepare release v6.46.1
* [`b2693b9`](openrewrite/rewrite-maven-plugin@b2693b9) Bump rewrite.version property
* [`2dc63be`](openrewrite/rewrite-maven-plugin@2dc63be) Downgrade rewrite-maven-plugin version to 6.46.1
* [`76a0020`](openrewrite/rewrite-maven-plugin@76a0020) Publish releases and snapshots to the Code Genome Project ([#1191](https://redirect.github.com/openrewrite/rewrite-maven-plugin/issues/1191))
* [`202c01b`](openrewrite/rewrite-maven-plugin@202c01b) Bump rewrite.version property
* [`f2c931f`](openrewrite/rewrite-maven-plugin@f2c931f) [maven-release-plugin] prepare for next development iteration
* [`b70ab47`](openrewrite/rewrite-maven-plugin@b70ab47) [maven-release-plugin] prepare release v6.46.0
* [`e0ff866`](openrewrite/rewrite-maven-plugin@e0ff866) Bump rewrite.version property
* [`068603b`](openrewrite/rewrite-maven-plugin@068603b) Reach the Code Genome Project from the release and bump workflows ([#1190](https://redirect.github.com/openrewrite/rewrite-maven-plugin/issues/1190))
* [`3d2f5b5`](openrewrite/rewrite-maven-plugin@3d2f5b5) chore(ci): bump org.owasp:dependency-check-maven from 12.2.2 to 13.0.0 ([#1189](https://redirect.github.com/openrewrite/rewrite-maven-plugin/issues/1189))
* Additional commits viewable in [compare view](openrewrite/rewrite-maven-plugin@v6.45.0...v6.46.1)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=org.openrewrite.maven:rewrite-maven-plugin&package-manager=maven&previous-version=6.45.0&new-version=6.46.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant