-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
builds when changes made to PR and a list of branches #154
Comments
It's git plugin and jenkins design, or probably ghprb. You can't use PR job for regular builds. |
So I can't have both ghprb and github-plugin running together? |
Atm, yes |
You would need to add another trigger to the job. The ghprb trigger is only going to run on plugins, then the source poll trigger could run on changes to your branches. |
@DavidTanner At the moment, I've got GitHub Pull Request Builder and Build when a change is pushed to GitHub triggers enabled, would this be sufficient? If not, what other triggers can I use to do what I want to do? |
Simply generate multiple jobs with different trigger versions automatically using jenkinsci/job-dsl-plugin. Create a job template and only change triggers, branch designators and publishers. You also want to make sure not to publish artifacts in PR jobs vs artifacts from stable branches. |
As @arcivanov mentioned, this plugin is designed for pull requests, and what you're asking for--while totally reasonable--is simply out of scope. I'm going to close this for now. |
With git webhook configured , How do I build a job for specific branch when someone made a push to it. I have enabled trigger when pushed code to github. Right now all jenkins jobs are triggered even though it was pushed for a different branch. |
@guruvamsichintala you should be able to whitelist branches on the job configuration. However, if you have multiple jobs, you'd need to set that configuration in each job. HTH |
I have already specified branch name in "Branches to be build" option. But still when I push code to any branch , all the jobs which are configured for specific branch and triggered when something pushed to git are running. I figured it out with Configured git plugin inside git, specified the url inside plugin and configured job with poll scm (no schedule). Worked perfectly |
What configuration would I need in order for changes to PR and a list of branches to trigger builds?
Currently I've got +refs/heads/:refs/remotes/origin/ +refs/pull/:refs/remotes/origin/pr/ in the Refspec and ${sha1} in the Branches to build.
It builds when changes to PR are made, however builds not triggered when changes to eg master branch are made
The text was updated successfully, but these errors were encountered: