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.
klocworkBuildSpecGeneration
: Klocwork - Step 1 (CI/Full) - Capture Build InformationklocworkFailureCondition
: Klocwork - Post Analysis (Full/CI) - Build Failure Conditions (Optional)klocworkIncremental
: Klocwork - Step 2 (CI) - Run Differential AnalysisklocworkIntegrationStep1
: Klocwork - Step 2 (Full) - Run AnalysisklocworkIntegrationStep2
: Klocwork - Step 3 (Full) - Load Analysis ResultsklocworkIssueSync
: Klocwork - Post Analysis (Full) - Cross-Project Issue Sync (Optional)step([$class: 'KlocworkBuildSpecBuilder'])
: Klocwork - Step 1 (CI/Full) - Capture Build Informationstep([$class: 'KlocworkCiBuilder'])
: Klocwork - Step 2 (CI) - Run Differential Analysisstep([$class: 'KlocworkFailureConditionPublisher'])
: Klocwork - Post Analysis (Full/CI) - Build Failure Conditions (Optional)step([$class: 'KlocworkServerAnalysisBuilder'])
: Klocwork - Step 2 (Full) - Run Analysisstep([$class: 'KlocworkServerLoadBuilder'])
: Klocwork - Step 3 (Full) - Load Analysis Resultsstep([$class: 'KlocworkXSyncBuilder'])
: Klocwork - Post Analysis (Full) - Cross-Project Issue Sync (Optional)klocworkWrapper
: Klocwork - Build Environment SettingsklocworkBuildSpecGeneration
: Klocwork - Step 1 (CI/Full) - Capture Build InformationbuildSpecConfig
buildCommand
String
tool
String
output
String
additionalOpts
String
ignoreErrors
boolean
klocworkFailureCondition
: Klocwork - Post Analysis (Full/CI) - Build Failure Conditions (Optional)failureConditionConfig
enableServerFailureCondition
(optional)
Create multiple build failure conditions by using queries that are sent to the Klocwork Server through the Web API.
Filter issues based on the search query, then provide the status to set the build to, along with the threshold (the number of issues to meet this criteria).
Note: unless specified, the query runs with issue grouping turned off (grouping:off).
boolean
failureConditionServerConfigs
(optional)
jobResult
String
query
String
threshold
String
conditionName
String
stopBuild
boolean
enableHTMLReporting
boolean
enableCiFailureCondition
(optional)
Set a threshold for the differential analysis build failure conditions. Pass the build if the threshold is not exceeded; fail otherwise.
This step checks the XML report generated by the differential analysis build step. You can filter which issues appear in this report by providing additional options to the differential analysis build step.
This step counts the total number of issues in the XML report.
boolean
enableDesktopFailureCondition
(optional)
boolean
failureConditionCiConfig
(optional)
withDiffList
boolean
diffFileList
String
threshold
(optional)
String
reportFile
(optional)
String
enableHTMLReporting
(optional)
boolean
enabledSeverites
(optional)
critical
boolean
error
boolean
warning
boolean
review
boolean
fiveToTen
boolean
enabledStatuses
(optional)
analyze
boolean
ignore
boolean
notAProblem
boolean
fix
boolean
fixInNextRelease
boolean
fixInLaterRelease
boolean
defer
boolean
filter
boolean
failUnstable
(optional)
boolean
name
(optional)
String
stopBuild
(optional)
boolean
failureConditionCiConfigs
(optional)
withDiffList
boolean
diffFileList
String
threshold
(optional)
String
reportFile
(optional)
String
enableHTMLReporting
(optional)
boolean
enabledSeverites
(optional)
critical
boolean
error
boolean
warning
boolean
review
boolean
fiveToTen
boolean
enabledStatuses
(optional)
analyze
boolean
ignore
boolean
notAProblem
boolean
fix
boolean
fixInNextRelease
boolean
fixInLaterRelease
boolean
defer
boolean
filter
boolean
failUnstable
(optional)
boolean
name
(optional)
String
stopBuild
(optional)
boolean
failureConditionDesktopConfig
(optional)
withDiffList
boolean
diffFileList
String
threshold
(optional)
String
reportFile
(optional)
String
enableHTMLReporting
(optional)
boolean
enabledSeverites
(optional)
critical
boolean
error
boolean
warning
boolean
review
boolean
fiveToTen
boolean
enabledStatuses
(optional)
analyze
boolean
ignore
boolean
notAProblem
boolean
fix
boolean
fixInNextRelease
boolean
fixInLaterRelease
boolean
defer
boolean
filter
boolean
failUnstable
(optional)
boolean
name
(optional)
String
stopBuild
(optional)
boolean
klocworkIncremental
: Klocwork - Step 2 (CI) - Run Differential AnalysisciConfig
buildSpec
String
projectDir
String
cleanupProject
boolean
reportFile
String
additionalOpts
String
incrementalAnalysis
This feature allows for quick, incremental analyses of changed source files to enable pre/post-checkin/commit-like behavior . The goal is that only changed files are analyzed by the Klocwork kwciagent tool to replicate the local analysis developers would perform by using our supported IDE plugins or the command line utility. To enable this behavior, the plugin takes a list of the changed files from the SCM; this enables the system to analyze only the changed files when the workspace isn’t kept. Leave this cleared to analyze the whole project, or, if the workspace is kept, to perform a standard incremental analysis.
The diff file list is the file that contains the changed source files for Klocwork to analyze. All analyzed files must exist in the build specification generated by kwinject.
Note: All files to be analyzed must exist in the build specification.
If using Git, provide the previous commit that Git should perform a "diff" against. The change list between the current commit and the specified previous commit will be added to the diff file list for Klocwork to process by automatically calling "git diff <previous_commit>" during the build. Note: If you are using Git jenkins plugin to obtain source files for you pipeline job be sure to use 'Pipeline script from SCM' and specify the previous commit with the environment variable, 'GIT_PREVIOUS_COMMIT'. Also be aware that the first build in the job won't be able to access GIT_PREVIOUS_COMMIT and the first build will run full CI analysis.
If you are not using Git, or want to manually generate the change list by using Git, select this option. You will need to generate the diff file list by using a custom build-step (or similar). List one changed source file on each line of the file.
boolean
differentialAnalysisConfig
diffType
String
gitPreviousCommit
String
diffFileList
String
klocworkIntegrationStep1
: Klocwork - Step 2 (Full) - Run AnalysisserverConfig
buildSpec
String
tablesDir
String
incrementalAnalysis
boolean
ignoreCompileErrors
boolean
importConfig
String
additionalOpts
String
disableKwdeploy
boolean
duplicateFrom
(optional)
String
enabledCreateProject
(optional)
boolean
klocworkIntegrationStep2
: Klocwork - Step 3 (Full) - Load Analysis ResultsserverConfig
tablesDir
(optional)
String
buildName
(optional)
String
additionalOpts
(optional)
String
reportConfig
(optional)
displayChart
(optional)
boolean
chartHeight
(optional)
String
chartWidth
(optional)
String
query
(optional)
String
klocworkIssueSync
: Klocwork - Post Analysis (Full) - Cross-Project Issue Sync (Optional)syncConfig
dryRun
boolean
lastSync
String
projectRegexp
String
statusAnalyze
boolean
statusIgnore
boolean
statusNotAProblem
boolean
statusFix
boolean
statusFixInNextRelease
boolean
statusFixInLaterRelease
boolean
statusDefer
boolean
statusFilter
boolean
additionalOpts
String
step([$class: 'KlocworkBuildSpecBuilder'])
: Klocwork - Step 1 (CI/Full) - Capture Build InformationbuildSpecConfig
buildCommand
String
tool
String
output
String
additionalOpts
String
ignoreErrors
boolean
step([$class: 'KlocworkCiBuilder'])
: Klocwork - Step 2 (CI) - Run Differential AnalysisciConfig
buildSpec
String
projectDir
String
cleanupProject
boolean
reportFile
String
additionalOpts
String
incrementalAnalysis
This feature allows for quick, incremental analyses of changed source files to enable pre/post-checkin/commit-like behavior . The goal is that only changed files are analyzed by the Klocwork kwciagent tool to replicate the local analysis developers would perform by using our supported IDE plugins or the command line utility. To enable this behavior, the plugin takes a list of the changed files from the SCM; this enables the system to analyze only the changed files when the workspace isn’t kept. Leave this cleared to analyze the whole project, or, if the workspace is kept, to perform a standard incremental analysis.
The diff file list is the file that contains the changed source files for Klocwork to analyze. All analyzed files must exist in the build specification generated by kwinject.
Note: All files to be analyzed must exist in the build specification.
If using Git, provide the previous commit that Git should perform a "diff" against. The change list between the current commit and the specified previous commit will be added to the diff file list for Klocwork to process by automatically calling "git diff <previous_commit>" during the build. Note: If you are using Git jenkins plugin to obtain source files for you pipeline job be sure to use 'Pipeline script from SCM' and specify the previous commit with the environment variable, 'GIT_PREVIOUS_COMMIT'. Also be aware that the first build in the job won't be able to access GIT_PREVIOUS_COMMIT and the first build will run full CI analysis.
If you are not using Git, or want to manually generate the change list by using Git, select this option. You will need to generate the diff file list by using a custom build-step (or similar). List one changed source file on each line of the file.
boolean
differentialAnalysisConfig
diffType
String
gitPreviousCommit
String
diffFileList
String
step([$class: 'KlocworkFailureConditionPublisher'])
: Klocwork - Post Analysis (Full/CI) - Build Failure Conditions (Optional)failureConditionConfig
enableServerFailureCondition
(optional)
Create multiple build failure conditions by using queries that are sent to the Klocwork Server through the Web API.
Filter issues based on the search query, then provide the status to set the build to, along with the threshold (the number of issues to meet this criteria).
Note: unless specified, the query runs with issue grouping turned off (grouping:off).
boolean
failureConditionServerConfigs
(optional)
jobResult
String
query
String
threshold
String
conditionName
String
stopBuild
boolean
enableHTMLReporting
boolean
enableCiFailureCondition
(optional)
Set a threshold for the differential analysis build failure conditions. Pass the build if the threshold is not exceeded; fail otherwise.
This step checks the XML report generated by the differential analysis build step. You can filter which issues appear in this report by providing additional options to the differential analysis build step.
This step counts the total number of issues in the XML report.
boolean
enableDesktopFailureCondition
(optional)
boolean
failureConditionCiConfig
(optional)
withDiffList
boolean
diffFileList
String
threshold
(optional)
String
reportFile
(optional)
String
enableHTMLReporting
(optional)
boolean
enabledSeverites
(optional)
critical
boolean
error
boolean
warning
boolean
review
boolean
fiveToTen
boolean
enabledStatuses
(optional)
analyze
boolean
ignore
boolean
notAProblem
boolean
fix
boolean
fixInNextRelease
boolean
fixInLaterRelease
boolean
defer
boolean
filter
boolean
failUnstable
(optional)
boolean
name
(optional)
String
stopBuild
(optional)
boolean
failureConditionCiConfigs
(optional)
withDiffList
boolean
diffFileList
String
threshold
(optional)
String
reportFile
(optional)
String
enableHTMLReporting
(optional)
boolean
enabledSeverites
(optional)
critical
boolean
error
boolean
warning
boolean
review
boolean
fiveToTen
boolean
enabledStatuses
(optional)
analyze
boolean
ignore
boolean
notAProblem
boolean
fix
boolean
fixInNextRelease
boolean
fixInLaterRelease
boolean
defer
boolean
filter
boolean
failUnstable
(optional)
boolean
name
(optional)
String
stopBuild
(optional)
boolean
failureConditionDesktopConfig
(optional)
withDiffList
boolean
diffFileList
String
threshold
(optional)
String
reportFile
(optional)
String
enableHTMLReporting
(optional)
boolean
enabledSeverites
(optional)
critical
boolean
error
boolean
warning
boolean
review
boolean
fiveToTen
boolean
enabledStatuses
(optional)
analyze
boolean
ignore
boolean
notAProblem
boolean
fix
boolean
fixInNextRelease
boolean
fixInLaterRelease
boolean
defer
boolean
filter
boolean
failUnstable
(optional)
boolean
name
(optional)
String
stopBuild
(optional)
boolean
step([$class: 'KlocworkServerAnalysisBuilder'])
: Klocwork - Step 2 (Full) - Run AnalysisserverConfig
buildSpec
String
tablesDir
String
incrementalAnalysis
boolean
ignoreCompileErrors
boolean
importConfig
String
additionalOpts
String
disableKwdeploy
boolean
duplicateFrom
(optional)
String
enabledCreateProject
(optional)
boolean
step([$class: 'KlocworkServerLoadBuilder'])
: Klocwork - Step 3 (Full) - Load Analysis ResultsserverConfig
(optional)
tablesDir
(optional)
String
buildName
(optional)
String
additionalOpts
(optional)
String
reportConfig
(optional)
displayChart
(optional)
boolean
chartHeight
(optional)
String
chartWidth
(optional)
String
query
(optional)
String
step([$class: 'KlocworkXSyncBuilder'])
: Klocwork - Post Analysis (Full) - Cross-Project Issue Sync (Optional)syncConfig
dryRun
boolean
lastSync
String
projectRegexp
String
statusAnalyze
boolean
statusIgnore
boolean
statusNotAProblem
boolean
statusFix
boolean
statusFixInNextRelease
boolean
statusFixInLaterRelease
boolean
statusDefer
boolean
statusFilter
boolean
additionalOpts
String
klocworkWrapper
: Klocwork - Build Environment SettingsserverConfig
String
installConfig
String
serverProject
String
ltoken
String
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.