# CircleCI

## CircleCI Actions <a href="#circleci-actions" id="circleci-actions"></a>

[<mark style="color:blue;">CircleCI</mark>](https://circleci.com/) is a modern continuous integration and continuous delivery (CI/CD) platform. CircleCI automates build, test, and deployment of software.

Squadcast’s **Extension** with CircleCI enables you to rebuild projects from within the Squadcast platform.

This is primarily helpful in a situation where you want to quickly mitigate a *customer experience* issue by rolling back to an older successful build.

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

* Only the Account Owner and Users with the <mark style="color:red;">`Manage Extensions`</mark> permission will be able to enable, disable and manage Extensions in Squadcast

## Enabling CircleCI Extension <a href="#enabling-circleci-extension" id="enabling-circleci-extension"></a>

1. Navigate to **Settings** and select the **Extensions** tab from the left navigation sidebar
2. Move over to the CircleCI extension and click on **Integrate**

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-99396b63107ce4c5545c11f604c8497bd9339f2e%2Fcircle_ci_actions_1.png?alt=media&#x26;token=5879802c-16b8-4d93-8bbe-117709b31c64" alt="Enable CircleCI extensions" width="563"><figcaption></figcaption></figure>

3. In your CircleCI dashboard, move over to **User Settings**

![User setting in circleCI dashboard](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-ba6de461148e346d1ea935dca2b205a5f3c54fec%2Fcircle_ci_gb_1.png?alt=media)

4. Click on **Personal API Tokens** and then, **Create New Token** to create a new API token for Squadcast

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-aa4e3e85a38248ae7301e0b3472f59c136134d72%2Fcircle_ci_actions_3.png?alt=media" alt="Create new API token for Squadcast" width="563"><figcaption></figcaption></figure>

5. Use a meaningful name for the token like “Squadcast” or “Squadcast Incidents”. Click on **Add API Token** to save and view the API Token

<div><figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-2c2e417dd69840553313302cabb3d09f2fdadc64%2Fcircle_ci_actions_4.png?alt=media" alt="Give a name to API token"><figcaption></figcaption></figure> <figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-4f8808d60318214c012c5c0bf80500d80afd8fc5%2Fcircle_ci_actions_5.png?alt=media" alt="Create a new API token"><figcaption></figcaption></figure></div>

6. Copy the API Token shown in the CircleCI screen

![Click to copy the API token](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-08036a56dae19e5d9d60f8c273fe2e11405e9ea9%2Fcircle_ci_gb_2.png?alt=media)

7. Paste the copied API Token in the Squadcast CircleCI extension screen and click on **Save** to enable your CircleCI integration

![Paste the copied API Token in the Squadcast CircleCI extension](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-a5de24e4f55fc329fe3d43f6f5b041f859529cc1%2Fcircle_ci_gb_3.png?alt=media)

Your CircleCI integration is good to go and you will be able to perform CircleCI actions directly for any incident.

![Perform CircleCI actions directly for any incident](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-7960c273fc12bef6698f2cc49c049778d566ec81%2Fcircle_ci_gb_5.png?alt=media)

## Using CircleCI Actions <a href="#using-circleci-actions" id="using-circleci-actions"></a>

Now that the CircleCI extension is enabled, follow the steps below to understand how to take CircleCI actions from within Squadcast.

1. Navigate to the [<mark style="color:blue;">Incident Details</mark>](https://support.squadcast.com/incidents-page/incidents-details) page of an incident for which you want to take the CircleCI action. In this example, we’re choosing the incident below to demonstrate.
2. Click on **Actions** to see a list of allowed/enabled actions for your Organization

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-c32b48216027e55b8e9f4995a1f758c05d89df58%2Fcircle_ci_actions_9.png?alt=media&#x26;token=df5521ca-63c6-4bd8-add2-4fb647dd3ea8" alt="List of allowed/enabled CirlceCI actions within Squadcast" width="563"><figcaption></figcaption></figure>

3. Select **CircleCI** from the list of allowed/enabled actions

<div><figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-d3a931d4302c4aecd5c9bb03d4975c89b6b35265%2Fcircle_ci_actions_10.png?alt=media" alt="Select CircleCI from the list of allowed/enabled actions"><figcaption></figcaption></figure> <figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-f2f40f411d4adc539c15fb03b599957882a84fae%2Fcircle_ci_actions_11.png?alt=media" alt="Select CircleCI from the list of allowed/enabled actions"><figcaption></figcaption></figure></div>

4. Click on **Rebuild** from the **Actions** to see a list of projects you can take this action on

![Rebuild from the Actions to see a list of projects](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-e6114d21383dbc85e906e84cd3197cfc0aa56d0a%2Fcircle_ci_gb_6.png?alt=media)

5. Click on a **Project** of your choice and the **Build** you want to rollback to

<div><figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-9384d92c60b1570b3188844268018b72cbb48b6b%2Fcircle_ci_actions_13%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(3).png?alt=media" alt="Select the project to build via CircleCI"><figcaption></figcaption></figure> <figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-1a885be38fb199d3b17340f98eddf439c485b64b%2Fcircle_ci_actions_14.png?alt=media" alt="Build the project and rollback via CircleCI"><figcaption></figcaption></figure></div>

6. Click the **Rebuild** button to trigger the build again and you can see the link to the CircleCI build in the resulting screen\\

<div><figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-9a3e1a74c6ad77f027a685446c73df72cd61fe91%2Fcircle_ci_actions_15.png?alt=media" alt="Click the Rebuild button to trigger the build again"><figcaption></figcaption></figure> <figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-935f49cdee0f71a0f059631e75feb6302869e099%2Fcircle_ci_actions_16.png?alt=media" alt="Check the link to the CircleCI build"><figcaption></figcaption></figure></div>

You will also be able to see the actions performed in the **Incident Activity Timeline** on the right.

![Actions performed in the incident activity timeline in CircleCI](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-4c15e35347906974b6bbb9474898dcba8f2b04c6%2Fcircle_ci_gb_7.png?alt=media)

The link will take you straight to the CircleCI **Jobs View** screen showing the result of the triggered build action.

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-9facfbb0fada8712d907f21c43b631236ff19e91%2Fcircle_ci_actions_18.png?alt=media" alt="CircleCI job view dashboard" width="563"><figcaption></figcaption></figure>

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