Two separate GitHub Organizations used with same GitHub Branch Source Plugin configuration results in only one job getting triggered per PR

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Two separate GitHub Organizations used with same GitHub Branch Source Plugin configuration results in only one job getting triggered per PR

Ian Vernon
I had asked previously about getting two jobs triggered from GitHub when a PR is opened. Each job uses a distinct Jenkinsfile. This is so multiple sets of tests can be triggered as separate jobs when a PR is opened. That thread can be found here: https://groups.google.com/forum/#!topic/jenkinsci-users/RXZykkWy8PQ . I was able to get it set up, but the behavior isn't exactly what I want. I have looked all over for how to fix this :(

However, it appears that the GitHub Organization configuration for each job must be different for me to achieve having two jobs appear on GitHub that are linked to Jenkins. The configuration of the GitHub Organization that runs the first job is attached as 'jenkins1_config.png'. This is set up using the GitHub Branch Source Plugin.


The fields that are in play here are the following. For both jobs, I want the following configuration:

* Discover Branches
  Strategy: Exclude Branches that are also filed as PRs
* Discover Pull Requests from Origin
  Strategy: The current pull request revision

In order for the second organization's job to appear in GitHub, I have to change these two options. If the configuration is the same, it doesn't even show up, and only the first job shows up on GitHub. How can I get the same behavior for each GitHub Organization on Jenkins so that it appears on GitHub?

One thing I have noticed is that it seems like it is not possible to change the names of these jobs on a per-GitHub organization basis, and that this is only configurable via global Jenkins configuration. Attached is the configuration for the GitHub Pull Request Builder that we have set up for that Jenkins instance as 'ghprb_configuration.png'. 

Please let me know if I need to provide more information. Thanks!



--
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/c8a800c6-2a7a-4ad3-a3cb-fa6fa7940568%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jenkins1_config.png (168K) Download Attachment
ghprb_configuration.png (139K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Two separate GitHub Organizations used with same GitHub Branch Source Plugin configuration results in only one job getting triggered per PR

stephenconnolly

On Thu 4 Jan 2018 at 18:11, Ian Vernon <[hidden email]> wrote:
I had asked previously about getting two jobs triggered from GitHub when a PR is opened. Each job uses a distinct Jenkinsfile. This is so multiple sets of tests can be triggered as separate jobs when a PR is opened. That thread can be found here: https://groups.google.com/forum/#!topic/jenkinsci-users/RXZykkWy8PQ . I was able to get it set up, but the behavior isn't exactly what I want. I have looked all over for how to fix this :(

However, it appears that the GitHub Organization configuration for each job must be different for me to achieve having two jobs appear on GitHub that are linked to Jenkins. The configuration of the GitHub Organization that runs the first job is attached as 'jenkins1_config.png'. This is set up using the GitHub Branch Source Plugin.


The fields that are in play here are the following. For both jobs, I want the following configuration:

* Discover Branches
  Strategy: Exclude Branches that are also filed as PRs
* Discover Pull Requests from Origin
  Strategy: The current pull request revision

In order for the second organization's job to appear in GitHub, I have to change these two options. If the configuration is the same, it doesn't even show up, and only the first job shows up on GitHub. How can I get the same behavior for each GitHub Organization on Jenkins so that it appears on GitHub?

What do you mean “appears on GitHub”? Do you mean as a second status check mark?

You may want to use a custom notifications context if that is the case. There’s a plugin Steve F wrote that uses a new extension point in GitHub Branch Source (look at the changelog and you might be able to find it mentioned... or maybe Steve will chime in)


One thing I have noticed is that it seems like it is not possible to change the names of these jobs on a per-GitHub organization basis, and that this is only configurable via global Jenkins configuration. Attached is the configuration for the GitHub Pull Request Builder

FYI: This plugin is completely ignored by multibranch.

that we have set up for that Jenkins instance as 'ghprb_configuration.png'. 

Please let me know if I need to provide more information. Thanks!



--
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/c8a800c6-2a7a-4ad3-a3cb-fa6fa7940568%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%2BnPnMzOPuBX6h9D3%2B7hEjXPHrS1KrQf2hspKo-JOMgqO0X8rw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Two separate GitHub Organizations used with same GitHub Branch Source Plugin configuration results in only one job getting triggered per PR

Ian Vernon
> What do you mean “appears on GitHub”? Do you mean as a second status check mark?
Yes, that is correct. Only one check mark appears despite there being two GitHub Organizations set up. If I change the aforementioned settings, two check marks appear on GitHub, but I want to have the same behavior with the plugin. 

 > FYI: This plugin is completely ignored by multibranch.

Is a GitHub Organization multibranch? 

Regarding the custom notification context, is this what you are referring to? https://issues.jenkins-ci.org/browse/JENKINS-36574

Thanks for the quick reply!

--
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/b0414d64-b2ab-402c-ae9a-afb49c03d3df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Two separate GitHub Organizations used with same GitHub Branch Source Plugin configuration results in only one job getting triggered per PR

Steven Foster
Here is the repo for the custom github context plugin https://github.com/steven-foster/github-scm-trait-notification-context
I still need to actually release it to the plugin center, hopefully that's not too arduous.

It lets you specify a context label for a multibranch project's github notifications. If github receives a duplicate context label it just replaces the existing one, so this is helpful if you are doing more than one kind of build for a repo.

On Thursday, January 4, 2018 at 7:07:01 PM UTC, Ian Vernon wrote:
> What do you mean “appears on GitHub”? Do you mean as a second status check mark?
Yes, that is correct. Only one check mark appears despite there being two GitHub Organizations set up. If I change the aforementioned settings, two check marks appear on GitHub, but I want to have the same behavior with the plugin. 

 > FYI: This plugin is completely ignored by multibranch.

Is a GitHub Organization multibranch? 

Regarding the custom notification context, is this what you are referring to? <a href="https://issues.jenkins-ci.org/browse/JENKINS-36574" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-36574\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGt4T_uh_DZ2irpveuo9FmwXrUHMQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-36574\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGt4T_uh_DZ2irpveuo9FmwXrUHMQ&#39;;return true;">https://issues.jenkins-ci.org/browse/JENKINS-36574

Thanks for the quick reply!

--
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/1365ea2f-3b57-4335-8c0b-7bdb2d13ba0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Two separate GitHub Organizations used with same GitHub Branch Source Plugin configuration results in only one job getting triggered per PR

Ian Vernon
I'll hold off until it is released to the plugin center before downloading it.

>  If github receives a duplicate context label it just replaces the existing one, so this is helpful if you are doing more than one kind of build for a repo.

That explains it! That's so frustrating :( . Thanks for your help!


On Thursday, January 4, 2018 at 11:24:39 AM UTC-8, Steven Foster wrote:
Here is the repo for the custom github context plugin <a href="https://github.com/steven-foster/github-scm-trait-notification-context" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fsteven-foster%2Fgithub-scm-trait-notification-context\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHbH3KIxBPnCOpVocbBy5ojoIzDMA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fsteven-foster%2Fgithub-scm-trait-notification-context\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHbH3KIxBPnCOpVocbBy5ojoIzDMA&#39;;return true;">https://github.com/steven-foster/github-scm-trait-notification-context
I still need to actually release it to the plugin center, hopefully that's not too arduous.

It lets you specify a context label for a multibranch project's github notifications. If github receives a duplicate context label it just replaces the existing one, so this is helpful if you are doing more than one kind of build for a repo.

On Thursday, January 4, 2018 at 7:07:01 PM UTC, Ian Vernon wrote:
> What do you mean “appears on GitHub”? Do you mean as a second status check mark?
Yes, that is correct. Only one check mark appears despite there being two GitHub Organizations set up. If I change the aforementioned settings, two check marks appear on GitHub, but I want to have the same behavior with the plugin. 

 > FYI: This plugin is completely ignored by multibranch.

Is a GitHub Organization multibranch? 

Regarding the custom notification context, is this what you are referring to? <a href="https://issues.jenkins-ci.org/browse/JENKINS-36574" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-36574\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGt4T_uh_DZ2irpveuo9FmwXrUHMQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-36574\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGt4T_uh_DZ2irpveuo9FmwXrUHMQ&#39;;return true;">https://issues.jenkins-ci.org/browse/JENKINS-36574

Thanks for the quick reply!

--
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/666ca13d-b037-431d-893f-86084d364548%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Two separate GitHub Organizations used with same GitHub Branch Source Plugin configuration results in only one job getting triggered per PR

Steven Foster
finally figured out the release process so hopefully the custom notification plugin should be available soon

On Friday, January 5, 2018 at 12:19:50 AM UTC, Ian Vernon wrote:
I'll hold off until it is released to the plugin center before downloading it.

>  If github receives a duplicate context label it just replaces the existing one, so this is helpful if you are doing more than one kind of build for a repo.

That explains it! That's so frustrating :( . Thanks for your help!


On Thursday, January 4, 2018 at 11:24:39 AM UTC-8, Steven Foster wrote:
Here is the repo for the custom github context plugin <a href="https://github.com/steven-foster/github-scm-trait-notification-context" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fsteven-foster%2Fgithub-scm-trait-notification-context\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHbH3KIxBPnCOpVocbBy5ojoIzDMA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fsteven-foster%2Fgithub-scm-trait-notification-context\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHbH3KIxBPnCOpVocbBy5ojoIzDMA&#39;;return true;">https://github.com/steven-foster/github-scm-trait-notification-context
I still need to actually release it to the plugin center, hopefully that's not too arduous.

It lets you specify a context label for a multibranch project's github notifications. If github receives a duplicate context label it just replaces the existing one, so this is helpful if you are doing more than one kind of build for a repo.

On Thursday, January 4, 2018 at 7:07:01 PM UTC, Ian Vernon wrote:
> What do you mean “appears on GitHub”? Do you mean as a second status check mark?
Yes, that is correct. Only one check mark appears despite there being two GitHub Organizations set up. If I change the aforementioned settings, two check marks appear on GitHub, but I want to have the same behavior with the plugin. 

 > FYI: This plugin is completely ignored by multibranch.

Is a GitHub Organization multibranch? 

Regarding the custom notification context, is this what you are referring to? <a href="https://issues.jenkins-ci.org/browse/JENKINS-36574" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-36574\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGt4T_uh_DZ2irpveuo9FmwXrUHMQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-36574\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGt4T_uh_DZ2irpveuo9FmwXrUHMQ&#39;;return true;">https://issues.jenkins-ci.org/browse/JENKINS-36574

Thanks for the quick reply!

--
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/7e1b737e-9b51-4618-b4f7-6717940d53bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Two separate GitHub Organizations used with same GitHub Branch Source Plugin configuration results in only one job getting triggered per PR

Anthony Lamping
Any chance this will be made to be used from a scripted pipeline?

On Thursday, January 11, 2018 at 6:25:15 PM UTC-5, Steven Foster wrote:
finally figured out the release process so hopefully the custom notification plugin should be available soon

On Friday, January 5, 2018 at 12:19:50 AM UTC, Ian Vernon wrote:
I'll hold off until it is released to the plugin center before downloading it.

>  If github receives a duplicate context label it just replaces the existing one, so this is helpful if you are doing more than one kind of build for a repo.

That explains it! That's so frustrating :( . Thanks for your help!


On Thursday, January 4, 2018 at 11:24:39 AM UTC-8, Steven Foster wrote:
Here is the repo for the custom github context plugin <a href="https://github.com/steven-foster/github-scm-trait-notification-context" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fsteven-foster%2Fgithub-scm-trait-notification-context\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHbH3KIxBPnCOpVocbBy5ojoIzDMA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fsteven-foster%2Fgithub-scm-trait-notification-context\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHbH3KIxBPnCOpVocbBy5ojoIzDMA&#39;;return true;">https://github.com/steven-foster/github-scm-trait-notification-context
I still need to actually release it to the plugin center, hopefully that's not too arduous.

It lets you specify a context label for a multibranch project's github notifications. If github receives a duplicate context label it just replaces the existing one, so this is helpful if you are doing more than one kind of build for a repo.

On Thursday, January 4, 2018 at 7:07:01 PM UTC, Ian Vernon wrote:
> What do you mean “appears on GitHub”? Do you mean as a second status check mark?
Yes, that is correct. Only one check mark appears despite there being two GitHub Organizations set up. If I change the aforementioned settings, two check marks appear on GitHub, but I want to have the same behavior with the plugin. 

 > FYI: This plugin is completely ignored by multibranch.

Is a GitHub Organization multibranch? 

Regarding the custom notification context, is this what you are referring to? <a href="https://issues.jenkins-ci.org/browse/JENKINS-36574" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-36574\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGt4T_uh_DZ2irpveuo9FmwXrUHMQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-36574\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGt4T_uh_DZ2irpveuo9FmwXrUHMQ&#39;;return true;">https://issues.jenkins-ci.org/browse/JENKINS-36574

Thanks for the quick reply!

--
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/74fa848b-c7da-46c1-86eb-39c0f4dc6b9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.