Multibranch Pipeline that includes GitHub Pull Requests

147 views
Skip to first unread message

raykr...@gmail.com

unread,
Feb 16, 2018, 2:54:40 PM2/16/18
to Jenkins Users
I have a Multibranch Pipeline job that builds branches of the main repository, however I'm unclear what configuration changes I need to make in order to build and comment on GitHub Pull Requests.

I have the GitHub hooks configured (push, pull request and comment), however the job does not fire for pull request open, nor does a scan "find" the pr and build them.

Is there something I am missing in order to have a single job build it all?
What is the prescribed approach to building GitHub pull requests (requires a pipeline build i.e. Jenkinsfile)?

Jenkins: 2.32.3
Plugins:
 - Git:3.01
 - GitHub:1.25.0
 - GItHub API:1.80
 - GitHub Integration Plugin:0.1.0-rc29

 - Pipeline:2.5
 - Pipeline Multibranch:2.12

 - SCM API:2.07

Mark Waite

unread,
Feb 16, 2018, 3:08:29 PM2/16/18
to jenkins...@googlegroups.com
You need the GitHub Branch Source plugin https://plugins.jenkins.io/github-branch-source  for the best experience.  It may not be supported on that old a version of Jenkins.  

You may also need a newer version of the git plugin, since there have been many Pipeline and Multi-branch related improvements to the git plugin since version 3.0.1.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/38807e84-293c-4472-a42a-0a4f77189b68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

raykr...@gmail.com

unread,
Feb 16, 2018, 5:17:29 PM2/16/18
to Jenkins Users
Thanks Mark.  I am not able to upgrade Jenkins myself (a separate group manages it) but will install upgrade as much as I'm able.

Mark Waite

unread,
Feb 16, 2018, 5:35:10 PM2/16/18
to jenkins...@googlegroups.com
You might also consider a short-lived experiment running a Jenkins instance from a Docker container.  If you don't mind a Jenkins image that has my preferred plugins, you can use https://github.com/MarkEWaite/docker-lfs/blob/lts-slim-with-plugins/Dockerfile-slim .  I admit that it is focused entirely on my own needs.  However, the list of plugins is current and meets my needs very well.

Mark Waite

raykr...@gmail.com

unread,
Feb 16, 2018, 5:39:47 PM2/16/18
to Jenkins Users
Thanks!  I'll give it a shot.  I was able to upgrade the Git plugin to 3.7 but the remaining are all gated on an underlying Jenkins upgrade, including GitHub Branch Source as you suggested.
Reply all
Reply to author
Forward
0 new messages