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

Artifactory buildInfo.env.collect() Throws Null Pointer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • artifactory-plugin
    • None

      We recently upgraded our Jenkins (2.361.1) and all Plugins to the latest versions. It had been around 2 years since Jenkins update and I did not keep track of the Artifactory plugin version. The Artifactory plugin is now to version to 3.17.0 and first started experiencing this issue. I noticed there was a newer release and went to 3.17.1 today.

      When the shared library tries running "buildInfo.env.collect()", there is a null pointer error, on this call: https://github.com/jenkinsci/artifactory-plugin/blob/9c6002534e39154948cfb1c120b056580ebc93e5/src/main/java/org/jfrog/hudson/pipeline/common/executors/CollectEnvExecutor.java#L31

       

      I believe this is a bug in the plugin code.

       
      15:55:09 echo buildInfo.env worked?15:55:09 [Pipeline] collectEnv*15:55:09* [Pipeline] mail*15:55:09* [Pipeline] End of Pipeline*15:55:09* java.lang.NullPointerException*15:55:09* at org.jfrog.hudson.pipeline.common.executors.CollectEnvExecutor.execute(CollectEnvExecutor.java:31)15:55:09 at org.jfrog.hudson.pipeline.scripted.steps.CollectEnvStep$Execution.runStep(CollectEnvStep.java:45)15:55:09 at org.jfrog.hudson.pipeline.scripted.steps.CollectEnvStep$Execution.runStep(CollectEnvStep.java:32)15:55:09 at org.jfrog.hudson.pipeline.ArtifactorySynchronousNonBlockingStepExecution.run(ArtifactorySynchronousNonBlockingStepExecution.java:55)15:55:09 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)15:55:09 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)15:55:09 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)15:55:09 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)15:55:09 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)15:55:09 at java.base/java.lang.Thread.run(Thread.java:829)

            eyalbe Eyal Ben Moshe
            mikenick Mike Nick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: