简体   繁体   English

Jenkins多分支项目和Github Webhooks

[英]Jenkins multi branch project and Github webhooks

Looks like I'm missing something. 好像我缺少什么。

I set up multibrunch jon in Jenkins with SCM like git@github.someorg.com/repo.git It scanned all current branches. 我使用git@github.someorg.com/repo.git这样的SCM在Jenkins中设置了多分支jon,它扫描了所有当前分支。

Then I set up web hook in Github with URL http://jenkins.someorg.com/github-webhook/ for all events. 然后,我在Github中使用URL http://jenkins.someorg.com/github-webhook/设置了所有事件的Web挂钩。

Github shows that event has been successfully sent. Github显示事件已成功发送。 Jenkins log shows that events has bees received. Jenkins日志显示事件已收到蜜蜂。

Received PUSH for https://github.someorg.com/repo from IP ⇒ http://jenkins.someorg.com/github-webhook/

But nothing happens on the Jenkins job itself... 但是詹金斯的工作本身没有任何反应...

Double-check " Setting up a GitHub webhook in Jenkins " 仔细检查“ 在Jenkins中设置GitHub Webhook

You need to make sure your Build Trigger is set to “Build when a change is pushed to GitHub”, with of course a GitHub repo url ;) 您需要确保将构建触发器设置为“将更改推送到GitHub时进行构建”,当然还要有GitHub存储库网址;)

https://i1.wp.com/thepracticalsysadmin.com/wp-content/uploads/2014/03/jenkins4.jpg?resize=300%2C200&ssl=1

And Jenkins should have an SSH key already associated with the desired GitHub project. 而且,Jenkins应该已经有一个与所需的GitHub项目相关联的SSH密钥。

Found solution. 找到解决方案。 I was using Git repo. 我正在使用Git回购。 But when I switched to Github with API key, everything worked 但是当我使用API​​密钥切换到Github时,一切正常

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM