Copying and Editing Jenkins Jobs -


i have been using jenkins couple of months now, , have been able set simple ci system. have build tab - build , deploy 25 different components successfully, based on building svn trunk.

i'm taking first branch - people develop on trunk , develop fixes on branch.

i have ci , running both branch , trunk - create second tab - repeat of jobs first tab, time changing svn path check out branch.

as have rather lot of jobs , task quite repetitive, there easy way ? i'm hoping each job tab might single xml can edit / rename give me second tab ?

yes, each job is single xml file, located under $jenkins_home/jobs/$job_name/config.xml. there number of places in config.xml reference it's location, copy-pasting actual file isn't best option.

jenkins ui has "copy job" function.

  • click "new item" want it
  • select "copy existing item"
  • specify name of existing item copy
  • specify name new job
  • then go configure new job , change need.

another tip: may not apply setup, more not, there "unifying difference" between multiple similar jobs, branch name, or project name, or similar. value 1 needs change between otherwise identical jobs, changed value may appear several times within job configuration.

i make "choice" parameter, single choice, , put different value there. rest of job references choice param variable. when copy identical jobs, need change 1 value @ top of job configuration page. else falls place.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -