Gitlab CI/CD pipelines: 如何按执行日期搜索

huangapple go评论55阅读模式
英文:

gitlab CI/CD pipelines: how to search by execution date

问题

可以按执行日期搜索管道吗?
例如,我需要查找在2023-01-31执行的管道的结果。

我已经在网络上查找了,但没有找到任何关于如何执行这个操作的建议。

英文:

Is it possible to search for pipeline by execution date?
Example, I need to fine results of pipelines that was executed at 2023-01-31.

I have look around of net, but could not find any suggestion how to do this.

答案1

得分: 1

我不知道一种GUI方式,但你可以使用GitLab的Pipelines API以编程方式搜索和筛选流水线。

在请求GET /projects/:id/pipelines API端点时,可以使用updated_after和/或updated_before字段。以下是文档中的示例,没有筛选:

curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines"

要获取完整的接受参数参考,请查阅官方文档:列出项目流水线

英文:

I do not know a GUI way, but you can use GitLab Pipelines API to search and filter pipelines programmatically.

Use updated_after or/and updated_before fields when requesting GET /projects/:id/pipelines API endpoint. Example from documentation without filtering:

curl --header &quot;PRIVATE-TOKEN: &lt;your_access_token&gt;&quot; &quot;https://gitlab.example.com/api/v4/projects/1/pipelines&quot;

For full accepted parameters reference please follow the official documentation: List project pipelines.

huangapple
  • 本文由 发表于 2023年2月6日 20:19:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/75361238.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定