Skip to content

[RUN-4638] Migrate publishing from Maven Central to PackageCloud#42

Merged
Jesus-Osuna-M merged 1 commit into
mainfrom
RUN-4638-publish-to-packagecloud
Jul 21, 2026
Merged

[RUN-4638] Migrate publishing from Maven Central to PackageCloud#42
Jesus-Osuna-M merged 1 commit into
mainfrom
RUN-4638-publish-to-packagecloud

Conversation

@Jesus-Osuna-M

Copy link
Copy Markdown
Contributor

Jira ticket

RUN-4638 (subtask of RUN-4570)

Description

Migrate http-notification publishing from Maven Central (Sonatype) to PackageCloud, applying the same design already validated on rundeck-plugins/sshj-plugin#136 and the other already-migrated rundeck-plugins repos. Part of the RUN-4570 Maven Central publishing limits resolution — plugins account for the bulk of the file/release count on Maven Central, but no external project depends on them as Maven dependencies.

  • Removed nexusPublish/nexusPublishing (version-catalog form: removed the libs.plugins.nexusPublish alias and its now-orphaned gradle/libs.versions.toml entries too).
  • Point the PackageCloud maven repo at the configurable PKGCLD_REPO_URL env var (with a fallback to the real rundeck-plugins repo), dropping the now-unnecessary guard.
  • Dropped Gradle-side GPG signing (sign(publishing.publications)): PackageCloud's Maven endpoint rejects the checksum Gradle auto-generates for .asc signature files (422 Unprocessable Entity). Sign and upload via gpg CLI + curl instead, directly in release.yml — the same mechanism validated end-to-end on sshj-plugin.
  • release.yml: replaced the "Publish to Maven Central" step with "Publish to PackageCloud" + a "Sign and upload GPG signatures" step.

Testing instructions

  • Merge this PR.
  • Tag a version to trigger the release workflow.
  • Verify the artifact and its .asc signature land under org/rundeck/plugins/http-notification/<version>/ on PackageCloud.
  • Verify ./gradlew build still succeeds without PKGCLD_REPO_URL set.

Part of RUN-4570: Maven Central publishing limits resolution, applying
the same design validated on rundeck-plugins/sshj-plugin (PR #136) and
the other already-migrated rundeck-plugins repos.

- Remove nexusPublish plugin/nexusPublishing block (repo already had
  id 'java' declared, so no lifecycle tasks were lost).
- Point the PackageCloud maven repo at the configurable PKGCLD_REPO_URL
  with a fallback to the real rundeck-plugins repo, dropping the
  now-unnecessary guard.
- Drop Gradle-side GPG signing (sign(publishing.publications)) -
  PackageCloud's Maven endpoint rejects the checksum Gradle
  auto-generates for .asc signature files. Sign and upload via gpg CLI
  + curl instead, in release.yml.
- release.yml: replace the Sonatype publish step with PackageCloud +
  the GPG sign/upload step.

Copilot AI 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.

Pull request overview

This PR migrates the http-notification plugin’s release publishing flow from Sonatype/Maven Central to PackageCloud, aligning with the publishing approach used in other rundeck-plugins repositories.

Changes:

  • Removed Maven Central (nexus publish) configuration from Gradle and the version catalog.
  • Updated Gradle publishing to target PackageCloud with configurable PKGCLD_REPO_URL.
  • Updated the GitHub Actions release workflow to publish to PackageCloud and upload GPG .asc signatures via gpg + curl.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.

File Description
gradle/publishing.gradle Switches publishing repository configuration to PackageCloud and removes Gradle-side signing.
gradle/libs.versions.toml Removes the io.github.gradle-nexus.publish-plugin plugin version/catalog entry.
build.gradle Removes application of the nexus publish plugin and Sonatype publishing config.
.github/workflows/release.yml Replaces Maven Central publishing with PackageCloud publishing and a signature upload step.

Comment thread gradle/publishing.gradle
apply plugin: 'maven-publish'
apply plugin: 'signing'

def pkgcldRepoUrl = (System.getenv("PKGCLD_REPO_URL") ?: "https://packagecloud.io/pagerduty/rundeck-plugins/maven2").trim()
Comment thread gradle/publishing.gradle
Comment on lines +57 to 60
credentials(HttpHeaderCredentials) {
name = "Authorization"
value = "Bearer " + (System.getenv("PKGCLD_WRITE_TOKEN") ?: project.findProperty("pkgcldWriteToken"))
}
Comment on lines +49 to +51
set -e
VERSION="${{ steps.get_version.outputs.VERSION }}"
BASE_URL="${PKGCLD_REPO_URL:-https://packagecloud.io/pagerduty/rundeck-plugins/maven2}/org/rundeck/plugins/http-notification/${VERSION}"
Comment on lines +54 to +55
KEY_ID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec/ {print $5; exit}')

Comment on lines +60 to +62
curl -sf -H "Authorization: Bearer ${PKGCLD_WRITE_TOKEN}" \
-X PUT --data-binary "@${FILE}.asc" \
"${BASE_URL}/${REMOTE_NAME}.asc"
@Jesus-Osuna-M
Jesus-Osuna-M merged commit 39fc448 into main Jul 21, 2026
4 checks passed
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