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

NPE from CopyArtifact$DescriptorImpl.doCheckProjectName when using Copy artifact from Another Project in Promotion process of a template

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • copyartifact-plugin
    • None
    • Jenkins 1.625.3.1
      Copy Artifact Plugin 1.37

      When adding a "Copy Artifact from another project" step in the promotion process in a Job Template, the server raises a NullPointerException when processing the following request:

      http://localhost:8083/job/test-template/descriptorByName/hudson.plugins.copyartifact.CopyArtifact/checkProjectName?value=
      

      The method doCheckProjectName in the CopyArtifact assume that the @AncestorInPath is not null which is a bug.

      Source code here: https://github.com/jenkinsci/copyartifact-plugin/blob/b17cbb4036e9045472cbb1b35c4b8e7ef712f375/src/main/java/hudson/plugins/copyartifact/CopyArtifact.java#L582

      How to reproduce:

      • Create a Job Template "test-job" at the root
      • Tick "Define Promotion Process"
      • "Copy Artifact from another project" action
      • An ERROR link appears

      Note: This issue does not block the functionality and this error can be ignored. Specifying an existing project and saving the configuration will make this error disappears.

            allan_burdajewicz Allan BURDAJEWICZ
            allan_burdajewicz Allan BURDAJEWICZ
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: