Triggering Jenkins Multibranch Pipeline by raising a Pull Request in GitHub

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Triggering Jenkins Multibranch Pipeline by raising a Pull Request in GitHub

Sunil Boga
I am using Jenkins Multibranch pipeline.
I've configured the APIs (github-webhook and ghprbhook) on GitHub.
Currently, If I click on "Scan Repository Now/Scan Repository Log" in Jenkins, the Jenkins will go through the GitHub and creates a new PR job in Jenkins if there are any PR on GitHub.
So I need to trigger this Multibranch pipeline whenever there is a Pull Request raised on GitHub. I want this pipeline to trigger automatically when there is a PR on GitHub.
What do I need to do to achieve this approach?
Is it possible to trigger Multibranch pipeline automatically whenever a PR is raised on GitHub?

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d8148d67-4fb7-47fb-a718-dad51ac81b42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Triggering Jenkins Multibranch Pipeline by raising a Pull Request in GitHub

Ramanathan Muthaiah
So I need to trigger this Multibranch pipeline whenever there is a Pull Request raised on GitHub. I want this pipeline to trigger automatically when there is a PR on GitHub.
What do I need to do to achieve this approach?
Is it possible to trigger Multibranch pipeline automatically whenever a PR is raised on GitHub?

Yes, configure webhook in GH repository to send event related to Pull Request, if that's sufficient for your requirement. Select all the events (don't remember the exact name) if you have need for all the events to be passed to jenkins master.

NOTE:
Jenkinsfile may or may not need the property (related to github push) to be set. There were few threads in this group on this setting.

/Ram

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b99e6c4e-da0b-4582-a1b3-7534d6f84f93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Triggering Jenkins Multibranch Pipeline by raising a Pull Request in GitHub

stephenconnolly

On Wed 29 Nov 2017 at 13:27, Ramanathan Muthaiah <[hidden email]> wrote:
So I need to trigger this Multibranch pipeline whenever there is a Pull Request raised on GitHub. I want this pipeline to trigger automatically when there is a PR on GitHub.
What do I need to do to achieve this approach?
Is it possible to trigger Multibranch pipeline automatically whenever a PR is raised on GitHub?

Yes, configure webhook in GH repository to send event related to Pull Request, if that's sufficient for your requirement. Select all the events (don't remember the exact name) if you have need for all the events to be passed to jenkins master.

NOTE:
Jenkinsfile may or may not need the property (related to github push) to be set. There were few threads in this group on this setting.

If multibranch *do _not_ set* as multibranch is opinionated and will respond to the events itself... setting the property may result in double builds or other strange behaviour

/Ram

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b99e6c4e-da0b-4582-a1b3-7534d6f84f93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Sent from my phone

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CA%2BnPnMx8%2B1vFEp5gSbH2uovq%2B%3DKbmfsn9gVPcAN_HcsS79psdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.