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

Unable to integrate Confluence Publisher Plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I am trying to integrate Confluence Publisher Plugin.

      I have correctly provide

      1) Confluence Site
      2) Space
      3) Page
      4) Artifacts

      parameters. When I am trying to build I am getting error

      ERROR: Publisher com.myyearbook.hudson.plugins.confluence.ConfluencePublisher aborted due to exception
      java.lang.NullPointerException
      at com.myyearbook.hudson.plugins.confluence.ConfluencePublisher.findArtifacts(ConfluencePublisher.java:445)
      at com.myyearbook.hudson.plugins.confluence.ConfluencePublisher.performAttachments(ConfluencePublisher.java:182)
      at com.myyearbook.hudson.plugins.confluence.ConfluencePublisher.perform(ConfluencePublisher.java:314)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:784)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:756)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:705)
      at hudson.model.Run.execute(Run.java:1695)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:231)
      Finished: FAILURE

        Attachments

          Activity

          Hide
          jhansche Joe Hansche added a comment -

          Roopendra Vishwakarma:

          I believe the problem here is that you have checked the "Attach archived artifacts" option, but your job does not archive any artifacts... So, getArtifactsDir() returns null, because the job doesn't save anything.

          Instead, uncheck that checkbox and add the Ant-syntax path to the file(s) that you want uploaded to Confluence into the "Other files to attach" box.

          If you are not intending to upload attachments at all – and only want to edit the contents of the page itself – then you need to uncheck the checkbox AND leave the "other files to attach" field empty.

          I'm recategorizing this as an improvement, because the error itself is caused by a misconfiguration; however, the plugin should detect that there are no artifacts and simply skip that step, instead of raising an error.

          Show
          jhansche Joe Hansche added a comment - Roopendra Vishwakarma : I believe the problem here is that you have checked the "Attach archived artifacts" option, but your job does not archive any artifacts... So, getArtifactsDir() returns null, because the job doesn't save anything. Instead, uncheck that checkbox and add the Ant-syntax path to the file(s) that you want uploaded to Confluence into the "Other files to attach" box. If you are not intending to upload attachments at all – and only want to edit the contents of the page itself – then you need to uncheck the checkbox AND leave the "other files to attach" field empty. I'm recategorizing this as an improvement, because the error itself is caused by a misconfiguration ; however, the plugin should detect that there are no artifacts and simply skip that step, instead of raising an error.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Joe Hansche
          Path:
          src/main/java/com/myyearbook/hudson/plugins/confluence/ConfluencePublisher.java
          http://jenkins-ci.org/commit/confluence-publisher-plugin/d7e9c4f4a48d396b5c51e0413b8537087dc08860
          Log:
          [FIXED JENKINS-21624] Misconfiguration leads to error.

          If the "Attached archived artifacts" option is selected, but no
          artifacts are configured to be archived by the job, the upload
          fails with a `NullPointerException`.

          Instead, we should detect that case and log a message indicating
          that nothing is going to be uploaded.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Joe Hansche Path: src/main/java/com/myyearbook/hudson/plugins/confluence/ConfluencePublisher.java http://jenkins-ci.org/commit/confluence-publisher-plugin/d7e9c4f4a48d396b5c51e0413b8537087dc08860 Log: [FIXED JENKINS-21624] Misconfiguration leads to error. If the "Attached archived artifacts" option is selected, but no artifacts are configured to be archived by the job, the upload fails with a `NullPointerException`. Instead, we should detect that case and log a message indicating that nothing is going to be uploaded.

            People

            • Assignee:
              jhansche Joe Hansche
              Reporter:
              roopendra Roopendra Vishwakarma
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: