How do I clone a job in Jenkins?
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:
- Click on 'New Item' link
- Give a new name for your job
- Select radio button 'Copy existing Item'
- Give the job name that you want to clone
- Click 'OK'
Finally, you have your new job, which reflects all features of your cloned one.
Jenkins 2.9
-
Jenkins > New Item
-
Enter an item name - E.g. "MY_CLONE"
-
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.
Click on Save if you want to keep the default values.
-
Now both jobs are available in the same location:
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