Actions
Support #22949
closedREQUIRED: Update how we upload Java packages
Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SDKs
Target version:
Due date:
Story points:
-
Release:
Release relationship:
Auto
Description
build-java-sdk uses OSSRH to upload packages. oss.sonatype.com says:
The OSSRH service will reach end-of-life on June 30th, 2025. Learn more about how to transfer to the Central Publishing Portal here.
So, we need to do that. It doesn't look too difficult. We need to:
- Get a new portal token and set it up as a Jenkins credential.
- Replace
https://oss.sonatype.orgwithhttps://ossrh-staging-api.central.sonatype.cominbuild.gradle. - Reconfigure the job to set
ossrhUsernameandossrhPasswordproperties from the new credentials. - Add a
curlcall aftergradleto call this endpoint with an Authorization header as documented.
Updated by Brett Smith 9 months ago
- Subject changed from Update how we upload Java packages to REQUIRED: Update how we upload Java packages
Now that the deadline is past due we must do this for our next release.
Updated by Brett Smith 5 months ago
- Target version set to Development 2025-11-12
- Assigned To set to Brett Smith
- Status changed from New to In Progress
Updated by Brett Smith 5 months ago
This is done. It was complicated by the fact that we switched from using the Gradle Docker image to the Gradle in Debian, which is sufficient for testing but apparently doesn't have enough to upload. I'll make a separate ticket about cleaning that up. In the meantime, for posterity, here is our current code for build-java-sdk.
#!/usr/bin/env bash
set -euo pipefail
case "$UPLOAD_PACKAGES" in
1 | true ) UPLOAD_PACKAGES=uploadArchives ;;
* ) UPLOAD_PACKAGES= ;;
esac
cp -t "$WORKSPACE/contrib/java-sdk-v2" "$gradle_properties" "$secring"
docker run --interactive --rm \
--mount "type=bind,src=$WORKSPACE/contrib/java-sdk-v2,dst=/mnt" \
--user "$(id -u)" \
--workdir /mnt \
gradle:6 \
gradle -Pversion="$ARVADOS_BUILDING_VERSION" --info --stacktrace \
clean test jar install $UPLOAD_PACKAGES
if [[ -n "$UPLOAD_PACKAGES" ]]; then
auth="Authorization: Bearer $(awk '
(/^ossrhUsername=/) { uname=substr($0, 15); }
(/^ossrhPassword=/) { pword=substr($0, 15); }
END { printf("%s:%s", uname, pword); }
' "$gradle_properties" | base64)"
curl --data "" --header "$auth" --fail --location --silent --show-error \
"https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/org.arvados"
fi
Updated by Brett Smith 5 months ago
- Status changed from In Progress to Resolved
Applied in changeset arvados|e067ce8f73059fdc8e1988a3e01036d156c14688.
Actions