> For the complete documentation index, see [llms.txt](https://docs.itoc360.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.itoc360.com/integrations/inbound-integrations/devops-and-ci-cd/jenkins-integration.md).

# Jenkins Integration

[Jenkins](https://www.jenkins.io/) is an open-source automation server widely used for building, testing, and deploying software. Through its Notification plugin, Jenkins can send build lifecycle events to external systems — including ITOC360 — whenever a job changes state.

### Prerequisites

* A running Jenkins instance
* The **Notification Plugin** installed (available in the Jenkins plugin marketplace)
* An ITOC360 source token for Jenkins

***

### Creating a Pipeline Job

Start by navigating to the Jenkins dashboard and clicking **New Item** in the left sidebar. Enter a name for your job — something like `ITOC360` works fine — and select **Pipeline** as the item type.

<figure><img src="/files/ELbCiVjsfCmSEsxrYsrL" alt=""><figcaption></figcaption></figure>

Once you've selected Pipeline, click **OK** to proceed to the configuration page.

### Configuring the Notification Endpoint

On the job configuration page, scroll down to the **Job Notifications** section. Click **Add Endpoint** to reveal the endpoint settings. Fill in the fields as follows:

* **Format:** JSON
* **Protocol:** HTTP
* **Event:** All Events
* **URL Source:** Plain Text
* **URL:** ITOC360 webhook URL with the token appended as a&#x20;

The URL should look like this:

```
https://api.itoc360.app/functions/v1/events?token=<x-itoc360-token>
```

Leave Timeout at the default (30000 ms) and Retries at 0 unless you have a specific reason to change them.

<figure><img src="/files/UN48hoJTwdN2lNslFlFH" alt=""><figcaption></figcaption></figure>

***

### Adding the Pipeline Script

Scroll down to the **Pipeline** section. Make sure the Definition is set to **Pipeline script**, then paste the following into the Script field:

```groovy
pipeline {
    agent any
    stages {
        stage('Test') {
            steps {
                echo 'Build active'
            }
        }
    }
}
```

This is a minimal pipeline that runs a single stage. In a real setup, this would contain your actual build and test steps. The important part for ITOC360 is the Notification endpoint you configured above — it fires regardless of what the pipeline does.

<figure><img src="/files/I7ZK3Cv2mo6vVsin32rY" alt=""><figcaption></figcaption></figure>

Click **Save** when done.

### How It Works

Once the job is saved, Jenkins will send a notification to your ITOC360 endpoint at each phase of the build lifecycle: **QUEUED**, **STARTED**, **COMPLETED**, and **FINALIZED**. ITOC360 uses the `build.phase` and `build.status` fields to determine whether the event is an alert or a resolution:

* A build reaching **FINALIZED** with status **SUCCESS** is treated as a **RESOLVE**
* Any other phase or a failed build is treated as an **ALERT**

Priority is mapped from the `build.status` field. Failed builds come in as HIGH priority, unstable and aborted builds as MEDIUM, and successful builds as LOW.

### Testing the Integration

To verify everything is wired up correctly, go back to the job page and click **Build Now** in the left sidebar. Jenkins will immediately queue and run the pipeline, sending notifications to your itoc360 endpoint at each phase transition. You should see a new alert appear in your itoc360 dashboard within a few seconds, with the source set to your Jenkins integration and the provider shown as Jenkins.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.itoc360.com/integrations/inbound-integrations/devops-and-ci-cd/jenkins-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
