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 GLOBAL: One version for all modules PER_MODULE : Version per module |
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 The new release version |
releaseBranch | The name of the release branch to create |
release.<Artifact GroupID>:<Artifact ID> | Relevant only if versioning is set to PER_MODULE Specifies the new release version for the module using the pattern <Artifact GroupID>:<Artifact ID> |
nextVersion | Relevant only if versioning is set to GLOBAL The next development version |
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 specifies the next development version for the module using the pattern <Artifact GroupID>:<Artifact ID> |
createVcsTag | true: Create a VCS tag false: Do not create a VCS tag |
createReleaseBranch | true: Create a release branch false: Do not create a release branch |
API Execution Example Using Curl
curl -X POST \ --user $USER:$API_TOKEN \ http://localhost:8080/job/$JOB_NAME/artifactory/staging \ -H "Content-Type: application/x-www-form-urlencoded" \ -d releaseVersion=8.0.1 \ -d nextVersion=8.1-SNAPSHOT \ -d createReleaseBranch=false \ -d createVcsTag=true \ -d tagUrl=8.0 \ -d tagComment="[artifactory-release|artifactory-release] Release version 8.0" \ -d nextDevelCommitComment=comment...
Note
In the above cUrl example, please replace $USER, $API_TOKEN and $JOB_NAME with the relevant values.
Also, this will only work with a generated API Token. Using password will prompt the following error message: No valid crumb was included in the request