Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I clone a job in Jenkins?

People also ask

How do I copy Jenkins jobs from one Jenkins to another?

According to the manual, https://wiki.jenkins-ci.org/display/JENKINS/Administering+Jenkins, it's simply to move the corresponding job directory to the new Jenkins instance. The "Copy existing Job" option requires the job to exist on the current Jenkins instance. It's an option to use the existing job as a template.

How do I copy multiple jobs in Jenkins?

use "view-clone" plugin. With view clone you can clone all the projects in a view and replace a string with a string you want. Check this link:https://wiki.jenkins-ci.org/display/JENKINS/View+Cloner+Plugin.For me the cloning part is working but the create view part is failing.


To copy an existing job, go to http://your-jenkins/newJob and use the "Copy existing job" option. Enter the name of the existing job - Jenkins will verify whether it exists.

The default tab on the front page of Jenkins should list all existing jobs, but maybe your predecessor deleted the tab. You can create a new tab listing all jobs from http://your-jenkins/newView.


You can clone a job:

  1. Click on 'New Item' link
  2. Give a new name for your job
  3. Select radio button 'Copy existing Item'
  4. Give the job name that you want to clone
  5. Click 'OK'

Finally, you have your new job, which reflects all features of your cloned one.


Jenkins 2.9

  1. Jenkins > New Item

    Jenkins New Item

  2. Enter an item name - E.g. "MY_CLONE"

    Enter an item name

  3. Specify the source (Copy from) job > OK

    When you start typing the name, the existing values will be found. Notice that this is case sensitive.

    Copy from OK

  4. Click on Save if you want to keep the default values.

  5. Now both jobs are available in the same location:

    View jobs


New Item>Project Name = abc > Instead of Freestyle job, select Copy from job name of already existing jobs

If you are inside the folder that you want to copy out of the directory then use ../.


if you want to copy in same Jenkins but in different subfolders, create new item -> use copy from. new Job will be cloned in same directory. Then use move option to move it in desired directory