Skip to main content

Adding a Checkmarx One Build Step in TeamCity

The Checkmarx One plugin enables you to add a Checkmarx One scan as a build step in TeamCity.

Prerequisites for creating a build step:

If you would like to use a proxy server, you can set an environment variable in your Checkmarx One TeamCity project, see below.

Configuring a Checkmarx One Build Step

To configure a build step:

  1. In the TeamCity Projects tab, under the project that you created for your Checkmarx One scan, click Build.

    6034326714.png

    The Build page for that project is shown.

  2. On the Build page, click Edit Configuration Settings, and then in the Settings menu, click Build Steps > + Add build step.

    The New Build Step configuration settings are shown.

    6034326720.png
  3. For Runner type, select Checkmarx One Scan.

    The Checkmarx One configuration settings are shown.

    6150357776.bmp
  4. Optionally enter a Step name.

  5. Under Checkmarx Scan Settings, to apply the settings defined in your Global Settings, select the Use Global Settings for Checkmarx One Server checkbox. If you would like to apply project specific settings, then leave the checkbox deselected (default) and enter the settings needed for this project. For more information, see Configuring Global Integration Settings for Checkmarx One TeamCity Plugin.

  6. For Project name, specify a name for this Project in Checkmarx One.

    Notice

    If you enter the name of an existing Project, then this build step will trigger a scan of that Project. If you enter a new Project name, then, when a scan is triggered it will create a new Project in Checkmarx One with the specified name.

  7. For Branch name, specify the name of the branch name to be used in Checkmarx One. (Default: %teamcity.build.branch%)

    Notice

    If you enter the name of an existing branch, then this build step will trigger a scan of that branch. If you enter a new branch name, then, when a scan is triggered it will create a new branch in Checkmarx One with the specified name.

  8. To apply the additional parameters defined in your Global Settings, select the Use global additional parameters checkbox. You can view the global parameters by clicking Show global parameters. If you would like to apply project specific parameters, then leave the checkbox deselected (default) and enter the parameters needed for this project. See documentation here.

  9. Click Save.

    The build step is created and the build steps page is shown.

    6034326732.png
  10. By default scans will be triggered when a VCS check-in is detected. If you would like to customize the triggers, select the Triggers tab and specify the triggers for running Checkmarx One scans. Options include scheduled runs, build step completion and repo commits.

  11. You can optionally adjust General Settings, Version Control Settings, and other options.

Setting up a Proxy Environment Variable (Optional)

To set up an environment variable:

  1. In the TeamCity Projects tab, under the project for which you wish to create a proxy, click Build.

    6135481179.png

    The Build page for the project is shown.

  2. On the Build page, click the Settings tab.

    6135481185.png
  3. Scroll down to the Parameters section, and click edit.

    6135481191.png
  4. Click the + Add new parameter button.

    6135481197.png

    The Add New Parameter window is shown.

    6135481203.png
  5. Enter the following configuration information:

    • In the Name field, enter env.HTTP_PROXY.

    • In the Kind field, select Environment variable (env.).

    • In the Value field, enter the value of your proxy address.

    • Optionally edit the Spec field.

  6. Click Save.

    The proxy parameter is created and shown in the Environment Variables table.