ghprb
ghprb copied to clipboard
One Pull Request to Trigger Multiple Jobs
I'd like to have one pull request initiate two separate jobs in Jenkins. I've configured the builds and when only one of the two is enabled, it builds, but once I enable both, only one will build.
Running plugin version 1.9 due to the Enterprise rate limit issue #127 Jenkins version 1.532.2.3 Github Enterprise
Thanks.
I also have the same demand:one pull request initiate some separate jobs in Jenkins all of the jobs can work But only one of the results is showed in GitHub, which I want to show all the results, How to do ?
Jenkins version 1.557 Github Enterprise
@WuLonghui all the results are there, it's just the GitHub UI only shows the latest. The APIs will have all of them updates.
@samreisner Can you re-try this with the latest version?
I'm having the same issue with 1.16-8 (and jenkins 1.602). I have 2 jobs configured to run for pull requests, but only one of them gets triggered.
It seems to be working now, I have multiple jobs running for each pull request (just remember to change the "Commit Status Context" to have multiple statuses in Github)
I'm still running into this issue (Jenkins ver. 1.638, GHPRB 1.30.4).
I have two jobs configured (and now using different commit status context), but only one of them gets triggered. The other job doesn't build at all...
@mathroc - how did you get yours working?
Does anyone know of any workarounds?
@jameschao I've not done much, I just duplicated an existing job, changed the commit status context and change the build steps to some other tests and it worked. I have a up to 5 jobs on some projects for each PR; each one is always triggered and status is set on github for each one
@mathroc - yeah, I was able to get it working through duplicating the jobs. But when I created a new job it didn't work. I haven't played with it since my original message so not sure if it's all good now.
For us also only one job is selected randomly. (Jenkins 1.651.2, ghprb 1.31.4)
I tested ghprb 1.33.1 on Jenkins 1.651.3 today and hit the same issue. The first job I set up with one GitHub status context runs correctly, but other jobs (both copied from the first) don't launch new jobs.
FINEST level logging on ghprb shows this during polling (no webhooks being used):
Aug 22, 2016 8:03:01 AM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR Pull request #5 was updated/initialized on domcleal/test at 8/22/16 8:02 AM by Dominic Cleal (PR update) Aug 22, 2016 8:03:01 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Checking for comments after: 8/22/16 7:42 AM Aug 22, 2016 8:03:02 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Comment was made at: 8/22/16 6:58 AM Aug 22, 2016 8:03:02 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Comment was made at: 8/22/16 7:37 AM Aug 22, 2016 8:03:02 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Comment was made at: 8/22/16 7:38 AM Aug 22, 2016 8:03:02 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Comment was made at: 8/22/16 7:42 AM Aug 22, 2016 8:03:02 AM FINE org.jenkinsci.plugins.ghprb.GhprbPullRequest New commit. Sha: Head[87cbb5c08a7eaad2bdfb16a884bae19accd22f1e => 48de577620611beb56a37ae1cd066e53945d3ec1] Base[7068bf6ea156c84b26dc19df0ceea55b784c9e35 => 7068bf6ea156c84b26dc19df0ceea55b784c9e35] Aug 22, 2016 8:03:02 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Running the build Aug 22, 2016 8:03:02 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest PR is not null, checking if mergable Aug 22, 2016 8:03:02 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Running build... Aug 22, 2016 8:03:03 AM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR Pull request #5 was updated/initialized on domcleal/test at 8/22/16 8:02 AM by Dominic Cleal (PR update) Aug 22, 2016 8:03:03 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Checking for comments after: 8/22/16 7:42 AM Aug 22, 2016 8:03:03 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Comment was made at: 8/22/16 6:58 AM Aug 22, 2016 8:03:03 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Comment was made at: 8/22/16 7:37 AM Aug 22, 2016 8:03:03 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Comment was made at: 8/22/16 7:38 AM Aug 22, 2016 8:03:03 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Comment was made at: 8/22/16 7:42 AM Aug 22, 2016 8:03:03 AM FINE org.jenkinsci.plugins.ghprb.GhprbPullRequest New commit. Sha: Head[87cbb5c08a7eaad2bdfb16a884bae19accd22f1e => 48de577620611beb56a37ae1cd066e53945d3ec1] Base[7068bf6ea156c84b26dc19df0ceea55b784c9e35 => 7068bf6ea156c84b26dc19df0ceea55b784c9e35] Aug 22, 2016 8:03:04 AM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR Pull request #5 was updated/initialized on domcleal/test at 8/22/16 8:02 AM by Dominic Cleal (PR update) Aug 22, 2016 8:03:04 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Checking for comments after: 8/22/16 7:42 AM Aug 22, 2016 8:03:04 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Comment was made at: 8/22/16 6:58 AM Aug 22, 2016 8:03:04 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Comment was made at: 8/22/16 7:37 AM Aug 22, 2016 8:03:04 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Comment was made at: 8/22/16 7:38 AM Aug 22, 2016 8:03:04 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest Comment was made at: 8/22/16 7:42 AM Aug 22, 2016 8:03:04 AM FINE org.jenkinsci.plugins.ghprb.GhprbPullRequest New commit. Sha: Head[87cbb5c08a7eaad2bdfb16a884bae19accd22f1e => 48de577620611beb56a37ae1cd066e53945d3ec1] Base[7068bf6ea156c84b26dc19df0ceea55b784c9e35 => 7068bf6ea156c84b26dc19df0ceea55b784c9e35] Aug 22, 2016 8:04:01 AM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR Pull request #5 was updated on repo domcleal/test but there aren't any new comments nor commits; that may mean that commit status was updated. [..]
All notifications happen three times which indicates that it's monitoring for all three jobs, though after noting that the PR has updated, only the first seems to actually run the linked job. There don't seem to be any log messages indicating why the other jobs aren't started.
Seems that enabling web hooks works more reliably than polling. With the exception of one job that still isn't running automatically, all of my others are being run when a webhook is received for a single PR.
I'm also running into this issue.
Can anyone explain how they achieved getting multiple Jenkins jobs triggered for one PR with this plugin? The documentation is somewhat opaque.
I'm also running into this issue.
@ianvernon - the only way I've gotten this to work is to trigger only 1 job that then explicitly runs the other jobs. It's not the best, but it gets the job done.
How to make this work:
In the job configuration, go to:
Build Triggers -> GitHub Pull Request Builder -> Trigger Setup...
Change Commit Status Context
to be unique for each job.