我试图手动清理一些特定的旧工件。我很高兴删除特定版本的大型工件: http://artifactory.example.com/artifactory/simple/libs-releases-local/com/company/path/buildName/submodule/version/
我认为我最好的选择是使用REST API,但是我无法将documentation for Artifactory REST API映射到curl命令。
有人可以为我的特定文件提供file info和delete item的curl命令吗?我想如果我有这个,我可以弄清楚我未能理解的其余部分。或者,如果你有其他很好的建议,我会全力以赴。
请注意,我的公司正在使用Artifactory 2.6.1的免费版本。这严重限制了我的问题的可能解决方案。我已经发现以下内容不受支持:
答案 0 :(得分:2)
应该是直截了当的。这是一个fileinfo
示例:
curl http://oss.jfrog.org/artifactory/api/storage/oss-snapshot-local/org/codehaus/groovy/groovy/2.5.0-SNAPSHOT/groovy-all-2.5.0-SNAPSHOT.jar
返回:
{
"repo" : "oss-snapshot-local",
"path" : "/org/codehaus/groovy/groovy/2.5.0-SNAPSHOT/groovy-all-2.5.0-SNAPSHOT.jar",
"created" : "2015-01-22T12:40:55.441Z",
"createdBy" : "groovy-operator",
"lastModified" : "2015-07-30T17:11:20.057Z",
"modifiedBy" : "groovy-operator",
"lastUpdated" : "2015-07-30T17:11:20.057Z",
"downloadUri" : "http://oss.jfrog.org/artifactory/oss-snapshot-local/org/codehaus/groovy/groovy/2.5.0-SNAPSHOT/groovy-all-2.5.0-SNAPSHOT.jar",
"mimeType" : "application/java-archive",
"size" : "7091635",
"checksums" : {
"sha1" : "768e9c224d359aa3a7d57e0ec5d58e87787d3bd3",
"md5" : "70ba790f40fc8a331a73598ae602e617"
},
"originalChecksums" : {
"sha1" : "768e9c224d359aa3a7d57e0ec5d58e87787d3bd3",
"md5" : "70ba790f40fc8a331a73598ae602e617"
},
"uri" : "http://oss.jfrog.org/artifactory/api/storage/oss-snapshot-local/org/codehaus/groovy/groovy/2.5.0-SNAPSHOT/groovy-all-2.5.0-SNAPSHOT.jar"
}
答案 1 :(得分:2)
这足以让我能够找出我的具体例子。我认为关键是当文档说“repoKey”时,它意味着“libs-releases-local”。
以我的具体例子为例:
http://artifactory.example.com/artifactory/simple/libs-releases-local/com/company/path/buildName/submodule/version/
我正在寻找的命令是:
curl http://artifactory.example.com/artifactory/api/storage/libs-releases-local/com/company/path/buildName/submodule/version/
curl -X delete -u username:password http://artifactory.example.com/artifactory/libs-releases-local/com/company/path/buildName/submodule/version/
非常感谢您的帮助!