The following example demonstrates how to configure Jenkins to perform code analysis of COBOL projects created with Visual COBOL.
Before you configure Jenkins, you need to do the following:
To integrate code analysis in Jenkins:
call ant -f .cobolBuild build.and.analyze -DanalysisFailOnError=true
Where .cobolBuild is the Eclipse project file of the application you are going to analyze.
For example, the full set of commands for the Jenkins project might look similar to the following:
rem set the COBOL environment:
rem locate the mfant.jar file that includes the definitions of the Micro Focus Ant tasks for analyzing code, and build and analyze the application defined by the .cobolBuild project file:
call ant -lib "%ProgramFiles(x86)%\Micro Focus\Visual COBOL\bin\mfant.jar" -f .cobolBuild build.and.analyze -DanalysisFailOnError=true
See Performing Code Analysis from the Command Line for all available code analysis options.