Commit e908059
authored
[RUN-4638] Migrate publishing from Maven Central to PackageCloud (#60)
* Migrate publishing from Maven Central to PackageCloud
Part of RUN-4570: Maven Central publishing limits resolution, applying
the same design validated on rundeck-plugins/sshj-plugin (RUN-4638).
- Remove nexusPublish plugin/nexusPublishing block (Sonatype-specific,
dead once release.yml stops calling publishToSonatype).
- Point the existing PackageCloud maven repo at the configurable
PKGCLD_REPO_URL (trimmed, guarded so plain builds/CI without the var
don't fail at configuration time) instead of the hardcoded
rundeckpro-test URL.
- Drop GPG signing: PackageCloud's Maven endpoint rejects the checksum
Gradle auto-generates for .asc signature files (422 Unprocessable
Entity), and neither the OSS rundeck WAR nor rundeckpro-enterprise
carry .asc signatures on PackageCloud either - only RPM/DEB packages
are signed there natively.
- release.yml: replace the Sonatype publish step with PackageCloud.
* Fail fast in release.yml if PackageCloud env vars are missing
Addresses GitHub Copilot review feedback on the PackageCloud migration
PRs: without this, a missing PKGCLD_REPO_URL makes the publish task
not exist at all (confusing "task not found"), and a missing
PKGCLD_WRITE_TOKEN with the URL present produces a "Bearer null"
Authorization header that PackageCloud rejects with a non-obvious
401/422. Validate both upfront in the one step that actually needs
them, instead of leaving the Gradle-side guard (which exists to keep
unrelated CI like gradle.yml working without these vars) to surface
the failure indirectly.
* Fall back to rundeck-plugins PackageCloud URL, simplify token check
Addresses the remaining GitHub Copilot review feedback: default
pkgcldRepoUrl to the real, canonical rundeck-plugins PackageCloud URL
instead of relying on PKGCLD_REPO_URL always being set. This removes
the need for the "only register if URL present" guard entirely, since
uri() never receives null - registering a Maven repository doesn't
make any network call until something actually resolves/publishes
through it, so there's no cost to always registering it.
With the URL guaranteed non-null, release.yml's fail-fast check only
needs to validate PKGCLD_WRITE_TOKEN (which still has no safe public
default, since it's a secret).
* Sign and upload GPG signatures to PackageCloud manually
Validated end-to-end on rundeck-plugins/sshj-plugin (merged): signing
via sign(publishing.publications) makes Gradle auto-generate a
checksum for every publication artifact including the .asc files
themselves, and PackageCloud's Maven endpoint 422s on the
checksum-of-a-signature-file. Sidestep this entirely by signing the
already-built artifacts with the gpg CLI directly and uploading just
the .asc files via curl, bypassing Gradle's publish/checksum machinery
for this part. Reuses the existing SIGNING_KEY_B64/SIGNING_PASSWORD
secrets (now pointing at a renewed, non-expired key).1 parent cb13e8c commit e908059
3 files changed
Lines changed: 45 additions & 49 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
37 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
38 | 69 | | |
39 | | - | |
40 | | - | |
41 | 70 | | |
42 | 71 | | |
| 72 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
142 | 141 | | |
143 | 142 | | |
144 | 143 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 144 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 8 | | |
18 | 9 | | |
19 | | - | |
| 10 | + | |
| 11 | + | |
20 | 12 | | |
21 | 13 | | |
22 | 14 | | |
| |||
56 | 48 | | |
57 | 49 | | |
58 | 50 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
71 | 60 | | |
72 | 61 | | |
73 | 62 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | 63 | | |
0 commit comments