
This commit reworks the CI pipeline to remove the use of Bintray for publishing to Maven Central. In its place it adds a new publishToCentral command to the release scripts. This command can be used to publish a directory tree of artifacts to the Maven Central gateway hosted by Sonatype. Publishing consists of 4 steps: 1. Create the staging repository 2. Deploy artifacts to the repository 3. Close the repository 4. Release the repository The command requires 3 arguments: 1. The type of release being performed 2. Location of a build info JSON file that describes the release that is to be deployed 3. Root of a directory structure, in Maven repository layout, that contains the artifacts to be deployed Closes gh-25107
14 lines
513 B
Bash
Executable File
14 lines
513 B
Bash
Executable File
#!/bin/bash
|
|
|
|
source $(dirname $0)/common.sh
|
|
|
|
version=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/' )
|
|
export BUILD_INFO_LOCATION=$(pwd)/artifactory-repo/build-info.json
|
|
|
|
java -jar /spring-boot-release-scripts.jar publishToCentral $RELEASE_TYPE $BUILD_INFO_LOCATION artifactory-repo || { exit 1; }
|
|
|
|
java -jar /spring-boot-release-scripts.jar promote $RELEASE_TYPE $BUILD_INFO_LOCATION || { exit 1; }
|
|
|
|
echo "Promotion complete"
|
|
echo $version > version/version
|