hook将面包屑信息传递给jenkins

hook将面包屑信息传递给jenkins

本文介绍了如何通过bitbucket-hook将面包屑信息传递给jenkins?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

curl -X POST http://xxx.yyy.zzz:5555/job/job-name/build --user john-devops-jenkins:11df3ed41129c5c7da1518e9c3149896de -H 'Jenkins-Crumb:31827a74a160347a641c87ddbc8e3b6e'

上面的带有post请求的curl代码在触发Jenkins构建时绝对可以正常工作.

The above curl code with a post request is absolutely working fine in triggering the Jenkins build.

尝试:

  • http://xxx.yyy.zzz:5555/bitbucket-hook?token=auth_token&crumb=xyz_crumb
  • http://xxx.yyy.zzz:5555/job/job-name/build?token=auth_token&crumb=xyz_crumb

错误:No valid crumb was included in the request

还是没有运气,如何配置bitbucket钩子到面包屑的容器标头信息,或者如何在不依赖第三方插件的情况下通过url传递?

No luck still, How to configure bitbucket hook to container header information of crumb or how to pass it via url without relying on third party plugins?

推荐答案

经过一天的努力并集体讨论了curl请求的执行方式,终于通过如下配置bitbucket webhook解决了该问题:

After a day of effort and brainstorming of how curl requests execute, finally resolved this issue by configuring bitbucket webhook as below:

http://jenkins -username:jenkins-password @ jenkins-url:5555/job/job-name/build?crumb = crumb_token .

希望它能帮助您解决许多问题,并且都建议使用第三方或通用网络挂钩等等.

Hope it helps, many questions are unanswered and all are suggesting to use third party or generic-web-hooks and so on.

这篇关于如何通过bitbucket-hook将面包屑信息传递给jenkins?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 19:04