简体   繁体   English

从 bitbucket 存储库推送触发 jenkins 作业

[英]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.

相关问题 通过推送到Bitbucket存储库触发本地Jenkins构建 - Trigger local Jenkins build with a push to a Bitbucket repository BitBucket 触发 Jenkins 工作 - BitBucket to trigger Jenkins job 根据拉取请求从 Bitbucket 触发 Jenkins 作业 - Trigger Jenkins Job from Bitbucket on Pull Request 如何从 bitbucket 存储库触发 jenkins 管道 - How to trigger a jenkins pipeline from a bitbucket repository Jenkins-如何在Bitbucket存储库发生推送时仅触发动作? - Jenkins - How to just trigger action when push happens to Bitbucket repository? Bitbucket webhook触发詹金斯的工作 - Bitbucket webhook to trigger Jenkins job Jenkins:从不同的 BitBucket 存储库触发相同的作业 - Jenkins: trigger the same job from different BitBucket repositories 在推送到Bitbucket上的随机存储库上运行Jenkins构建 - Run Jenkins build on push to random repository on Bitbucket 将代码推送到 bitbucket 时构建 jenkins 作业 - Build jenkins job when push code to bitbucket 每当开发人员将更改推送到其beantalk-git存储库时,我们如何触发jenkins作业,该作业从一个存储库获取源代码? - How we can trigger jenkins job which takes source code from one repository, whenever a developer push changes to their beanstalk-git repository?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM