How do I configure Hudson/Jenkins (we're still using Hudson) to build all branches with the mercurial plugin? I have seen that we can create separate jobs/etc for specific branches, but we branch often enough that it would be good to just build all branches.
The only way I can think of (and I haven't tried it) is to have our build script [executed by Hudson on the slave] somehow figure out which branch is the latest commit and then hg update -r itself, rather than the mercurial plugin doing it.
I would love to find out a more elegant/correct way to do this!
I've also been looking for this support in the Jenkins Mercurial plugin (partly because it's supported by its Git plugin) but the following Jenkins tickets seem to indicate that this is yet not implemented:
One option if you have branches that are used regularly (ie, named branches for milestones or developers) is to create copies of your master build and simply point it to that branch.
For example on my team's build server we have production ('default' branch) and development ('dev' branch). Our builds are run by feeding the branch name as a parameter to the build script (so it's a simple, one-field change from a copy of the main job).
Obviously this won't scale beyond a handful of branches, but it might be enough for your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With