Child pages
  • Klocwork Community Plugin
Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID

klocwork

Changes

In Latest Release
Since Latest Release

Latest Release
Latest Release Date
Required Core
Dependencies

2.2 (archives)
Aug 01, 2017
1.614
matrix-project (version:1.4)
structs (version:1.7, optional)
scm-api (version:2.1.1, optional)
dashboard-view (version:2.0, optional)
workflow-job (version:2.0, optional)
workflow-basic-steps (version:2.5, optional)
job-dsl (version:1.58, optional)
junit (version:1.5)

Source Code
Issue Tracking
Pull Requests
Maintainer(s)

GitHub
Open Issues
Pull Requests
Michael Baron (id: michaelbaron)
Jacob Larfors (id: jlarfors)
Andreas Larfors (id: andreaslarfors)

Usage

Installations

2016-Aug 778
2016-Sep 787
2016-Oct 781
2016-Nov 819
2016-Dec 800
2017-Jan 814
2017-Feb 836
2017-Mar 867
2017-Apr 936
2017-May 989
2017-Jun 972
2017-Jul 965

This plugin automates Klocwork analyses. For up-to-date documentation please visit the Emenda website: http://emenda.com/jenkins-klocwork-docs

 

 

Maintained by Emenda

Latest features:

  • Pipeline support
  • Job-DSL support
  • Klocwork Cross-Project Synchronisation
  • Incremental Diff Analysis & Quality Gateway

Note on Deprecation in v2.0+

Please note that in v2.0 we added new functionality to the plugin. Instead of updating (and possibly breaking) the old parts of the plugin we added completely new functionality. We will not remove any existing functionality but have marked it as Deprecated and will not actively add new features to it. Instead we recommend that you start using the new features, as detailed in the documentation. We hope that the new features are better and easier for you to use!

Support

Please contact Emenda support for requests or help with the plugin: support@emenda.eu

Changelog

Version 2.2

  • New feature: support for Java diff analysis
  • Major bug fix: resolved issue were global license server settings were passed to integration analysis step even if blank
  • Major bug fix: updated the integration quality gate query to allow users to specify grouping:on if they wish

Version 2.1

  • Minor bug fix: resolved potential NPD when checking threshold values

  • Minor bug fix: updated the wiki link in the plugin pom.xml
  • Major bug fix: updated Klocwork api library to make use of Jenkins environment variables

Version 2.0

  • Simplified creation of Klocwork static analysis jobs or tasks
  • Supports Klocwork full, incremental and incremental diff analysis
  • Allows job success criteria to be connected to static analysis results via a Quality Gateway
  • Provides per-checkin CI analysis of just the changed files for minimum analysis times
  • Support for Jenkins Pipelines
  • Support for Job-DSL

Version 1.24.6

  • Merged various changes and bug fixes from Emenda
  • Added support for use of variables in configuration
  • Updated the version of kwjlib for Klocwork API usage
  • Updated the global settings so that it uses the Klocwork tool in the path

Version 1.18

* Fix reoponed JENKINS-29673 - Klocwork plugin does not work in a master/slave configuration

Version 1.17

* Fix JENKINS-29673 - Klocwork plugin does not work in a master/slave configuration

Version 1.16.3

* Avoid errors when building on slaves
* Avoid error 500 when restarting jenkins
* Avoid NPE from old version of config.xml which doesn't contain the tag <webAPI>

Version 1.16.2

* Clean code by applying IDEA format and by removing unused code
* Use SCM features for changelog

Version 1.16.1

* Changing Jenkins version to be Java 7 compliant

Version 1.16

* Enabled multiple build specification files
* Removed Dashboard portlet component to also remove dependency on dashboard view plugin
* Added SSL support
* Build graph previously incorrectly removed, now re-instated
* Fixed Multiconfiguration project bug in Publisher

Version 1.15

* Enabled embedded Klocwork results in Klocwork v9.6 and later.
Achieved using kwjlib to retrieve issues from Klocwork Web API, which are
put into an XML file by KloXMLGenerator and then parsed as before

Version 1.14.1

* Allowing Klocwork publisher to appear in maven job

Version 1.14

* Fixed NullPointerException and added compiler options

Version 1.13

* Fix reopened JENKINS-12861 - klocwork - update to recognize 9.5.x xml schema

Version 1.12

* Fix JENKINS-12861 - klocwork - update to recognize 9.5.x xml schema

Version 1.11

* Merge pull request - Add compatibility with Klocwork v9.6

Version 1.10

* Fix JENKINS-13668 - Klocwork Plugin Fails if no KW Issues

Version 1.9

* Fix JENKINS-14005 - Major issue when Klocwork reporting is enabled

Version 1.8.1

* Allow publisher part to appear in maven jobs.

Version 1.8

* Fixed JENKINS-13743 - Jenkins 1.463 + Klocwork plugin - crashes when saving configuration

Version 1.7

* Fixed JENKINS-12535 - Link to the line which contains the klocwork error instead of just linking to the file.

Version 1.6

* Update to latest DTkit versions

Version 1.5

* Updated version number. Provided variable ${BUILD_ID} when specifying Klocwork tables directory such that a unique directory can be used for each build.
* Added functionality to specify options for kwbuildproject. Useful for changing location of tables directory, adding compiler options, etc.

Version 1.4

* Updated xml parser to work with reports generated by Klocwork v9.5. New features: per-build pie chart showing number of issues and their state, a link to view the build.log, link to view the parse_errors.log and a link to access Klocwork Review within Jenkins. Now to test on Windows.

Version 1.3

* Fixed JENKINS-10773
* Fixed JENKINS-10775
* Fixed JENKINS-10776

Version 1.2

* Fixed JENKINS-10455

Version 1.1

* Fixed JENKINS-10379 - Allowed statuses for Klocwork report are incorrect
* Fixed args parsing

Version 1.0

* Initial version

17 Comments

    1. As the KW plugin doesn't seem to be integrated with SA/AC you may need to pull a text report from KW server and use Warnings plugin to get standard visualizations....

      1. Could you fill in a ticket in the Jenkins JIRA?

  1. Hi

    I have seen on github that the issue with new klocwork v9.5 xml files seems to be solved in master branch.

    Is there a new release version planned for the plugin? (I do not feel confident enough to set up the build environment myself.)

    Regards

    /David

    1. Please check with version 1.6

  2. plug-in 1.8 fix the crash saving configuration  but  still have a issue in build kwbuildproject phase .FATAL: command execution failed
    java.io.IOException: Cannot run program "" (in directory "/var/lib/jenkins/jobs/Linux_Kernel_Common_Build/workspace"): java.io.IOException: error=2, No such file or directory

  3. Thanks for the plugin. but I can't find any links to the analysis result page. Do i miss something?

    here is the last part log of one success build:

    
    Loading project database - progress: 100%
    Loading project database - progress: 100%
    Loading project database - progress: 100%
    Tue Jun 12 11:22:44 CST 2012: Database loading stage completed
    Build successfully created.
    [workspace] $ cmd.exe /C '""D:/develop/Klocwork/Server 9.5\bin\kwinspectreport" \--project my_project \--build build_ci_20120612_111355 \--xml "C:\Documents and Settings\Jedi Huang\.jenkins\jobs\test\workspace\klocwork_result.xml" \--host 172.20.38.14 \--port 8100 \--license-host 172.20.38.14 \--license-port 27000 && exit %%ERRORLEVEL%%"'
    Finished: SUCCESS
    
  4. Hi,

    I'm now testing the latest release of Klocwork, version 9.6 and now kwinspectreport do not have the -xml option available.

    So that it's impossible to generate the XML report that will be injected in the Klocwork plugin.

    Are you aware of this situation ? I think they turn to WebAPI technology. But what about the Klocwork plugin now ?

    Regards.

  5. Hi

    How to generate the xml files using kwjlib ? 

    regards

    mithun 

    1. I was wondering the same thing.

      I receive the following error because I don't know how to generate the xml report that the plugin is asking for:

      April 23, 2013 3:41:48 AM EDT: Database loading stage completed
      
      Build successfully created.
      Connecting to Klocwork Web API service
      Creation of XML file complete. Closing connection to Web API.
      Starting the klocwork analysis.
      Parsing has been canceled. No klocwork test report file(s) were found with the pattern 'klocwork_result.xml' relative to 'D:\Jenkins\jobs\Klocwork - Win32\workspace'.  Did you enter a pattern relative to the correct directory?  Did you generate the XML report(s) for Klocwork? No klocwork test report file(s) were found with the pattern 'klocwork_result.xml' relative to 'D:\Jenkins\jobs\Klocwork - Win32\workspace'.  Did you enter a pattern relative to the correct directory?  Did you generate the XML report(s) for Klocwork?
      Build step 'Publish Klocwork test result report' changed build result to FAILURE
      Build step 'Publish Klocwork test result report' marked build as failure
      
  6. Does the plugin support klocwork server configured with SSL. I don't see an option in the configuration.

  7. There is mention of 1.16 with SSL Support, what is the status of this?

  8. I added the --incremental option to kwbuildproject but it always sseems to use --force. Is this by design?

  9. I couldn't find a way to set up the bitbake environment in order to use it with kwinject command.

    I only have to source a file with variables.

    The OS is Ubuntu.

    I have tried with Env Inject variables plugin, with an execute shell field, but the bitbake command is still unknown: kwinject FATAL: can not exec bitbake: No such file or directory

    Can you give me a hint?

  10. Hello Everyone,

    Can anyone suggest me how to invoke the klocwork command from jenkins. As I am new to it,i was looking on it

    Below  are the Steps what I tried:

    Under Build Tab:

    1 Select the invoke klocwork command.

    2 klocwork version:11.2

    3 Project Name :JenkinsTestProject

    4 Build Name : (Optional)

    5 Build using : Build Command

    6 Build Value: kwant

    7 Klocwork Build Option: Left Blank

    I am having doubt in Point number 6, what are all the values that we

     need to pass. It would be great If any link or video can be suggested.

     

    Following are the links which I referred but did not find  much information:

    https://www.youtube.com/watch?v=PJcrnvs0kFo

    http://emenda.com/klocwork-jenkins/

    http://emenda.com/resources/jenkins-klocwork-docs/

    regards,

    Gnyanraj

    1. Hi Gnyanraj (smile),

      May I suggest you contact Emenda support directly via support@emenda.eu, through which support is much more readily available.

      Kind regards,
      Ben
      Emenda Support

Write a comment…