Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-48342

A pipeline job with mercurial scm can't be properly copied

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Repro steps:

      1. Create a new pipeline job (I'll use "MyPipeline" in these steps)
      2. Configure the pipeline with
        • Definition: "Pipeline script from SCM"
        • SCM: "Mercurial"
        • Repository URL: "http://selenic.com/hg"
        • (Leave everything else with the default values)
      3. Use the Jenkins CLI to copy the pipeline job:
        1. java -jar /var/jenkins_home/war/WEB-INF/jenkins-cli.jar -s http://localhost:8080/ -http -auth admin:ADMIN_TOKEN_HERE copy-job MyPipeline MyPipelineCopy
      4. Browse to the configuration page for the new job "MyPipelineCopy" and see the SCM configuration is not present

      Expected

      The Mercurial SCM configuration copied when doing a copy-job with the Jenkins CLI

      Actual

      The Mercurial SCM configuration does not get copied

      Notes and observations

      I've tried other approaches with and without the CLI, also broken:

      • Use the CLI command get-job to save off the xml for a job, then do a create-job with that xml
      • Use the web UI to do a copy (on the "new job" page, use the "Copy from" field)

      Interestingly, doing a get-job, create-job, then a get-job on the new copy does show the SCM configuration in the xml. The configuration page still does not show that configuration.

      Being able to configure Jenkins programmatically is very important to us. I don't see a workaround for this issue, so I selected 'Major' for the priority.

        Attachments

          Activity

          tmeyer Tom Meyer created issue -
          tmeyer Tom Meyer made changes -
          Field Original Value New Value
          Component/s workflow-cps-plugin [ 21713 ]
          tmeyer Tom Meyer made changes -
          Component/s workflow-job-plugin [ 21716 ]
          jamesdumay James Dumay made changes -
          Labels cb-hide
          vivek Vivek Pandey made changes -
          Labels cb-hide cb-hide triaged-2018-11

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            tmeyer Tom Meyer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: