Overview

In this article we will make the necessary modifications to a simple Bamboo project to scan a GitHub repository with SOOS.

Integration Steps

Open the SOOS App, browse to Integrate > CI/CD/Repo > CI/CD > Bamboo

  • Click the ""Download"" link and get the latest release of the soos.py and requirements.txt files

  • Create the following directory structure in your root codebase ""soos/workspace""

  • Place the soos.py and requirements.txt files under the ""soos"" directory

Technical details for the script can be found here: https://github.com/soos-io/soos-ci-analysis-python

Note the API Key and Client ID values, you will need these below.

Repo Setup

  1. Create a new folder in your GitHub repository: <repo_root>/soos/workspace/
  2. Place the requirements.txt and soos.py files <repo_root>/soos/ folder that you created in step # 1 above.
  3. Commit these 2 new files and the new folder path to GitHub.

Configure Bamboo

Build Setup

Navigate to your project’s job-task header and press the “Add task” button. Make sure this task has a predecessor task to checkout your repo’s source code.

Type ""Command"" into the search box and choose the Command task option.

 

Add The Build Configuration

Enter a task description, such as 'Run SOOS Scan'. Now, add the SOOS script from the SOOS App.

Note: If you are running Bamboo on Windows, you should use the example Windows Command script here.

Make sure to set the Project Name (which groups scans together) and the Build and Branch parameters. Providing the branch/build parameters allows us to tie together scans and issues, and provide more meaningful insights and actionability to you.

 

Setup Environment Variables

Create the SOOS_API_KEY and SOOS_CLIENT_ID environment variables, either under the Global Variables or the Plan Variables sections. These will serve as environment variables to be used by the SOOS CLI. Use the API Key and Client ID values you collected from the SOOS App.

Global Variables

Plan Variables

Run It

To run the SOOS CLI against your repository’s code, just execute a build or commit a change. The build will use the environment variables that you created for the API Key and Client ID.