The first step is to launch PhpMetrics during build.
To do this, select "Run Shell Script" and insert the following code in the text box that appears:
Monitor certain indicators of your project is very easy!
For example, if you want to monitor the Maintainability Index of your project, you need to add the Plot build data PostBuild task:
PhpMetrics can export results in the PhpMessDetector violations output format.
You need to enable the Jenkins Violations plugin
.Then add the Report violations PostBuild task as following:
PhpMetrics provides a beatiful HTML report file.
If you want to add a link to this report in the sidebar, you need to install the Sidebar link plugin.
Then add a sidebar link in on configuration screen: