如何在Jenkins管道中使用伪影查询语言,而不是从文件中调用它

发布于 2025-01-29 18:14:06 字数 626 浏览 2 评论 0原文

我有一个用于从文物中删除文件的AQL。我正在设计管道,以便它可以基于AQL从文物中删除文件。 我知道,对于文物上传和下载,我们可以使用RTUPLOAD/RTDOWNLOAD在管道中指定AQL,但是是否有一种方法可以删除?

#AQL delete.spec
{
"files": [
  {
    "aql": {
    "items.find": {
    "repo": {"$eq":"app-java-repo"},
    "path": "archives/test/app",
    "type": "folder",
    "$or": [
          {
            "$and": [
              {
                "name": {"$nmatch" : "*build*"}
              }
            ]
          }
        ]
      }
    }
  }
]
}
jf rt del --spec delete.spec

使用JFrog CLI,可以传递规格文件,并且可以删除来​​自文物库存的文件。这是手动奏效的,但是如何通过将AQL放在管道阶段而不是将AQL作为文件来实现。

I have a AQL that is used to delete files from the artifactory. I am designing a pipeline so that it can delete files from artifactory based on the AQL.
I know for artifactory upload and download we can specify the AQL within the pipeline using rtupload/rtdownload, but is there a way to do for delete as well?

#AQL delete.spec
{
"files": [
  {
    "aql": {
    "items.find": {
    "repo": {"$eq":"app-java-repo"},
    "path": "archives/test/app",
    "type": "folder",
    "$or": [
          {
            "$and": [
              {
                "name": {"$nmatch" : "*build*"}
              }
            ]
          }
        ]
      }
    }
  }
]
}
jf rt del --spec delete.spec

Using the jfrog cli, the spec file can be passed and the files from artifactory repo can be deleted. This is working out manually, but how can the same be achieved by having the AQL in the pipeline stage instead of having AQL as a file.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文