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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: copyartifact-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.625.3.1
      Copy Artifact Plugin 1.37
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            allan_burdajewicz Allan BURDAJEWICZ created issue -
            allan_burdajewicz Allan BURDAJEWICZ made changes -
            Field Original Value New Value
            Description 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:

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

            The method doCheck in the BuildTrigger 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.
            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:

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

            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 made changes -
            Assignee Allan BURDAJEWICZ [ allan_burdajewicz ]
            allan_burdajewicz Allan BURDAJEWICZ made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            allan_burdajewicz Allan BURDAJEWICZ made changes -
            Remote Link This issue links to "PR 79 (Web Link)" [ 14036 ]
            jglick Jesse Glick made changes -
            Summary Error 500 using Copy artifact from Another Project in Promotion process of a template NPE from CopyArtifact$DescriptorImpl.doCheckProjectName when using Copy artifact from Another Project in Promotion process of a template
            jglick Jesse Glick made changes -
            Link This issue is blocking JENKINS-33578 [ JENKINS-33578 ]
            scm_issue_link SCM/JIRA link daemon made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            ikedam ikedam made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 168169 ] JNJira + In-Review [ 209630 ]

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: