Skip to main content

TeamCity

This article shows you how to integrate Qwiet preZero into your TeamCity workflow to provide automated code analysis.

Prerequisites

This tutorial assumes that you have:

Step 1: Create your environment variables

In TeamCity, define the following environment variables containing authentication information for Qwiet:

VariableValue
SHIFTLEFT_ACCESS_TOKENYour Access Token

When running in a production environment, we recommend using a CI token as the access token. You can create your CI token in the Qwiet Dashboard.

Please note that the presence of any set environment variables will override those in a configuration file.

Step 2: Configure your build

Once you've defined your Qwiet authentication variables, you'll need to create a TeamCity job that executes Qwiet.

If you haven't already, log in to TeamCity and go to Project > Settings > General Settings > Build Configurations.

Next, click Edit. Select Build Step using the sidebar and click Add build step. This opens up the configuration window that allows you to define your new build step with the following information:

ParameterDefinition
Runner typeCommand Line
Step nameSL Analyze (or descriptive name of your choice)
Execute stepIf all previous steps finished successfully
Working directory<path-to-directory-for-built-project-pkgs>
RunExecutable with parameters
Command executable/usr/local/bin/sl
Command parametersanalyze

When done, save your changes.