> For the complete documentation index, see [llms.txt](https://knowledgebase.autorabit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.autorabit.com/product-guides/arm-1/arm-features/automation-and-ci/ci-job-rollback.md).

# Rolling Back a CI Build

{% hint style="info" %}
For the best experience, set your browser zoom to **80%** in Chrome or Firefox.
{% endhint %}

### Overview

AutoRABIT ARM has enhanced the Rollback functionality in the **New UI** to support multiple rollback operations from the same CI Job execution.

Previously, users could initiate a rollback only once for a CI Job execution. After initiating the rollback, the Rollback option was no longer available, even if additional metadata needed to be rolled back.

With this enhancement, users can perform multiple rollbacks and selectively roll back metadata from the complete deployed package or from specific revisions.

#### Key Enhancements

* **Multiple Rollbacks:** Perform multiple rollback operations from the same CI Job execution.
* **Revision-Based Rollback:** Select metadata associated with individual revisions.
* **Flexible Metadata Selection:** Choose metadata using the All Metadata or Revision Based Changes tabs.
* **Duplicate Selection Prevention:** Prevent the same metadata from being selected multiple times.
* **Rollback Tracking:** Successfully rolled-back metadata is excluded from subsequent rollback selections.
* **Retry Failed Rollbacks:** Metadata that fails during rollback remains available for another attempt.

**Availability:** ARM New UI – CI Jobs.

***

### 1. Accessing Rollback from CI Job History

To initiate a rollback:

1. Log in to AutoRABIT ARM.
2. Navigate to **CI Jobs > CI Job History**.
3. Select the required CI Job.
4. Locate the build for which you want to perform a rollback.
5. Click the **Rollback** option for the corresponding build.
6. The Rollback screen opens, displaying the available metadata selection options.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F7cF1K51N6Rlxd4UCTSy8%2Fimage.png?alt=media&amp;token=217bf25b-b46c-405d-8f13-3362667e43b8" alt=""><figcaption></figcaption></figure>

**Note:** The Rollback option remains available as long as eligible metadata from the original CI Job execution has not been successfully rolled back.

### 2. Selecting Metadata for Rollback

The Rollback screen provides two tabs:

#### All Metadata

The **All Metadata** tab displays the complete metadata available from the prepared rollback package, regardless of the revision that contributed the changes.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FD1xmmHZkpu77BDEsWA1z%2Fimage.png?alt=media&amp;token=5bc1ef6b-86e5-423a-9e62-d8237cd10227" alt=""><figcaption></figcaption></figure>

This tab retains the existing rollback structure, including:

* API Supported metadata
* Constructive changes
* Destructive changes
* API Unsupported metadata
* Pre/Post destructive changes, where applicable

**Steps:**

1. Open the Rollback screen.
2. Select the **All Metadata** tab.
3. Review the available metadata components.
4. Select the components you want to roll back.
5. Proceed with the rollback operation.

This option is useful when you want to roll back selected metadata from the overall CI Job deployment package without reviewing individual revisions.

#### Revision Based Metadata selection

The **Revision Based Changes** tab allows users to view and select metadata based on the revisions that contributed changes to the deployed package.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fgge0uYUv9Y3rs7G4CkSV%2Fimage.png?alt=media&amp;token=146b7c6a-8343-443f-b5cd-797de47a0401" alt=""><figcaption></figcaption></figure>

Each applicable revision displays information such as:

| Field                | Description                                                              |
| -------------------- | ------------------------------------------------------------------------ |
| Revision Number      | Identifies the revision associated with the metadata changes.            |
| Number of Components | Displays the number of metadata components associated with the revision. |
| Metadata Type        | Displays the Salesforce metadata type.                                   |
| Metadata Name        | Displays the metadata component name.                                    |
| Constructive Changes | Identifies added or modified metadata.                                   |
| Destructive Changes  | Identifies deleted metadata.                                             |
| Pre/Post Options     | Displays applicable destructive change options.                          |

**Steps:**

1. Open the Rollback screen from CI Job History.
2. Select **Revision Based Changes**.
3. Review the available revisions.
4. Select the required revision.
5. Review the metadata components associated with that revision.
6. Select the components you want to roll back.
7. If required, select additional components from other revisions.
8. Proceed with the rollback operation.

**Note:** Users can select metadata from one or multiple revisions within the same rollback operation.

***

### 3. Performing Multiple Rollbacks

ARM allows multiple rollback operations against the same original CI Job execution.

After a successful partial rollback, the Rollback option remains available for the remaining eligible metadata.

#### Example

Consider a CI Job deployment containing 10 eligible metadata components.

| Rollback Operation        | Components Rolled Back | Remaining Components |
| ------------------------- | ---------------------- | -------------------- |
| Original CI Job Execution | 0                      | 10                   |
| First Rollback            | 4                      | 6                    |
| Second Rollback           | 3                      | 3                    |
| Third Rollback            | 3                      | 0                    |

After the first rollback, users can return to the same CI Job execution and roll back additional metadata.

Once all eligible metadata components have been successfully rolled back, the Rollback option becomes unavailable.

#### Steps to Perform an Additional Rollback

1. Navigate to **CI Jobs > CI Job History**.
2. Open the original CI Job execution.
3. Click **Rollback**.
4. Select either **All Metadata** or **Revision Based Changes**.
5. Review the remaining eligible metadata.
6. Select the required components.
7. Initiate the rollback.

This process can be repeated until all eligible metadata has been successfully rolled back.

***

### 4. Duplicate Metadata Selection Handling

The same metadata component may appear in multiple revisions or in both rollback selection tabs.

ARM automatically prevents duplicate selection within the same rollback operation.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F4JVCNjlCWDQiNz42mBcl%2Fimage.png?alt=media&amp;token=a6825a3b-22b4-4552-9424-9682463e82f1" alt=""><figcaption></figcaption></figure>

#### Across Revisions

For example:

* Revision 1 contains `ApexClass: AccountService`.
* Revision 2 also contains `ApexClass: AccountService`.

If you select `AccountService` from Revision 1, the same component under Revision 2 becomes disabled.

If you deselect it from Revision 1, it becomes available again under Revision 2.

#### Between All Metadata and Revision Based Changes

The same behavior applies across both tabs.

* Metadata selected under All Metadata becomes disabled under Revision Based Changes.
* Metadata selected under Revision Based Changes becomes disabled under All Metadata.
* Deselecting a component makes it available again in the other tab, provided it has not already been successfully rolled back.

This ensures that each metadata component is included only once in the rollback request.

***

### 5. Handling Failed Rollbacks

ARM tracks rollback completion at the metadata component level.

If a rollback fails, the affected metadata remains eligible for another rollback attempt.

For example, if five metadata components are selected and only three are successfully rolled back:

* The three successfully rolled-back components are excluded from subsequent rollback selections.
* The two failed components remain eligible for another attempt.
* The Rollback option remains available.

This allows users to retry failed metadata without selecting components that have already been successfully rolled back.

***

### 6. Rollback History

Each rollback operation maintains its own execution details and remains associated with the original CI Job execution.

Rollback information includes:

* Rollback status
* Selected metadata components
* Execution timestamp
* Deployment logs
* Salesforce deployment results

This provides visibility into the rollback operations performed against a particular CI Job execution.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://knowledgebase.autorabit.com/product-guides/arm-1/arm-features/automation-and-ci/ci-job-rollback.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
