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

Snippetizer broken for DownstreamBuildSelector with Jenkins Pipeline

      Copy artifact is throwing a NPE when pointing at Jenkins Pipelines in the Jenkins Pipeline snippet generator when creating a copy artifact step using the DownstreamBuildSelector:

      Caused by: java.lang.NullPointerException
      	at hudson.plugins.copyartifact.DownstreamBuildSelector$DescriptorImpl.doCheckUpstreamProjectName(DownstreamBuildSelector.java:198)
      	at sun.reflect.GeneratedMethodAccessor1349.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      

          [JENKINS-33578] Snippetizer broken for DownstreamBuildSelector with Jenkins Pipeline

          Andy Pemberton created issue -
          Jesse Glick made changes -
          Remote Link New: This issue links to "fix suggestion (Web Link)" [ 14077 ]

          Jesse Glick added a comment -

          JENKINS-32526 would fix the error, without making the validation actually work.

          Jesse Glick added a comment - JENKINS-32526 would fix the error, without making the validation actually work.
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-32526 [ JENKINS-32526 ]
          Jesse Glick made changes -
          Labels New: workflow
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-33577 [ JENKINS-33577 ]
          ikedam made changes -
          Assignee New: ikedam [ ikedam ]

          ikedam added a comment -

          JENKINS-32526 fixed the error, but it warns "Not Found" when you specified pipeline jobs for the upstream project.

          I found that DownstreamBuildSelector cannot pick builds related to pipeline jobs, as it depends on AbstractBuild#getUpstreamRelationshipBuild to detect relationships, which can be applicable only to `AbstractProject`.

          I'll add a change to display to warn that DownstreamBuildSelector is applicable only to AbstractProject for now.

          ikedam added a comment - JENKINS-32526 fixed the error, but it warns "Not Found" when you specified pipeline jobs for the upstream project. I found that DownstreamBuildSelector cannot pick builds related to pipeline jobs, as it depends on AbstractBuild#getUpstreamRelationshipBuild to detect relationships, which can be applicable only to `AbstractProject`. I'll add a change to display to warn that DownstreamBuildSelector is applicable only to AbstractProject for now.

          ikedam added a comment -

          ikedam added a comment - https://github.com/jenkinsci/copyartifact-plugin/pull/84
          ikedam made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

            ikedam ikedam
            apemberton Andy Pemberton
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: