How to pass crumb info via bitbucket-hook to jenkins?

℡╲_俬逩灬. 提交于 2019-12-02 18:19:21

问题


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

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

Tried:

  • 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

Error: No valid crumb was included in the request

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?


回答1:


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.



来源:https://stackoverflow.com/questions/56416925/how-to-pass-crumb-info-via-bitbucket-hook-to-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!