# CircleCI Integration

[<mark style="color:blue;">CircleCI</mark>](https://circleci.com/) is a continuous integration and continuous delivery platform that can be used to implement DevOps practices.

You can use our CircleCI integration to route details events from CircleCI to the right users in Squadcast.

## How to integrate CircleCI with Squadcast

### In Squadcast: Using CircleCI as an Alert Source

1. Navigate to **Services** -> **Service Overview** -> select or search for your Service. Expand the accordion -> In the **Alert Sources** section, click **Add**.

<figure><img src="https://github.com/solarwinds-cloud/sq-Gitbook/blob/main/.gitbook/assets/21spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-0fe7b657e32aa4dc525b39230eeb6f7628304674%2FScreenshot2022-07-29at12.09.33PM11.png" alt="How to configure CircleCI integration in Squadcast" width="563"><figcaption></figcaption></figure>

2\. Select **CircleCI.** Copy the displayed **Webhook URL** to [<mark style="color:blue;">configure</mark>](#create-a-squadcast-webhook-alert-in-circleci) it within **CircleCI.** Finish by clicking **Add Alert Source** -> **Done.**

<figure><img src="https://github.com/solarwinds-cloud/sq-Gitbook/blob/main/.gitbook/assets/21spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-1f9e2e903e6575a613f2db0d1f569017512a1d3d%2Fcircleci_0.png" alt="Steps to add CircleCI integration to a service in Squadcast" width="563"><figcaption></figcaption></figure>

{% hint style="warning" %}
**Important:**

When an alert source turns <mark style="color:green;">Active</mark>, it’ll show up under Configured Alert Sources. You can either generate a test alert from the integration or wait for a real-time alert to be generated by the Alert Source.\
\
An Alert Source is <mark style="color:green;">active</mark> if there is a recorded incident via that Alert Source for the Service.
{% endhint %}

## In CircleCI: Create a Squadcast Webhook Alert

1\. Log in to your CircleCI dashboard. Navigate to the **Projects** section, click **...** and select **Project Settings**

<figure><img src="https://github.com/solarwinds-cloud/sq-Gitbook/blob/main/.gitbook/assets/21spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-7f105e86e08d824b599473b965d4d3e37a7ceff9%2Fcircleci_2.png" alt="How to create a project in CircleCI" width="563"><figcaption></figcaption></figure>

2\. Under the **Project Settings**, navigate to the **Webhooks** section. Then click on **Add Webhook**

<figure><img src="https://github.com/solarwinds-cloud/sq-Gitbook/blob/main/.gitbook/assets/21spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-11b54b807b9bfd8fb10d32903eb8a93f2ec9914e%2Fcircleci_3.png" alt="How to add Webhook in CircleCI" width="563"><figcaption></figcaption></figure>

3\. Put in the **Webhook name** and paste the previously copied Squadcast Webhook URL in the **Receiver URL** placeholder.

Check the checkbox for both the **Events** - **Workflow Completed** & **Job Completed**

<figure><img src="https://github.com/solarwinds-cloud/sq-Gitbook/blob/main/.gitbook/assets/21spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-d14559724e7925680820a01f2a4b8b7424c4ba15%2Fcircleci_4.png" alt="How to configure a Webhook in CircleCI" width="563"><figcaption></figcaption></figure>

That's it, you are good to go! Your CircleCI integration is now complete.

* Whenever CircleCI fires an alert, an incident will be created in Squadcast for it.
* Once the **Success** alert is sent, it will automatically be resolved in Squadcast.

*Have any questions?* [*Ask the community*](https://community.squadcast.com/view/home)*.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.squadcast.com/integrations/alert-source-integrations-native/circleci.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
