> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/sast-and-sca/prezero/static-analysis-sast/workflows/travis.md).

# Travis

This article shows you how to integrate Qwiet AI by Harness into your Travis workflow to provide automated code analysis.

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

This tutorial assumes that you have:

* [Set up Travis](https://docs.travis-ci.com/user/tutorial/) to build your apps
* [Set up Qwiet AI by Harness](broken://spaces/uPVBkglG6gsk2SsnsKgG/pages/fDfomI4jhzwCNFxmGSLc) onto your Bamboo server

## Integration options <a href="#integration-options" id="integration-options"></a>

There are two ways you can integrate Qwiet into your Travis builds:

1. Configuring the YAML file
2. Customizing the container

### Option 1: Configuring the YAML file <a href="#option-1-configuring-the-yaml-file" id="option-1-configuring-the-yaml-file"></a>

With both the hosted and the on-prem versions of Travis, you can [configure the **travis.yaml** file](https://docs.travis-ci.com/user/customizing-the-build) to run Qwiet. The following YAML sample shows how you can modify the config file to obtain Qwiet, authenticate with Qwiet account, and run the code analysis process:

```
language: java
dist: trusty

install:
 - curl https://cdn.shiftleft.io/download/sl > /usr/local/bin/sl && chmod a+rx /usr/local/bin/sl
script:
 - <run your tests/tasks>
after_script:
 - sl analyze
```

![](/files/CRrxFX9wuboXxDrdB2dv)

![](/files/DfHDmRpYn5HJOmhRtTva) ![](/files/P5vj8JOtHNJWVEvAqKym)

### Authentication <a href="#authentication" id="authentication"></a>

Set an [environment variable](https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml) with your CI config token instead of explicitly providing it in your config script.

When running in a production environment, we recommend using a CI token as the access token. You can [create your CI token](/sast-and-sca/prezero/integrations/tokens.md) in the Qwiet Dashboard.

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

### Option 2: Customizing the container <a href="#option-2-customizing-the-container" id="option-2-customizing-the-container"></a>

With the on-prem versions of Travis, you can customize the container to run Qwiet.

Each Travis build uses a Docker container. You can modify the build containers to install and run Qwiet by [editing the Dockerfile](https://docs.travis-ci.com/user/enterprise/build-images/#Customizing-build-images).
