Concourse:使用HTTP请求触发作业

编程入门 行业动态 更新时间:2024-10-27 00:22:43
本文介绍了Concourse:使用HTTP请求触发作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图用我的Git服务器上的Web钩子触发Concourse作业。在 Github上发布之后,我发现了一个端点定义。所以我试过了

curl 10.20.30.101:8080/api/v1/pipelines/helloworld/resources/resource- tutorial / check -X POST

其中 helloworld 是我管道的名称, resource-tutorial 是我想要触发检查的资源的名称。

但是Concourse会返回

404页未找到

我做错了什么?有人可以指点我到正确的端点吗?

解决方案

现在有资源的web钩子标记: concourse-ci/configuring-resources.html#webhook_token

/ api / v1 / teams / TEAM_NAME / pipeline / PIPELINE_NAME / resources / RESOURCE_NAME / check / webhook?webhook_token = WEBHOOK_TOKEN

你可以在这里添加web钩子: github/< username> /<repo> / settings / hooks / new

I am trying to trigger a Concourse job with a web hook on my Git server. Following this issue on Github I found an endpoint definition. So I tried

curl 10.20.30.101:8080/api/v1/pipelines/helloworld/resources/resource-tutorial/check -X POST

where helloworld is the name of my pipeline and resource-tutorial is the name of the resource for which I want to trigger a check.

But Concourse returns

404 page not found

What am I doing wrong? Can someone point me to the correct endpoint?

解决方案

For now there is web hook token for resource: concourse-ci/configuring-resources.html#webhook_token

/api/v1/teams/TEAM_NAME/pipelines/PIPELINE_NAME/resources/RESOURCE_NAME/check/webhook?webhook_token=WEBHOOK_TOKEN

You can add web hook here: github/<username>/<repo>/settings/hooks/new

更多推荐

Concourse:使用HTTP请求触发作业

本文发布于:2023-11-24 05:09:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1624071.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:作业   Concourse   HTTP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!