Software Development

What is the easiest way to clone or duplicate an existing Jenkins job configuration for a new project?

RE Asked by Rebecca Thompson · 12-05-2025
0 upvotes 13,541 views 0 comments
The question

I need to create a new build pipeline that is almost identical to an existing one, but I want to avoid configuring all the build steps, environment variables, and Git triggers from scratch. Is there a "Clone" button I’m missing in the Jenkins UI, or do I have to use a specific plugin or the "New Item" copy feature? Also, if I clone a job, does it automatically copy over the build history and old artifacts, or just the configuration settings?

3 answers

0
SA
Answered on 14-07-2025

The most straightforward way to clone a job is via the Jenkins Dashboard. Click on 'New Item', enter your new job name, and at the bottom of the page, you will see a field labeled 'Copy from'. Type the name of your existing job there, and Jenkins will autocomplete it. This creates a new job with an identical configuration, including build steps and post-build actions. However, please note that this only copies the configuration (the config.xml file). It does not copy the build history, workspace data, or previous artifacts from the source job. If you need to move those as well, you would need to manually copy the job directory on the Jenkins controller's file system and restart the server.

0
KE
Answered on 28-08-2025

Does using the 'Copy from' feature also duplicate the specific credentials and API tokens used in the original job, or do those need to be re-selected manually in the new project configuration?

DA 30-08-2025

Kevin, the 'Copy from' feature duplicates the reference to the credentials (the ID), so as long as the credentials are stored at the Global or Folder level that both jobs can access, they will work immediately. However, if the original job used "Secret Text" or "Passwords" hardcoded directly into the build steps (which isn't best practice), those will be copied exactly as they are. It’s always a good idea to verify the 'Credentials' dropdown in the new job just to ensure the scope hasn't changed.

0
LI
Answered on 15-10-2025

If you find yourself cloning jobs frequently, you should look into the "Job Config History" plugin or start using Jenkins Pipeline (Jenkinsfile). Using code-based pipelines makes "cloning" as simple as copying a text file.

RE 20-10-2025

I agree with Linda. I moved our team to Jenkinsfiles stored in Git last year. Now, instead of clicking through the UI to clone jobs, we just point a new 'Multibranch Pipeline' to a new repo branch. It's much more scalable for an SEO specialist's workflow!

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session