Need help with other JFrog products?
JFrog Enterprise+
JFrog Mission Control
JFrog Xray
JFrog Distribution
[JFrog Pipelines]
JFrog Bintray
JFrog Access
JFrog CLI
Using the latest JFrog Artifactory version? See the documentation here.
Release management with Maven is done entirely by the plugin and executes the Maven build only once.
These are the basic steps that the plugin performs:
In case of a failure, the plugin will do its best to rollback the changes (local and committed).
To enable release management in Maven jobs, edit the job configuration and check the "Enable Artifactory release management" checkbox.
G
Once the release management is enabled, Artifactory release staging link will appear in the left panel ( to authorized users)
Clicking on the release staging link will open a new page with configuration options for the release build:
The release staging page displays the last build version (the version is of the root pom and it is taken from the last non-release build).
Most of the fields in the form are filled with the default values.
Version configuration controls how the plugin changes the version in the pom files (global version for all modules, version per module or no version changes).
If create VCS tag is checked (default), the plugin will commit/push the poms with the release version to the VCS system with the commit comment. When using Git, there's also an option to create a release branch.
If the target Artifactory server is the Pro edition, the last section lets you change the target repository (the default is the release repository configured in Artifactory publisher) and to add a staging comment which will be included in the build info deployed to Artifactory.
Click on the "Build and Release to Artifactory" button to trigger the release build.
After a release build finish successfully it is possible to promote the build. This is not a required step, but very useful if you want to mark the build as released in Artifactory and to move/copy the built artifacts to another repository so the artifacts will be available for the consumers.
To activate the action either click on the icon next to the build number or on the "Artifactory Release Promotion" link on the left panel of a built release job.
Note that Artifactory Pro is required fro promotion.
Clicking on the link will open the promotion page:
Select the target status (Released or Rolled-Back) of the build and optional comment to display in the build in Artifactory. To move or copy the build artifacts select the target repository.
Artifactory also allows you to promote a build that has not been through release staging.
To do so, check the Allow promotion of non-staged builds box in the build job configuration dialog.
The release management in Gradle relies on version (and other) properties managed by gradle.properties file. You add all the relevant properties to the release management configuration, and the plugin will read and modify those properties in the gradle.properties file.
These are the basic steps that the plugin performs:
The release management is also available for Gradle build steps in a free style project. To enable Gradle release management, edit the free style job configuration and check "Gradle-Artifactory Integration" and then "Enabled Release Management" checkbox inside the Gradle-Artifactory integration.
Once the release management is enabled, Artifactory release staging link will appear in the left panel (to authorized users).
Clicking on the release staging link will open a new page with configuration options for the release build:
The release staging page displays the release and next development properties configured for the job. The values are read from the gradle.properties file and calculation of the release and next integration version is attempted and displayed in the text fields.
If create VCS tag is checked (default), the plugin will commit/push the poms with the release version to the VCS system with the commit comment. When using Git, if 'Use release branch' is checked, the next release version changes will be done on the branch instead of the currently checkout branch.
The last section lets you change the target repository (the default is the release repository configured in Artifactory publisher) and optional staging comment which will be included in the build info deployed to Artifactory.
Click on the "Build and Release to Artifactory" button to trigger the release build.
Promotion is same as in Maven.
If you're using matrix based security, you'll have to grant permissions for the release and promote actions.
The plugin adds two permission types:
The Release Staging process exposes the following variables, which can be later used inside the build job. The variables are exposed when the release build ends.
RT_RELEASE_STAGING_VERSION - Contains the release version configured for the release.
RT_RELEASE_STAGING_NEXT_VERSION - Contains the next development version configured for the release.
RT_RELEASE_STAGING_SCM_TAG - Contains the SCM tag name configured for the release.
RT_RELEASE_STAGING_SCM_BRANCH - Contains the SCM branch name configured for the release.
The release management supports Subversion SCM when using one checkout directory.
During the release the plugin will perform the following:
To work with Git, the Git plugin (version 1.1.10 or later) has to be configured to build one branch AND to checkout to the same local branch. The remote URL should allow Read+Write access.
The plugin uses the git client installed on the machine and uses its credentials to push back to the remote Git repository.
During the release the plugin will perform the following:
Note that changes will only be committed if changes were made to the files (pom files or gradle.properties)
The release management supports Perforce SCM when using one checkout directory.
During the release the plugin will perform the following:
The Jenkins Artifactory Plugin exposes a Release Management API that provides access to all the features that are available through the Jenkins UI.
The format of the API is as follows:
Release Management API Format |
---|
< Jenkins Server URL>/job/< Project Name>/artifactory/staging?< Parameters List> |
where:
Jenkins Server URL | The URL of the Jenkins server running the build |
Project Name | The name of the Jenkins project being built |
The table below details the parameters that should be provided to the API. These parameters mirror those used with the Jenkins UI.
The parameters list should have the following format: <param name1>=<param value1>&<param name2>=<param value2>...
Mandatory parameters
If you do not specify any of the below parameters, the Release Management API will use the values provided by the configured Artifactory Staging User Plugin.
Name | Expected Values |
---|---|
versioning | NONE: Use existing module versions |
tagUrl | The name/URL of the VCS tag to create |
tagComment | The VCS tag comment |
stagingComment | A comment that will be added to the promotion action |
repositoryKey | Target repository to which the published release artifacts should be uploaded |
releaseVersion | Relevant only if versioning is set to GLOBAL |
releaseBranch | The name of the release branch to create |
release.<Artifact GroupID>:<Artifact ID> | Relevant only if versioning is set to PER_MODULE |
nextVersion | Relevant only if versioning is set to GLOBAL |
nextDevelCommitComment | The comment to use when committing changes for the next development version |
next.<Artifact GroupID>:<Artifact ID> | Relevant only if versioning is set to PER_MODULE |
createVcsTag | true: Create a VCS tag |
createReleaseBranch | true: Create a release branch |
API Execution Example Using Curl |
---|
releaseVersion=8.0.1&nextVersion=8.1-SNAPSHOT&createReleaseBranch=false&createVcsTag=true&tagUrl=8.0&tagComment=[artifactory- release|artifactory-release] Release version 8.0&nextDevelCommitComment= |
Name | Expected Values |
---|---|
versioning | Not used in Gradle projects |
releaseVersion | Not used in Gradle projects |
nextVersion | Not used in Gradle projects |
release.<Property version name in gradle.properties> | Specifies the new release version for the module using the pattern: release.<Property version name in gradle.properties> |
next.<Property version name in gradle.properties> | Specifies the next development version for the module using the pattern: next.<Property version name in gradle.properties> |