Travis CI
Travis CI is a hosted, distributed continuous integration service used to build and test software projects hosted on GitHub and Bitbucket.
This how-to will provide a basic understanding of how add the Relyance Source Code inspector (SCI) into a typical build job.
Prerequisites:
- A source code repository needs to be available and connected to a Travis CI project.
- The
relyance.yamlfile needs to be in the source code root directory. - Grab the command line code from Step 2 of the Relyance Source Code Integration settings from your Relyance instance.

See more info about the SCI commands here.
Steps:
- Go to the source code repository project in question (in Github/Bitbucket/etc).
- If there is no config, setup the project and use the following yaml configuration:
os: linux
language: generic
matrix:
include:
- name: Run Relyance AI
services:
- docker
script:
- docker pull gcr.io/relyance-ext/compliance_inspector:release && docker run --rm -v `pwd`:/repo --env 'API_KEY=example:abcdefg0123456789abcdefg0123456789abcdefg' gcr.io/relyance-ext/compliance_inspector:release
- echo "Relyance Scan Complete"Use the command line found in your source code integration Step 2. If there is already a configuration file, integrate the relevant commands into it:
os: linux
language: generic
matrix:
include:
- name: Echo Test
script:
- echo "Hello World"
- name: Run Relyance AI
services:
- docker
script:
- docker pull gcr.io/relyance-ext/compliance_inspector:release && docker run --rm -v `pwd`:/repo --env 'API_KEY=example:abcdefg0123456789abcdefg0123456789abcdefg' gcr.io/relyance-ext/compliance_inspector:release
- echo "Relyance Scan Complete"- Once complete, click save your Travis CI configuration file to the root of your repository.
- Login to your Travis CI account.
- Select your project and if not already running, trigger a build.
- Go to your Dashboard to see your pipeline progress.
- If there are no errors, you should start to see SCI results in your Relyance tenant.

Appendix:
Source Code Integration Step 2 info:
Example Step 2 Command
| 1 | docker pull gcr.io/relyance-ext/compliance_inspector:release && \ |
|---|---|
| 2 | docker run --rm -v pwd:/repo --env 'API_KEY= example :abcdefg0123456789abcdefg0123456789abcdefg' gcr.io/relyance-ext/compliance_inspector:release |
- This command pulls the latest version of the Relyance Source Code Inspector.
- This command initiates the Relyance Source Code Inspector within a local Docker container, establishing a shared folder and providing the necessary tenant API credentials.