问题
I am using Jenkins CI for automatic builds of my project version 2.9. Now I have to build 2.10 also. How do I setup 2.10 on Jenkins? Because the repository will be the same for 2.9 the build failed.
How to deal with that problem?
回答1:
You could either have two different build configurations for the different versions, if you plan to have both versions running alongside for some time, and need continuous builds for both branches, or configure the build with a parameter, if you only want Jenkins to do the deployment file.
回答2:
It is so easy to use "Copy existing job" option, but separate build configurations for similar builds will drive you crazy eventually. Let's imagine you need to tweak a configuration a little bit. Will it be OK for you to do it for 2 jobs, 5 jobs, 10?
Proper solution
If you want to have several separate jobs with similar configuration -- create a template job. Template Workflows Plugin will do the trick for you. It allows to create a template with some parameters and generate several jobs on the top of it, specifying certain values. Template changes will affect all subordinate jobs.
Template parameters example

Concrete job creation

Same rule as for development: do not use COPY&PASTE
来源:https://stackoverflow.com/questions/14155256/how-to-use-jenkins-to-build-multiple-version-of-branches-on-master-server