我正尝试在我的 Git 服务器上使用网络 Hook 触发 Concourse 作业。按照这个 issue on Github我找到了一个 endpoint definition .所以我尝试了
curl http://10.20.30.101:8080/api/v1/pipelines/helloworld/resources/resource-tutorial/check -X POST
其中 helloworld
是我的管道的名称,resource-tutorial
是我要触发检查的资源的名称。
但是 Concourse 返回
404 page not found
我做错了什么?有人可以指出正确的端点吗?
最佳答案
目前资源有网络 Hook token : https://concourse-ci.org/configuring-resources.html#webhook_token
/api/v1/teams/TEAM_NAME/pipelines/PIPELINE_NAME/resources/RESOURCE_NAME/check/webhook?webhook_token=WEBHOOK_TOKEN
您可以在此处添加网络 Hook :
https://github.com/<username>/<repo>/settings/hooks/new
关于git - Concourse:使用 HTTP 请求触发作业,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41823945/