We have a similar setup and what we did to generate a new set of jobs for a new branch was to create another Jenkins job that used the Jenkins client api to create new jobs and modify the configuration of each job to change the branch name. You can access the configuration as XML and modify it with sed or some other tool and then post the config back to save it. This works really well. We ended up doing more things in this job as well that we normally manually do for a new branch like update the maven pom versions, reset a modified since timestamp for incremental database builds, and others. On May 2, 2013 4:53 AM, "Thomas Sondergaard" <[email protected]> wrote:
> Hi, > > We have a project setup where several git branches have the same suite of > jenkins jobs. Each branch has > > * <productname>-<branch-name>-**integrate > * <productname>-<branch-name>-**all-tests > * <productname>-<branch-name>-**packages > > The "integrate" job is configured to build when a developer pushes a > commit and is used to implement "pre-verified commits". "all-tests" run all > our auto tests including slow unit and integration tests, which are > excluded from the "integrate" job. The "packages" job builds release > artifacts - in our case rpm-packages for Linux and msi installers for > Windows. > > These jobs are very similar. The only real difference is branch-name and > version number information. Today we create these jobs by copying them > manually and modifying them. > > I'd like to have all the stuff that needs to be changed per branch listed > as variables, so they are easy to update when cloning jobs. I've found that > only the variables defined as build parameters in parameterized jobs are > available to the promoted build scripts, and I would therefore like to know > if it is possible to create build parameters that are hidden, so the user > will not be confronted with them, when starting a build manually. > > Why are the "Prepare an environment for the run" variables not available > to the build promotion tasks? If they were that would be a good alternative > for me. > > Regards, > Thomas > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to > jenkinsci-users+unsubscribe@**googlegroups.com<jenkinsci-users%[email protected]> > . > For more options, visit > https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> > . > > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
