I've been researching for some time and am having trouble translating what I've found into what I can use. I'm trying to send ant artifacts to Artifactory from Jenkins--I'm trying to do this with a shell script. I know you can POST with curl, I'm essentially trying to turn the following into a POST:
PUT /libs-release-local/my/jar/1.0/jar-1.0.jar
{
"uri": "http://localhost:8080/artifactory/libs-release-local/my/jar/1.0/jar-1.0.jar",
"downloadUri": "http://localhost:8080/artifactory/libs-release-local/my/jar/1.0/jar-1.0.jar",
"repo": "libs-release-local",
"path": "/my/jar/1.0/jar-1.0.jar",
"created": ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ),
"createdBy": "userY",
"size": "1024", //bytes
"mimeType": "application/java-archive",
"checksums":
{
"md5" : string,
"sha1" : string
},
"originalChecksums":{
"md5" : string,
"sha1" : string
}
}
I've found https://superuser.com/questions/149329/what-is-the-curl-command-line-syntax-to-do-a-post-request & http://curl.haxx.se/docs/httpscripting.html#POST
Would it be a sequence of curls? like
curl --upload-fil "/libs-release-local/my/jar/1.0/jjar-1.0.jar"
Curl -X POST --URI "http://localhost:8080/artifactory/libs-release-local/my/jar/1.0/jar-1.0.jar"
etc..?
curl -X POST