TeamCity
This article shows you how to integrate Qwiet AI by Harness into your TeamCity workflow to provide automated code analysis.
Prerequisites
This tutorial assumes that you have:
Set up Qwiet AI by Harness onto your TeamCity server
Step 1: Create your environment variables
In TeamCity, define the following environment variables containing authentication information for Qwiet:
Variable
Value
SHIFTLEFT_ACCESS_TOKEN
Your 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:
Parameter
Definition
Runner type
Command Line
Step name
SL Analyze (or descriptive name of your choice)
Execute step
If all previous steps finished successfully
Working directory
<path-to-directory-for-built-project-pkgs>
Run
Executable with parameters
Command executable
/usr/local/bin/sl
Command parameters
analyze
When done, save your changes.
Last updated
Was this helpful?