次の例では、Visual COBOL で作成した COBOL プロジェクトのコード解析を実行するように Jenkins を構成する方法を示します。
Jenkins を構成する前に、次の手順を実行する必要があります。
Jenkins でコード分析を統合するには、次の手順を実行します。
call ant -f .cobolBuild build.and.analyze -DanalysisFailOnError=true
たとえば、Jenkins プロジェクトのコマンドの完全なセットは、次のようになります。
rem set the COBOL environment:
call "product-install-dir\SetupEnv.bat"
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