Releasing Java SDK packages » History » Revision 13
Revision 12 (Peter Amstutz, 07/08/2024 08:10 PM) → Revision 13/14 (Brett Smith, 11/04/2025 02:11 PM)
h1. Releasing Java SDK packages The Java SDK is distributed on the Sonatype artifact repository. Here are the steps to release a new jar file: reference: https://central.sonatype.org/publish/release/ # Build and upload package using https://ci.arvados.org/view/All/job/build-java-sdk # Go to "Sonatype Publishing Settings":https://central.sonatype.com/publishing/deployments https://oss.sonatype.org and log in with the appropriate credentials (gopass oss.sonatype.org/curii) # Make sure you're Under "Build Promotion" on the "Deployments" tab. left sidebar, click on "Staging Repostories" # Find "orgarvados-XXXX" and click on it # In the jar that was just uploaded by Jenkins. Click toolstrip, click on "Close" -- this locks the "Publish" repository against further changes and runs validation checks # The validation checks take a few minutes. You can monitor it on the "Activity" tab # Once the validations have passed, you'll be able to hit the "Release" button # This moves the packages to the release repository and wait for drops (deletes) the process to finish. staging repository # Reportedly there is lag of a few minutes on when a released package becomes visible / searchable h2. Getting the authentication token for Sonatype "Log into Sonatype":https://central.sonatype.com/usertoken # Go to https://oss.sonatype.org and under log in with the account appropriate credentials (gopass oss.sonatype.org/curii) # Click on "Curii" in the upper right and go to "Profile" # There will be a drop down menu that says "Summary", click on it and select "User Tokens" to review Token" # There will be a button "Access User Token", click on it and manage tokens. Our current it will give a random string for username and password # Paste those into @gradle.properties@ # Update the credentials on Jenkins token is stored in gopass as @curii-systems/websites/oss.sonatype.org/jenkins@. h2. gradle.properties To upload to Sonatype, you need the token (see above) and a secret key. You must upload On Jenkins, there is a GPG-signed package. All these parameters are set in @gradle.properties@ package signing key which we keep as a Jenkins secret. 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. <pre> ossrhUsername=... ossrhPassword=... signing.keyId=... signing.password= signing.secretKeyRingFile=...-secret-key.gpg </pre>