Integrate CppDepend with Jenkins

Integrate CppDepend with Jenkins



Installing CppDepend on the build server

To be able to run CppDepend analysis during a build on a Jenkins server you need to install CppDepend on the server which hosts the Jenkins agent that will run the CppDepend analysis. Just unzip CppDepend in a folder that the Jenkins agent can use. In our example we will use “C:\Program Files\_Tools\Development\cppdepend”.


Configuring Jenkins

  • First step: Create a CppDepend project (.cdproj)
  • once you have your CppDepend project you must execute a windows batch command to generate CppdependOut directory which contains CppDepend report files:

  • Go to Jenkins Dashboard
  • Click on your Jenkins job
  • Click on "Configure option" for your Jenkins job
  • In the build portion add a build step (“execute windows batch command”)
  • Specify the execution command (path of CppDepend console and the path of your CppDepend Project (.cdproj))


Go to top


Setting up the CppDepend Report in the Jenkins Dashboard

    To publish the CppDepend HTML report you must install HTML publisher plugin:
  • Go to Jenkins Dashboard
  • Click on "Manage Jenkins"
  • On the Plugin Manager page, go to the "Available" tab next to Updates tab and click on recommended.
  • In the build report tabs click on "Create new build report tab"
  • Look for the html publisher plugin, enable the checkbox and click install. Just Wait for the "Success" Status.
  • Restart Jenkins by clicking on the provided link on the success page. if you are using Tomcat, execute /bin/shutdown.sh and /bin/startup.sh
    Html Publisher plugin is useful to publish the html reports that your build generates to the job and build pages. Below are the steps to publish and archive the HTML report files
  • Click on the Configure option for your Jenkins job
  • In the post build portion, look for the Publish HTML Reports option and enable the checkbox.
  • Fill the path to the out directory of CppDepend containing the html report in the "HTML directory to archive" field. Specify the pages to display (default CppDependReport.html); you can specify multiple comma-separated pages and each will be a tab on the report page. Finally, give a name in the Report Title field, which will be used to provide a link to the report. By default, only the most recent HTML report will be saved, but if you'd like to be able to view HTML reports for each past build, select "Keep past HTML reports."


  • Save the configuration, and run build once. The published HTML reports are available to view from within Jenkins with convenient links in the dashboard.

Go to top