A Spring Boot application for distributing build artifacts to public repositories.
The Concourse Release Scripts application can be included in Concourse container build images to distribute build artifacts to public repositories.
This is a command line application and it should be used as such in build scripts.
To interact with Artifactory repositories in Concourse, usage of the Concourse Artifactoy Resource is recommended.
This application interacts with Artifactory, Bintray and Maven Central. The corresponding credentials must be provided using configuration properties:
artifactory:
username: # Artifactory credentials, username
password: # Artifactory credentials, password
# server property is currently locked on https://repo.spring.iobintray:
username: # Bintray credentials, username
api-key: # Bintray credentials, API key
repo: # Bintray repository name, e.g. "example-jars"
subject: # Bintray subject nameFor more information about Bintray concepts, check out the Bintray REST API documentation.
sonatype:
username: # Sonatype username
password: # Sonatype passwordThe Concourse Release Scripts application supports several commands:
-
promote, to move the build artifacts to a target repository in Artifactory. -
distribute, to deploy builds from Artifactory to Bintray. -
publishGradlePlugin, to add attributes to the Spring Boot Gradle plugin. -
syncToMavenCentral, to sync artifacts to Maven Central.
java -jar /spring-boot-release-scripts.jar $COMMAND $RELEASE_TYPE $BUILD_INFO_LOCATIONWhere:
-
$COMMANDis the command name:promote,distribute,publishGradlePluginorsyncToMavenCentral -
$RELEASE_TYPEis the type of release:"M"(milestones),"RC"(release candidates) or"RELEASE" -
$BUILD_INFO_LOCATIONshould point to the absolute location of the artifactory build file info (e.g./local-repository/build-info.json)
Command used to move the build artifacts to a target repository in Artifactory. This steps usually happens after the staging of artifacts on Artifactory. This step can be done with the Concourse Artifactoy Resource.
This command sends a request to the Artifactory REST API to promote artifacts from a staging repository to a target repository.
Command used to deploy builds from Artifactory to Bintray. This step usually happens after a version promotion.
This command sends a request to the Artifactory REST API in order to request the distribution of artifacts from the source repository to the "spring-distributions" Bintray repository.
Once the request initiated, the command polls regularly the Bintray API to check whether the distribution is complete.
The command fails is the distrubtion is not completed within 40 minutes.
Command used to add attributes to the Spring Boot Gradle plugin. This step usually happens after a version distribution.
This command sends a request to the Bintray REST API in order to add the following property to the release:
{
"name": "gradle-plugin",
"values": ["org.springframework.boot:org.springframework.boot:spring-boot-gradle-plugin"]
}