使用AQL和清理旧文物对工件进行排序

发布于 2025-01-28 21:53:20 字数 546 浏览 2 评论 0 原文

我正在尝试从Jfrog文物中对文物列表进行排序,但要获取(请求的URL返回错误:400不良请求),在Jfrog Documentation( https://www.jfrog.com/confluence/confluence/display/display/jfrog/jfrog/artifactory+comparison+mmatrix 来源服务。在我们获得文物清单之后,需要从文物库中的子文件夹中删除旧文物。尝试使用CLI和AQL,但没有任何效果。

我们的回购URL看起来像这样 http://domainname/artifactory/repo/repo/folder/subfolder/test1.zip

喜欢测试1.zip 1.zip我们在该子文件夹中有许多文物(假设50)。在此方面寻求帮助,任何人都在这个问题上给我服务。谢谢。

I'm trying to sort the list of artifacts from jfrog artifactory but getting (The requested URL returned error: 400 Bad Request), in the jfrog documentation (https://www.jfrog.com/confluence/display/JFROG/Artifactory+Comparison+Matrix) says it won't work for open source services. After we get list of artifacts need to delete old artifacts from subfolder in the artifactory repo. Tried with CLI and AQL but nothing worked.

Our repo url looks like this
http://domainname/artifactory/repo/folder/subfolder/test1.zip

Like test 1.zip we have many artifacts(let's say 50)in that subfolder. Looking for help on this, anyone pls me on this issue. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

随梦而飞# 2025-02-04 21:53:20

虽然OSS版本不支持排序,但如果您想删除比某个时间段大的文物,则可以使用相对时间操作员,解析输出,并使用脚本删除这些文物。
您还可以指定a “ nofollow noreferrer”>特定日期。有几个比较操作员使用。
您可以使用以下AQL进行参考:

curl -uadmin:password -XPOST "http://localhost:8082/artifactory/api/search/aql" -d 'items.find({"repo": "repo"}, {"path": "folder/subfolder"}, {"created" : {"$before" : "2minutes"}})'  -H "Content-Type: text/plain"

While sorting is not supported in OSS versions, if you would like to delete artifacts older than a certain time period, you can use Relative Time Operators, parse the output, and use a script to delete those artifacts.
You can also specify a specific date. There are several Comparison Operators that you can use.
You can use the below AQL for reference:

curl -uadmin:password -XPOST "http://localhost:8082/artifactory/api/search/aql" -d 'items.find({"repo": "repo"}, {"path": "folder/subfolder"}, {"created" : {"$before" : "2minutes"}})'  -H "Content-Type: text/plain"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文