Skip to content

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

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#24
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 aws-s3-steps 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. Added id 'base' explicitly to the plugins {} block — io.github.gradle-nexus.publish-plugin was silently providing the base/build/assemble/check lifecycle tasks this repo never declared on its own; removing it without adding base back broke ./gradlew build entirely with "Task with name 'build' not found".
  • 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 ./gradlew build still succeeds (this is what the missing id 'base' would have broken).
  • Verify the artifact and its .asc signature land under org/rundeck/plugins/aws-s3-steps/<version>/ on PackageCloud.

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. Add `id 'base'`
  explicitly, since io.github.gradle-nexus.publish-plugin was silently
  providing the base/build/assemble/check lifecycle tasks this repo
  never declared on its own - removing it without adding 'base' back
  broke `./gradlew build` entirely ("Task with name 'build' not
  found").
- Point the PackageCloud maven repo at the configurable PKGCLD_REPO_URL
  with a fallback to the real rundeck-plugins repo, and drop 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

Migrates this plugin’s release/publishing pipeline from Sonatype/Maven Central to PackageCloud, aligning with the org’s newer publishing approach and removing Gradle-side GPG signing.

Changes:

  • Remove io.github.gradle-nexus.publish-plugin / nexusPublishing configuration and explicitly apply Gradle’s base plugin to keep lifecycle tasks (e.g., build) present.
  • Update Gradle publishing to target PackageCloud via PKGCLD_REPO_URL and PKGCLD_WRITE_TOKEN.
  • Replace the Maven Central publish step in release.yml with PackageCloud publishing plus a CLI-based GPG signature upload step.

Reviewed changes

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

File Description
gradle/publishing.gradle Switch publishing repository configuration to PackageCloud and remove Gradle-side signing.
build.gradle Remove Nexus publishing plugin and explicitly add base to preserve lifecycle tasks.
.github/workflows/release.yml Update release workflow to publish to PackageCloud and upload .asc signatures via gpg+curl.

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 +53 to 63
maven {
name = "PackageCloud"
url = uri(pkgcldRepoUrl)
authentication {
header(HttpHeaderAuthentication)
}
credentials(HttpHeaderCredentials) {
name = "Authorization"
value = "Bearer " + (System.getenv("PKGCLD_WRITE_TOKEN") ?: project.findProperty("pkgcldWriteToken"))
}
}
Comment on lines +57 to +63
set -e
VERSION="${{ steps.get_version.outputs.VERSION }}"
BASE_URL="${PKGCLD_REPO_URL:-https://packagecloud.io/pagerduty/rundeck-plugins/maven2}/org/rundeck/plugins/aws-s3-steps/${VERSION}"

echo "$SIGNING_KEY_B64" | base64 -d | gpg --batch --yes --import
KEY_ID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec/ {print $5; exit}')

@Jesus-Osuna-M
Jesus-Osuna-M merged commit 5fbf799 into main Jul 21, 2026
2 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