コード分析を継続的インテグレーション (CI) フレームワークと機能を拡張する多数のプラグインに統合するには、さまざまな方法があります。次の例では、これを行う方法に関するガイドラインについていくつか説明します。
次の例では、Enterprise Developer for Visual Studio で作成した COBOL プロジェクトを分析するために CCNet を構成する方法に関するガイドラインについていくつか説明します。
マシンに Enterprise Developer for Visual Studio をインストールして、マシンを CCNet に接続する必要があります。
コマンド ラインからのコード分析の実行で説明したコード分析の MSBuild パラメーターを使用して MSBuild ビルドのタスクを実行するように CCNet を構成します。詳細は、CruiseControl.NET のマニュアルを参照してください。
次の例では、Eclipse COBOL プロジェクトを分析するために Jenkins を構成する方法に関するガイドラインについていくつか説明します。開始する前に、マシンに Enterprise Developer for Eclipse をインストールしておく必要があります。マシンを Jenkins に接続し、マシンに Apache Ant をインストールする必要があります。
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