CI/CD Integrations
To leverage DCM on your CI/CD, use one of the available integrations below:
Integrating with DCM Dashboards​
To get an overview of all open issues and enabled code health metrics, and how they change over time, you can upload the results of the dcm run
command to DCM Dashboards.
To get started, check out this guide.
Integrating DCM into Your Custom CI/CD​
To help you integrate DCM with a custom CI/CD solution, all commands support different output formats (for example, console, json, checkstyle, codeclimate and other).
So if your CI/CD does not support checkstyle
or codeclimate
, use the console
format in cases where you need to print the output to the console:
dcm run --analyze lib
and json
in cases where you need to process the generated output:
dcm run --analyze lib --reporter=json > dcm-report.json
Saving the Results to a File​
To get the output to both stdout (by default, the console) and a separate file in a single run, use the --output-to
CLI option. For example,
dcm run --analyze lib --reporter=json --output-to=report.json
will write the output in the console
format to the console and the json
output to the report.json
file.
When this option is present, the --reporter
CLI option only affects the output to a separate file.
Also note that the file extension must match the passed output format (for example, .xml
for checkstyle
, .json
for json
and so on).
Troubleshooting​
If you are experiencing any issues with integrating DCM into your CI/CD, refer to this page for most common issues and solutions.