# Buildkite Pipelines

![buildkite-logo-on-light-d2f7ffe9.png](https://assets.relyanceuat.xyz/images/docs/9304244241549/9304236032525.png)
Buildkite Pipelines is a hosted, distributed continuous integration service used to build and test software projects.

This how-to will provide a basic understanding of how add the Relyance Source Code inspector (SCI) into a typical build job.

### Prerequisites:

1. A source code repository needs to be available in Buildkite.
2. Ensure Docker is available on the Buildkite agent.
3. The `relyance.yaml` file needs to be in the source code root directory.
4. 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](#h_01G4G9XZTM8VF76Z6W9CWPDS57)**.

![Step-2.png](https://assets.relyanceuat.xyz/images/docs/9304244241549/15210681888653.png)

### Steps:

1. Log in to Buildkite.
2. Create a new pipeline / or select the pipeline you wish to add to. i. If creating a new pipeline, select the repository you would like to connect. ii. If adding to an existing pipeline, click **Add**> **Run script or command**.
3. Paste the **Step 2** command into the the **Commands to run** box in the **Steps** section.
4. Click **Create pipeline**/ **Save Steps**.
5. Once ready, go to the pipeline and click the **New Build** button.
6. If there are no errors, you should start to see SCI results in your Relyance tenant.

![Buildkite-2a.png](https://assets.relyanceuat.xyz/images/docs/9304244241549/15212053536653.png)

### 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 |

1. This command pulls the latest version of the Relyance Source Code Inspector.
2. This command initiates the Relyance Source Code Inspector within a local Docker container, establishing a shared folder and providing the necessary tenant API credentials.
