Configuring a Build to Run a Code Insight Scan
Follow these steps to configure a build that runs a Code Insight scan.
-
Log into TeamCity, select your project, and create a new Build Configuration.
-
To configure a build step to run a Code Insight scan, select on your build configuration, and click Add Build Step.
-
From the Runner type list, select Command Line.

-
Configure the Command line build step for the Code Insight scan:
-
Enter a value for Step name (for example,
Codeinsight Scan) to identify the step. -
In the Run field, select Custom script.
-
In the Custom script field, provide the following:
C:\GenericScanPlugin\example\bin\TeamCity_FNCIScan.bat <CODEINSIGHT_PROJECT_NAME> <CODEINSIGHT_SERVER> <JWT_TOKEN> <SCAN_DIR>Replace the following variables in the script with the appropriate information:
-
<CODEINSIGHT_PROJECT>—The name of the project you created in Code Insight to capture the inventory.
-
<CODEINSIGHT_SERVER>—The URL of the Code Insight Core Server (for example,
http://1.1.1.1:8888/codeinsight). -
<JWT_TOKEN>—Your JSON Web Token (JWT) used to authorize user access to the Code Insight functionality. Generate this token using the Code Insight Web UI and then copy and paste it here. For more information, see Providing an Authorization Token.
-
<SCAN_DIR>—The directory that you want to scan.

-
When complete, your build configuration should look like this:
