Skip to content

INTERNAL-2043 Add GitHub release actions to open-source plugin repos#5

Open
bin-xnatworks wants to merge 8 commits into
developfrom
xnat-8763
Open

INTERNAL-2043 Add GitHub release actions to open-source plugin repos#5
bin-xnatworks wants to merge 8 commits into
developfrom
xnat-8763

Conversation

@bin-xnatworks

@bin-xnatworks bin-xnatworks commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator
  1. Java 21
  2. Gradle 9.4.1, monorepo 1.10.1-SNAPSHOT
  3. Add CI workflows: build-publish.yml / release-cut-rc.yml / release-promote.yml (thin callers of NrgXnat/xnat-ci-workflows@v1)
  4. Add testRuntimeOnly javax.servlet-api so Mockito ByteBuddy can introspect XnatAppInfo (Mockito 5 on Java 21)

- vXnat 1.10.0 -> 1.10.1-SNAPSHOT
- Gradle 9.3.1 -> 9.4.1
- Hardcode lombok 1.18.34 and jacoco 0.8.12 (1.10.1-SNAPSHOT BOM no
  longer exposes these as importedProperties)
- Add explicit deps that xnat-web no longer surfaces transitively on
  compileClasspath: turbine (with full satellite excludes mirroring
  xnat-web build.gradle), velocity (compileOnly + transitive=false),
  javax.servlet-api (compileOnly + testCompileOnly)
…nvention

Read artifactoryUser/Token via project.findProperty (matches CI workflow's
ORG_GRADLE_PROJECT_artifactoryUser/Token env-var mapping), with
ARTIFACTORY_USER/TOKEN env-var fallback. Standardize URL to -local repos.
Mirrors monorepo's buildSrc/buildlogic.java-common-conventions.gradle pattern.
Strip the '=' or convert single→double quotes / def variable so the
centralized release-cut-rc workflow's sed pattern matches consistently
across all plugins. No semantic change.
…tern

Replace 187-line + 165-line inline workflows with ~37-line callers that
delegate to NrgXnat/xnat-ci-workflows reusable workflows:
  - gradle-release-cut-rc.yml@v1
  - gradle-release-promote.yml@v1

Total YAML saved per plugin: ~278 lines. Behavior unchanged — the
reusable workflows were extracted verbatim from the previous inline scripts.
The shared reusable workflow gradle-build-publish.yml@v1 has a
publish-ghcr job declaring 'permissions: contents: read, packages: write'.
Even though that job is gated by 'if: inputs.publish-ghcr' (default false),
GitHub Actions parses the permissions at workflow startup. If the caller
doesn't grant 'packages: write', the run fails with startup_failure
before any job runs.

Validated by dispatching build-publish on mfa-plugin/fake-develop:
- Without packages: write → startup_failure in 2s
- With packages: write → reaches Stage 1 Gradle build

Mirrors xnat monorepo's build-publish.yml caller pattern.
… can introspect XnatAppInfo

KeystoreServiceImplTest mocks org.nrg.xnat.services.XnatAppInfo. Mockito 5
ByteBuddy enumerates the target class's declared methods, which forces
JVM to resolve method parameter types — XnatAppInfo references
javax.servlet.ServletContext / HttpServletRequest. OpenIdLoginExtensionTest
hits the same shape via field reflection for HttpSession.

servlet-api was declared compileOnly + testCompileOnly only, neither of
which lands on testRuntimeClasspath. Adding testRuntimeOnly is the
minimum-impact fix (same pattern as dqr commit 3d1316d). See CHECKLIST §5.3.
Comment thread build.gradle

group = "au.edu.qcif.xnat.openid"
version = "1.5.1-SNAPSHOT"
version "1.5.1-SNAPSHOT"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Was this change intentional?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, all the plugins use the same format, so it is easy for AI to process

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.

3 participants