CI Job Rollback

The CI JOBS screen is best viewed when the zoom setting is set to 80% on your chrome/firefox browser.

The rollback feature is very useful to roll back a deployment as soon as you realize that something went wrong with the CI job or you accidentally deploy something unwanted.

How to roll back a deployment

Here we will learn how to roll back deployment with your CI Jobs. The objective is to roll back to the old release or version of a deployment.

Prerequisites:

  • The Rollback checkbox is selected while creating a new CI job

Steps:

  1. Go to the CI JOB RESULTS screen and choose the deployment label from the list for which you would like to trigger the rollback.

  1. Find the list of metadata components that will be rollbacked (under the API Supported > Constructive changes section). By default, all the components that were part of the deployment are selected.

  1. In the "Choose your Pre/ Post Destructive Changes," you’ll see the list of metadata components that are present in your target environment but not in your source environment. Simply tick the box next to a component you want to delete, and that component will be deleted when you deploy. The excluded component's details are logged and can be found in Rollback Iteration Log.

  1. You can choose the destructive changes method to delete your components from your target environment to sync up the changes.

  • Post Destructive Changes: The post destructive changes feature will delete the unwanted fields or metadata components from your destination environment when the deployment is successful.

  • Pre-Destructive Changes: Pre-destructive changes will delete unwanted fields or metadata components from your destination environment before the deployments begin.Point to Remember:For active flow metadata, you must add the version number before continuing with destructive changes. See the FlowDefinition guide for more detail.

  1. The API Un-Supported section will list down all the unsupported API metadata types. You can include these components as a part of pre or post-destructive changes as well.

Point to Note: We advise against using the unsupported APIs components during the rollback process, as this might result in deployment rollback failure.

  1. Under Additional Deployment Options, you have below options to choose from:

    1. Validate Only: This allows you to prevalidate the deployment so you can catch any problematic changes early and make sure that when the time comes to deploy, you’ll be able to release successfully. Actual deployment doesn't happen when this feature has been opted.

    2. Deploy purge on delete: Salesforce uses a Recycle Bin metaphor for data that users delete. Instead of removing the data, Salesforce flags the data as deleted and makes it visible through the Recycle Bin. AutoRABIT has a provision to identify the components that users want to delete and permanently delete them from their Salesforce environment instead of keeping the deleted components in recycle bin. Once purged, they can not be recovered.

    3. Ignore warnings: This option will allow the rollback to continue even if there are warnings that can cause the deployment to fail.

  1. Select the Apex Test level to validate your deployment. For detailed information on each test level, refer to the article: Apex Unit Tests

  1. Click Rollback.

  2. After successfully rolling back your changes, your deployment will be stored in the CI Job Results screen, tagged as a rollback. From here, you can view the usual deployment report, download the package, and even re-deploy the rollback if you wish!

Last updated