jenkinsci / ghprb-plugin

github pull requests builder plugin for Jenkins
https://plugins.jenkins.io/ghprb/
MIT License
501 stars 607 forks source link

Pull request triggering multiple jobs results in duplicate testing phrases #483

Open martinmine opened 7 years ago

martinmine commented 7 years ago

Having multiple jobs triggered using the GitHub pull request builder results in the plugin posting duplicate testing phrases on the pull request. Is there a config flag to avoid this or is it a bug?

benpatterson commented 7 years ago

Could you describe what the jobs you have are intended for today? Indeed multiple jobs can allow someone to provide multi-tiered feedback, and there are config options that may be at your disposal depending on what you want to do.

martinmine commented 7 years ago

The two jobs are matrix projects that checks out source code from a few repos then builds it through a bash script. The configuration of them are identical except a few parameters to them which are different. Both of them are freestyle projects. Not sure if this answers your question correctly for what they are intended for?

benpatterson commented 7 years ago

​That helps. If the same job posted to separate context names (e.g., multiple green checkmarks on the pull request), would that work for you? Just want a bit more detail I suppose.

The answer though, is that you can configure different test phrases on the two jobs. That's how my company does it. There is the global config/phrase, and that kicks off all contexts, but per-job you can start with different phrases.

martinmine commented 7 years ago

If the same job posted to separate context names (e.g., multiple green checkmarks on the pull request), would that work for you?

From what I know, GitHub only allows one commit status per PR/commit. I simply want to avoid the bot to post duplicating messages (request for testing phrase) to the PR. Would it be possible to have one job associated with the PR trigger another job, then post back the result of the job to GitHub?

swills commented 6 years ago

I have this issue too. I have multiple jobs setup to build PRs for a github project, the only difference between the jobs is which slave they run on, and I end up with multiple "Can one of the admins verify this patch?" comments on the PR. I tried changing to a multi-configuration project but then ghprb isn't triggered by the "ok to test" comment.