Closed midN closed 5 years ago
@midN can you please provide a sample Jenkinsfile
that reproduces the problem?
@aaronjwhiteside Any Jenkinsfile will work, just make 2 separate jobs in Jenkins under same repo/webhook.
Webhook will fire both jobs in Jenkins, this plugin will fire first one it finds by the key - https://github.com/jenkinsci/pipeline-github-plugin/blob/a85845d0246aeb3c6d33620db59988a75cc927d6/src/main/java/org/jenkinsci/plugins/pipeline/github/trigger/GitHubEventSubscriber.java#L114
So I'm having a little trouble following what you're doing to get this behaviour, do you have two github oranization jobs configured pointing to the same org, and thus two instances of the same job?
@aaronjwhiteside
Enable that and your PR will fire 2 jobs, one for HEAD and one for MERGE. Now when you add a PR Trigger from given plugin and comment/fire it, it will run a random job chosen amongst HEAD and MERGE. If your job has a specific features to be ran in HEAD or MERGE, you will need to spam that Trigger until it randomly select the job you need to.
@midN thanks for reporting the issue, it should be fixed in the next release!
2.4 has been released
@aaronjwhiteside thanks!
Are there any plans to support multiple related jobs or jobs that initiate separate build for HEAD and MERGE?
Currently this plugin chooses a random Job and triggers only one.