Trigger multiple Jenkins builds with GitHub Pull Request Builder

雨燕双飞 提交于 2021-01-28 04:34:13

问题


Currently, I have a Jenkins job setup so that when a pull request is opened for my repository, a Jenkins job is automatically created via the GitHub Pull Request Builder Plugin.

I would like to be able to trigger multiple Jenkins jobs when a PR is opened in my GitHub repository and have the GitHub Pull Request Builder report the status back to the PR. Is this achievable via the GitHub Pull Request Builder plugin or are there other plugins available for this? My research has me coming up empty-handed.


回答1:


You can have a Jenkins job for each PR Check, like so:

Each one of those jenkins jobs is using the Git Hub Pull Request Builder. Just make sure to configure it with a unique name, and you should be good to go:




回答2:


I finally figured out how to do this, and realized I did not provide enough context in my initial question. Specifically, I am configuring my Jenkins job as part of a GitHub Organization. A single GitHub Organization only supports one Jenkinsfile; one cannot configure the same organization to use two separate Jenkinsfile. So, I imported the same GitHub Organization in my Jenkins instance and configured it to use the other Jenkinsfile. This results in multiple jobs appearing above as you have it configured.



来源:https://stackoverflow.com/questions/47545727/trigger-multiple-jenkins-builds-with-github-pull-request-builder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!