How do I clone a job in jenkins?
Jenkins has the Gerrit Plugin in place so that when we do checkins to gerrit, Jenkins performs a build and if it succeeds, then the modification in gerrit is verified. If the build fails then it is not. My understanding is that this is accomplished through jobs set up in Jenkins. We have now created a new branch (git) and I guess I need to clone the existing jobs pointing to the other branch so that this same workflow occurs and builds are performed on every commit. Can somebody explain how I would clone these jobs. I don't seem to see a way to do it through the UI nor can I even see a way to list the jobs out through the UI.
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:
Finally, you have your new job, which reflects all features of your cloned one.
Jenkins 2.9
Jenkins > New Item
Enter an item name - Eg "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:
上一篇: 如何在Jenkins中将现有工作从一个视图移到另一个视图?
下一篇: 我如何克隆詹金斯的工作?