Child pages
  • Coverity Plugin
Skip to end of metadata
Go to start of metadata

View Coverity plugin on the plugin site for more information.

This plugin integrates Jenkins with the Coverity Connect and Coverity Static Analysis tools.

Documentation

Please find documentation on GitHub README

Support

If you have any questions or issues with the Coverity plugin, contact coverity-support@synopsys.com

18 Comments

  1. In the "Additional cov-commit-defects arguments:" thing I'm try to pass the Jenkins build number to coverity, using the "--version" option, e.g. --version ${BUILD_NUMBER}

    But I can't get this to work properly. The environment variable is not expanded, so in coverity all commits just have version "${BUILD_NUMBER}"

    Am I using the wrong syntax for this? Or is this kind of thing not supported in the plugin?

    1. I also want this functionality.

  2. When running mvn,

    I got the following error message.

    What should I do to fix it?

    -------------------------------------------------------

     T E S T S

    -------------------------------------------------------

    Running InjectedTest

    Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.106 sec <<< FAILURE!

    Results :

    Tests in error:

      initializationError(InjectedTest): Failed to create temporary file for jnidispatch library: java.io.IOException: Permission denied

    Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

    [INFO] ------------------------------------------------------------------------

    [ERROR] BUILD FAILURE

    [INFO] ------------------------------------------------------------------------

  3. Hi All,

    I installed coverity plugin 1.2.7. I tried to configure coverity in post build action but when i click coverity option i am not getting any response from jenkins.

    Please help me to resolve this issue and Thanks in advance

  4. Hi,

    I am using Coverity Plugin 1.2.4 with Coverity 5.5.1 and though I am able to connect successfully to CIM Instance, I am unable to configure the stream under Project configuration.

    As a result, the Coverity Results fail, since defects cannot be fetched from a null Stream.

    Please let me know the fix.

    Thanks in advance

  5. Hi,

     I have specified intermediate directory on job workspace as coverity. it works FINE with analaysis but not with commit defects. please let me know solution as earlier.

    works Here

    =========
    Coverity cmd so far is: C:\Program Files\Coverity\Coverity Static Analysis\bin\cov-analyze-java, --dir, coverity
    workspace $ "C:\Program Files\Coverity\Coverity Static Analysis\bin\cov-analyze-java" --dir coverity
    d:\jenkins\.jenkins\jobs\coverity_Test\workspace\coverity

    Not Works Here

    ============
    $ "C:\Program Files\Coverity\Coverity Static Analysis\bin\cov-commit-defects" --dir coverity --host abcd.com --port 8080 --stream ISPF_EM_R1_1 --user snsesha
    Coverity Defect Commit Client version 6.6.1 on Windows 7 Enterprise, 64-bit, Service Pack 1 (build 7601)
    Internal version numbers: d614fc01a4 p-eureka-push-15003.308

    ERROR Specified intermediate directory
    c:/Windows/System32/coverity
    doesn't contain any usable data
    Coverity cov-commit-defects returned 2, aborting...

    1. Observed the similar issue as mentioned by Sesha.

      * Used the Coverity plugin for Build-Analysis-Commit operations..

      * Build and Analysis ran successfully.

        [MY-WORKSPACE] $ "C:\Program Files\Coverity\Coverity Static Analysis\bin\cov-build" --dir Report ant -f Code\MyProj\build.xml compile_debug
        [MY-WORKSPACE] $ "C:\Program Files\Coverity\Coverity Static Analysis\bin\cov-analyze" --dir Report --java

      * In commit command, the plugin didn't use the WORKSPACE folder as working directory instead switched to slave's root directory and the command failed.

        $ "C:\Program Files\Coverity\Coverity Static Analysis\bin\cov-commit-defects" --dir Report --host xy.xyz.xy.xyz --dataport 9090 --stream ABC-XYZ --user abc-xyz

      When I tested it by providing an absolute path to the intermediate directory, it again failed.

      It would be nice to have it fixed as it is already such a nice and feature rich plugin - tainted by this small issue.

      This issue is tracked under the following Jira ID:- https://issues.jenkins-ci.org/browse/JENKINS-26022

      Also the plugin can support to accept environment variables/Jenkins parameters in its configuration fields which currently it does not.

  6. Two issues detected in the latest version:

    1) When the stream has more than 3000 defects, and you have any defect filtering on, then only the first 3000 defects are matched against the filter. This is a major bug. Since we use the date detected filter to fail the build for new defects, it now no longer works as our baseline has over 4000 defects (legacy)  Not so simple solution is the Coverity Plugin should not have its own filter configuration, but rather query against a view stored within coverity.  This would vastly improve performance and flexibility.

    2) Having two spaces at any point in the cov-analyze options line causes a parse error.  "j 4 --disable-default" works fine, but "-j 4  -disable-default" throws an error: Extra token '' at the end of the command line.  This happens everytime on linux, have not duplicated in Windows (jenkins server)

  7. in our environment (Windows) we have spaces in the path which broke the analysis in the latest version:

    ...
    1 C/C++ compilation units (100%) are ready for analysis
    The cov-build utility completed successfully.
    
    [Coverity] cmd so far is: [E:\appl\Coverity\Coverity, Static, Analysis, 7.6.1\bin\cov-analyze, --dir,...
    [workspace] $ E:\appl\Coverity\Coverity Static Analysis 7.6.1\bin\cov-analyze .......
    
    Build step 'Coverity' marked build as failure
    

    basically after the last update the " are omitted now (checked with older builds, they were there before).

    [workspace] $ "E:\appl\Coverity\Coverity Static Analysis 7.6.1\bin\cov-analyze" ...
    

    after changing the path to the analysis tool to the old dos name "E:\appl\Coverity\Coveri~4.1" it works now...

  8. I'm trying to use the Coverity Jenkins Plugin with Coverity Scan.  It looks to me like the Coverity Jenkins Plugin requires a Coverity Connect Instance and does not work with Coverity Scan because Coverity Scan does not have Coverity Connect Instances.

    Can anyone confirm or deny this?

    FWIW, I'm trying also to get Hudson to work with Coverity Scan and the Hudson Plugin has a similiar issue.  See https://bugs.eclipse.org/bugs/show_bug.cgi?id=488602

    1. scan-admin@coverity replied and said that the Jenkins/Hudson Coverity plugin is not supported with Coverity Scan.

      I've asked them to update https://scan.coverity.com/faq#eclipse

      _Christopher

  9. i just want to let the jenkins skip to run the coverity plugin,when nothing is excute, but i found the coverity plugin still check the stream of my project and get the wrong snapshot which lead to the job failed. here is the console output:
    14:33:38[Coverity] deleting intermediate directory
    14:33:38 Cim Streams: 1
    14:33:38 Snapshot Size: 0
    14:33:38 [Coverity] Wrong number of snapshot IDs found in build log
    14:33:38 Build step 'Coverity' changed build result to FAILURE

    1. More recent versions (1.9.0+) of the Coverity plugin will use the latest snapshot for the stream, which should resolve this issue. Please contact Synopsys (Coverity) support to file an enhancement request or get help with this issue.

      1. hi,

        thank you so much ,i have update to the newest version ,and that problem solved:)

  10. If we use this Coverity plugin, do we still need to put the coverity analysis packages on the jenkins server?

    1. I have the same question too.
      Currently, my Coverity server and Jenkins are local in different machine.
      When I refer github's document to write the jenkins pipe line and run, it say not coverity related tool, ex. cov-build.
      Thus, should I put coverity analysis packages and jenkins on the same machinthe?
      If the answer were no, what's the correct way to call coverity analysis?
      Thanks!

      1. The Jenkins plugin does not include the Coverity tools. You will need to have the Coverity static analysis tools available on any Jenkins node that will be running the Coverity jobs (either freestyle job or pipeline jobs). 

        Using Coverity plugin version 1.10 and newer you should configure the location globally (Manage Jenkins > Global Tool Configuration > Add Coverity Static Analysis Tools). If you have additional nodes you can also (optionally) configure a node specific location (Node Properties > Tool Locations) for cases where the path to the tools is different on other nodes.

Write a comment…