Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
483 views
in Technique[技术] by (71.8m points)

configuration - Configure or Create hudson job automatically

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can try the Hudson Remote API for this kind of task (setting up an Hudson project).

See this tutorial for instance, and remember you can display the help quite easily:

java -jar hudson-cli.jar -s http://your_Hudson_server/ help

alt text

So, to copy a job:

java -jar hudson-cli.jar -s http://your_Hudson_server/ copy-job myjob copy-myjob

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...