# Jenkins

## What is Jenkins?

Jenkins is an open-source Continuous Integration server developed in Java that helps automate parts of the software development process. It supports the full development lifecycle, including:

* Building
* Testing
* Documenting
* Deploying

***

## How to Trigger a Jenkins Job in CI/CD

You can configure Jenkins to trigger jobs automatically after a successful deployment in a CI job within AutoRABIT.

### Steps:

1. Go to the **New CI Job** screen.

   ![New CI Job](/files/UPMWEG6fTkXKUYrHjQEB)
2. Choose a CI Job type from:
   * Deploy SFDX source from Version Control
   * Deploy from Salesforce Org
   * Deploy from Salesforce Org with a Version Control backup
   * Deploy from Version Control
   * Install an Unlocked Package from a Version Control Branch
3. Navigate to the **Deploy** section.
4. Check **On Successful Deployment** to enable post-deployment actions.
5. Check **Trigger Jenkins Job** to enable Jenkins job execution upon success.

   ![Trigger Jenkins](/files/loIMPrMH6TlOpYS4Xw3t)
6. Fill in the required fields:
   * **URL:** Full Jenkins server URL\
     \&#xNAN;*Example:* `http://localhost:8080` or `http://<hostname>:8080`

     ![Jenkins URL](/files/CdgadovC57EAQ7jjr9Pk)
   * **Job Name:** Name of the Jenkins project (e.g., `HelloWorld`)

     ![Job Name](/files/LwW7cRcBGAy4VIKxU7YD)
   * **Job URL:** Relative job path\
     \&#xNAN;*Example:* `job/HelloWorld`

     ![Job URL](/files/5EjUKRKlv5fyhpfcRBeD)
   * **User ID:** Jenkins user triggering the job

     ![User ID](/files/1TkCZCJPXZ2CEkG60f97)
   * **API Token:** Found under **Profile > Configure** in Jenkins

     ![API Token](/files/2ejGgSuz0xx1FmpcWZ4k)
   * **Build Parameters (Optional):** Define build parameters and values. To add multiple parameters, click the plus `+` icon.

     ![Parameters](/files/FSkhvUSuRO7PkCWtwBFj)

***

{% hint style="info" %}

#### Important Note:

Ensure Jenkins allows URL parameter injection.

Steps:

1. Go to your Jenkins project configuration.
2. In the **General** section, enable **This project is parameterized**.
3. Click **Add Parameter** and choose your parameter type.
4. Set the parameter name and default values.
5. Click **Save**.

Your Jenkins job can now accept and process parameters passed from AutoRABIT.
{% endhint %}


---

# 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://knowledgebase.autorabit.com/product-guides/arm-1/integration-and-plugins/jenkins.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.
