Project

General

Profile

Releasing Java SDK packages » History » Version 12

Peter Amstutz, 07/08/2024 08:10 PM

1 1 Peter Amstutz
h1. Releasing Java SDK packages
2
3
The Java SDK is distributed on the Sonatype artifact repository.  Here are the steps to release a new jar file:
4
5 2 Peter Amstutz
reference: https://central.sonatype.org/publish/release/
6
7 1 Peter Amstutz
# Build and upload package using https://ci.arvados.org/view/All/job/build-java-sdk
8 5 Peter Amstutz
# Go to https://oss.sonatype.org and log in with the appropriate credentials (gopass oss.sonatype.org/curii)
9 1 Peter Amstutz
# Under "Build Promotion" on the left sidebar, click on "Staging Repostories"
10 7 Peter Amstutz
# Find "orgarvados-XXXX" and click on it
11 1 Peter Amstutz
# In the toolstrip, click on "Close" -- this locks the repository against further changes and runs validation checks
12
# The validation checks take a few minutes.  You can monitor it on the "Activity" tab
13
# Once the validations have passed, you'll be able to hit the "Release" button
14
# This moves the packages to the release repository and drops (deletes) the staging repository
15
# Reportedly there is lag of a few minutes on when a released package becomes visible / searchable
16 3 Peter Amstutz
17 8 Peter Amstutz
h2. Getting the authentication token for Sonatype
18
19
# Go to https://oss.sonatype.org and log in with the appropriate credentials (gopass oss.sonatype.org/curii)
20
# Click on "Curii" in the upper right and go to "Profile"
21
# There will be a drop down menu that says "Summary", click on it and select "User Token"
22
# There will be a button "Access User Token", click on it and it will give a random string for username and password 
23
# Paste those into @gradle.properties@
24
# Update the credentials on Jenkins
25
26 4 Peter Amstutz
h2. gradle.properties
27
28 12 Peter Amstutz
To upload to Sonatype, you need the token (see above) and a secret key.  On Jenkins, there is a package signing key which you need to also specify.  Note that the property values after the equals sign should not be quoted.  I'm not certain if spaces are allowed around the equals sign, but currently it works with no extra spaces.
29 10 Peter Amstutz
30 1 Peter Amstutz
<pre>
31 8 Peter Amstutz
ossrhUsername=...
32 4 Peter Amstutz
ossrhPassword=...
33 9 Peter Amstutz
signing.keyId=... 
34
signing.password= 
35
signing.secretKeyRingFile=...-secret-key.gpg 
36 3 Peter Amstutz
</pre>