[英]trigger jenkins job from bitbucket repository push
I have installed jenkins on my azure vm.我已经在我的 azure vm 上安装了 jenkins。 I have installed the jenkins plugin "Generic Webhook Trigger" I have created a freestyle build item : in the section "Build Triggers" I have check "Generic Webhook Trigger" in the section "Source Code Management", set my repository url to the repository to watch
我已经安装了 jenkins 插件“Generic Webhook Trigger”我创建了一个自由式构建项目:在“Build Triggers”部分我在“Source Code Management”部分选中了“Generic Webhook Trigger”,将我的存储库url设置为存储库观看
When I open a browser and type the following url in the adress bar : http://JENKINSURL/generic-webhook-trigger/invoke A build is triggered on jenkins当我打开浏览器并在地址栏中键入以下 URL 时: http://JENKINSURL/generic-webhook-trigger/invoke在 jenkins 上触发构建
But what I would like to do, is trigger a build not by typing this url in a browser adress bar but by pushing some code modifications on a repository, to do that I have add a webhook in the settings of my bitbucket repository :但是我想做的是触发构建,不是通过在浏览器地址栏中键入此 url 而是通过在存储库上推送一些代码修改,为此我在我的 bitbucket 存储库的设置中添加了一个 webhook:
the url is the same as before : http://JENKINSURL/generic-webhook-trigger/invoke the status is active the checkbox skip certificate verification is checked the triggers selected is "Repository push" url 与以前相同: http://JENKINSURL/generic-webhook-trigger/invoke状态为活动复选框跳过证书验证被选中选择的触发器是“存储库推送”
With all of that, when I do a push on the repository, a request is made to my jenkins server but not build is trigger and when I go to the request detail on bitbucket, I see that I get a 404 http status as response.有了所有这些,当我对存储库进行推送时,会向我的 jenkins 服务器发出请求,但不会触发构建,当我转到 bitbucket 上的请求详细信息时,我看到我收到了 404 http 状态作为响应。
I don't understand what to add to trigger the jenkins build from a bitbucket code push我不明白要添加什么才能从 bitbucket 代码推送触发 jenkins 构建
I think you have to add a token in the generic webhook trigger settings.我认为您必须在通用 webhook 触发器设置中添加一个令牌。 This token is added to you url in Bitbucket also.
此令牌也会添加到您在 Bitbucket 中的 url。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.