How do I clone a job in Jenkins?

前端 未结 12 609
孤城傲影
孤城傲影 2020-12-07 09:40

Jenkins has the Gerrit Plugin in place so that when we do check-ins to Gerrit, Jenkins performs a build and if it succeed

相关标签:
12条回答
  • 2020-12-07 10:03

    Create a new Item and go to the last you'll find option to copy from existing, just write your current job name and you will have clone of that project to work with.

    0 讨论(0)
  • 2020-12-07 10:04

    All above answers are good. But if you have created "folders" for your jobs, things are slightly different.

    Click on the folder under which you want to create a new job. Then click "New Item" on the left menu. Now your "new job" URL will look like this (assuming you are creating the new job under "my-folder"):

    http://my-jenkins:8080/job/my-folder/newJob

    Under Enter an item name, enter your desired new job name. Then use the Copy from text box at the bottom. Enter job path of he source job.

    E.g. If your source job is under folder src-folder and name of the job is src-job, you will have to enter src-folder/src-job in "Copy from" box.

    Hope it helps.

    0 讨论(0)
  • 2020-12-07 10:04

    You can also use the Copy project link plugin.

    This will add a link on the left side panel of your project:

    enter image description here

    Following screen will ask for the new Job name:

    enter image description here

    0 讨论(0)
  • 2020-12-07 10:05

    I was not able to copy Jenkins job from subfolder. copy from option did not show the suggestion which i was looking for.Without using suggestion copying the job name didn't work.

    So if you want to create a job from outer folder, you need to first create the job in subfolder and then move it in different folder where you need to place it.

    0 讨论(0)
  • 2020-12-07 10:15

    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.

    0 讨论(0)
  • 2020-12-07 10:18

    Jenkins 2.9

    1. Jenkins > New Item

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

    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.

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

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

    0 讨论(0)
提交回复
热议问题