There are various way you can integrate code analysis into a continuous integration (CI) framework and a number of plugins that enhance the features. The following examples provide some guidelines on how you can do this:
The following example provides some guidelines on how to configure CCNet for analyzing COBOL projects created in Visual COBOL for Visual Studio.
You must have a machine that has Visual COBOL for Visual Studio installed, and the machine must be attached to CCNet.
Configure CCNet to run MSBuild build tasks using the MSBuild parameters for code analysis described in Performing Code Analysis from the Command Line. For details, see the documentation of CruiseControl.NET.
The following example provides some guidelines on how to configure Jenkins for analyzing Eclipse COBOL projects. Before you start, you must have a machine that has Visual COBOL for Eclipse installed. The machine must be attached to Jenkins and must have Apache Ant installed.
To integrate code analysis in Jenkins:
rem use the following script to set the COBOL environment: call "product-install-dir\CreateEnv.bat" rem change to the directory on the machine that stores the COBOL sources and the .cobolBuild file: cd workspace-dir rem set the classpath environment variable: set CLASSPATH=product-install-dir\bin\mfant.jar;%CLASSPATH% rem perform code analysis using the .cobolBuild script: ant -f .cobolBuild build.and.analyze -DanalysisFailOnError=true