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

Conditionally execute Coverity plugin fails during publish.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • coverity-plugin
    • Jenkins ver. 1.533, Windows 2008 R2 64.
      Maven style job, maven 2.2.1
      cygwin present

    Description

      Had a project with Coverity plugin installed and configured, successfully publishing results.

      Tried to make it conditional following instructions "importing existing publishers" https://wiki.jenkins-ci.org/display/JENKINS/Flexible+Publish+Plugin

      ```
      import static org.jenkins_ci.plugins.flexible_publish.JobUpdater.*

      def job = hudson.model.Hudson.instance.getItem('modulesJavaDatastore')
      list job
      movePublisher job,'Coverity'
      list job
      ```

      Maven build completed successfully, then follows following exception in console log.

      Strings match run condition: string 1=[clean], string 2=[clean]
      Run condition [Strings match] enabling perform for step [Coverity]
      ERROR: Publisher org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher aborted due to exception
      java.lang.NullPointerException
      at jenkins.plugins.coverity.CoverityPublisher.perform(CoverityPublisher.java:404)
      at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110)
      at org.jenkins_ci.plugins.run_condition.BuildStepRunner$DontRun.conditionalRun(BuildStepRunner.java:264)
      at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)
      at org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:134)
      at org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:111)
      at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:754)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1020)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:707)
      at hudson.model.Run.execute(Run.java:1690)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:246)
      [WARNINGS] Skipping publisher since build result is FAILURE

      Attachments

        Activity

          ikedam ikedam added a comment -

          Coverity plugin decides a temporary directory to use when that project is configured with Coverity publisher. This is performed in CoverityLauncherDecorator, CoverityTempDir.
          Used with Flexible Publisher, Coverity plugin fails to know Coverity publisher is configured in that project as it is wrapped by Flexible Publisher. This results no temporary directory is configured, and NPE happens as reported.

          I pass this issue to Coverity plugin as there is nothing Flexible Publisher can do.
          I think there are several ways Coverity plugin can do:

          • Does not support Fiexible Publish plugin.
          • Checks CovertyTempDir exists, and create if not exists.
          • Add a special handling for Flexib Publish plugin.
          ikedam ikedam added a comment - Coverity plugin decides a temporary directory to use when that project is configured with Coverity publisher. This is performed in CoverityLauncherDecorator, CoverityTempDir. Used with Flexible Publisher, Coverity plugin fails to know Coverity publisher is configured in that project as it is wrapped by Flexible Publisher. This results no temporary directory is configured, and NPE happens as reported. I pass this issue to Coverity plugin as there is nothing Flexible Publisher can do. I think there are several ways Coverity plugin can do: Does not support Fiexible Publish plugin. Checks CovertyTempDir exists, and create if not exists. Add a special handling for Flexib Publish plugin.
          ahcho0819 Andrew Cho added a comment -

          Coverity will not support the "Flexible Publish Plugin"

          ahcho0819 Andrew Cho added a comment - Coverity will not support the "Flexible Publish Plugin"

          People

            joshvinson Josh Vinson
            kattamine Greg Domjan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: