The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Klocwork Community Plug-in

klocworkIncremental: Klocwork - Incremental Diff Analysis

  • desktopConfig
      Nested Object
    • buildSpec
      Build specification to use for analysis. Path is relative to the workspace
      • Type: String
    • projectDir
      • Type: String
    • cleanupProject
      • Type: boolean
    • reportFile
      XML report file to store Klocwork results in. Optional in case you want to use the XML report for something custom, otherwise a default file is created for the post-build step
      • Type: String
    • additionalOpts
      Additional options added to the kwcheck run command. For example, specify the number of jobs/threads to use (--jobs-num) or which filters you would like to apply (e.g. --severity --taxonomy --system)
      Documentation - look at subsection "kwcheck run"
      • Type: String
    • incrementalAnalysis

      Klocwork Quality Gateway

      This feature allows for quick, incremental analyses of changed source files to enable pre/post-checkin/commit like behaviour. The idea is that only changed files are analysed using the Klocwork Desktop/User tools to replicate the analysis developers would perform using Visual Studio, Eclipse or the command line utility.

      Diff File List

      The diff file list is the file to contain the changed source files that Klocwork should analyse. It is required that any analysed files should exist in the build specification generated by kwinject

      IMPORTANT: It is required that any files to be analysed must also exist in the build specification specified

      Using Git

      If using Git, please provide the previous commit that Git should perform a "diff" with. The change list between the current commit and the specified previous commit will then be added to the diff file list for Klocwork to process by automatically calling "git diff <previous_commit>" during the build.

      Manual

      If you are not using Git, or want to manually generate the change list using Git, then please select this option. You will need to generate the diff file list with a custom build-step (or similar). Future support for more SCM tools (such as SVN, perforce) may be added depending on demand. The format of the file should be a changed source file per line

      Future support for more SCM tools (such as SVN, perforce) may be added depending on demand.

      • Type: boolean
    • diffAnalysisConfig
        Nested Object
      • diffType
        • Type: String
      • gitPreviousCommit
        • Type: String
      • diffFileList
        • Type: String

klocworkIntegrationStep1: Klocwork - Full Integration Analysis (step 1 - analysis)

  • serverConfig
      Nested Object
    • buildSpec
      Build specification to use for analysis. Path is relative to the workspace
      • Type: String
    • tablesDir
      Specify the location of the tables directory, e.g. ${MY_VAR}/kwtables
      • Type: String
    • incrementalAnalysis
      • Type: boolean
    • ignoreCompileErrors
      Ignore compile errors encountered by kwbuildproject. This will not ignore a return code that indicates that kwbuildproject failed to the extent that no results are generated.
      • Type: boolean
    • importConfig
      Optional, provide config files to import to the project before running the analysis. If you version control the checker configuration (e.g. analysis_profile.pconf) you can provide the file here and it will be automatically imported each build
      Specify multiple files separated by comma (",")
      • Type: String
    • additionalOpts
      • Type: String
    • disableKwdeploy
      By default kwdeploy is run before the analysis to ensure the checkers are up to date. Enabling this setting disables it from running.
      • Type: boolean

klocworkIntegrationStep2: Klocwork - Full Integration Analysis (step 1 - analysis)

  • serverConfig
      Nested Object
    • tablesDir
      • Type: String
    • buildName
      Specify the name of the build for the Klocwork server, e.g. ${MY_VAR}-${GIT_COMMIT}. If empty, Klocwork uses an auto increment to name the builds
      • Type: String
    • additionalOpts
      • Type: String

klocworkIssueSync: Klocwork - Cross-Project Issue Sync

  • syncConfig
      Nested Object
    • dryRun
      Running the cross synchronisation means reading and writing to the Klocwork database. Therefore we strongly recommend that you first try a Dry Run of the command (which skips the writing) and verify that the command works as expected.
      • Type: boolean
    • lastSync
      Specify the "last synchronisation" date (i.e. how far back Klocwork should go when synchronising issue citations).
      Format is "DD-MM-YYYY hh:mm:ss"
      For example, "03-00-0000 00:00:00" will go back in time 3 days.
      • Type: String
    • projectRegexp
      A regular expression that is used to retrieve Klocwork projects that should be processed during synchronisation. For all projects leave empty.
      For example, if you prepend projects with "DEPT-" to indicate a particular department the regular expression "^DEPT-" will match all these projects
      • Type: String
    • statusAnalyze
      • Type: boolean
    • statusIgnore
      • Type: boolean
    • statusNotAProblem
      • Type: boolean
    • statusFix
      • Type: boolean
    • statusFixInNextRelease
      • Type: boolean
    • statusFixInLaterRelease
      • Type: boolean
    • statusDefer
      • Type: boolean
    • statusFilter
      • Type: boolean
    • additionalOpts
      Additional options added to the kwxsync command
      • Type: String

klocworkQualityGateway: Klocwork - Quality Gateway

  • gatewayConfig
      Nested Object
    • enableServerGateway

      Full Integration Analysis Gateway

      Create multiple gateways using queries that are sent to the Klocwork server using the web api.

      Filter issues based on the search query, then provide the status to set the build to, along with the threshold (number of issues to meet this criteria)

      Note: unless specified the query will run with issue grouping turned off (grouping:off)

      • Type: boolean
    • gatewayServerConfigs
        Array/List
        Nested Object
      • jobResult
        • Type: String
      • query
        • Type: String
      • threshold
        • Type: String
      • conditionName
        • Type: String
    • enableDesktopGateway

      Incremental Diff Analysis Gateway

      Set a threshold for the incremental diff analsysis gateway. Pass the build if threshold not exceeded, fail otherwise.

      This checks the XML report generated by the incremental diff analysis build-step. You can filter which issues appear in this report by providing additional options to the incremental diff analysis build-step.

      This gateway simply counts the total number of issues in the XML report.

      • Type: boolean
    • gatewayDesktopConfig
        Nested Object
      • threshold
        • Type: String
      • reportFile
        • Type: String

klocworkWrapper: Klocwork - Build Environment Settings

  • serverConfig
    Server configurations are created on the Configure System page
    • Type: String
  • installConfig
    Install configurations are created on the Configure System page. When used, the specified PATHs are added to the launcher to be used by any build step
    • Type: String
  • serverProject
    The Klocwork server project to run a server build against or to connect a Klocwork desktop analysis to
    • Type: String
  • ltoken
    (Optional) Specify a custom ltoken location. The Klocwork ltoken is used to authenticate with the Klocwork server. The default ltoken location is in the user's home directory, that is the user running the process. More information
    • Type: String

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.