How do I create and deploy the build information JSON file via the REST-API?

How do I create and deploy the build information JSON file via the REST-API?

AuthorFullName__c
JFrog Support
articleNumber
000001226
ft:sourceType
Salesforce
FirstPublishedDate
2016-10-06T13:35:27Z
lastModifiedDate
2024-03-10T07:48:57Z
VersionNumber
6

There’s a private REST API available for deploying build-info files to Artifactory that's available HERE. It will enable you to generate a build info JSON file.

The REST API query for deploying the build-info file should look like the following:

curl -X PUT -uusername:password -H "Content-type: application/json" -T buildtest.json "https://host:8081/artifactory/api/build"


As this is a private query, we have no documentation available. However, we can offer you something to move you in the right direction. Generally, the minimum for a valid build-info JSON file is version, name, number, and creation date. A very basic example, containing the parameters above, including the module and its artifact, should look like the following:

{

"version" : "1.0",

"name" : "myBuild",

"number" : "129",

"started" : "2014-03-31T16:24:42.116+0300",

"modules" : [ {

"id" : "org.jfrog.test:multi:2.36-2-SNAPSHOT",

"artifacts" : [ {

"type" : "pom",

"sha1" : "a1ab9222c219ec885ce4374b77cc4bd93485c6c8",

"md5" : "495a5e916f0e308a8ed4fc170e4d9136",

"name" : "multi-2.36-2-SNAPSHOT.pom"

} ]

} ]

}

 

For more complicated builds, information is available HERE.