Configure or Create hudson job automatically

Viewed 31472

Is there any way to create new Hudson job by one more Hudson job based one previous Jobs?

For example if I need to create new bunch of jobs one by one, Automatically create 4 jobs with similar configuration with different parameter

Basically steps like this

  1. create SVN branch I can call svn cp command and make it parametrized using script
  2. Create some build based on new svnbranch name
  3. Later tag it

Or other word, I need to clone the previous job and give the new branch name where ever $ Branch comes in new job.

Thanks

7 Answers

In case you're willing to use GIT (like I do, mirroring the main SVN repo, onto the Hudson/Jenkins server, and it works great).... ..you could try Stephen Haberman's post-receive-hudson:

This hook creates new jobs for each branch in the Hudson continuous integration tool. Besides creating the job if needed, the user who pushed is added to the job's email list if they were not already there.

In any case, that script can give you new hints on how to remote control Jenkins(Hudson).

Related