Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

In Salesforce development, rollback capabilities are essential for managing and mitigating issues that arise from deployments. Rollback allows you to revert changes and restore the system to a previous, stable state. FlexDeploy, a comprehensive DevOps tool, offers several methods to facilitate rollback, including Versioned Artifacts, File Revisions, and Backups Repository. This documentation provides an overview of these rollback methods and guides you through their implementation in FlexDeploy.

Understanding Rollback

  1. What is Rollback?

Rollback is the process of reverting a system to a previous state. In Salesforce, this often means undoing changes to metadata such as Lightning Web Components, Lightning Flows, Apex Classes, and Layouts. Rollbacks are essential for correcting errors, addressing unforeseen issues, or reverting to a stable version of an application after a failed deployment.

  1. Why is Rollback Necessary?

  • Error Correction: During deployment, changes can introduce errors or conflicts. Rollback allows you to undo these changes and restore system functionality.

  • System Stability: Rolling back helps maintain system stability by reverting to a previously tested and stable state.

  • User Satisfaction: If a deployment causes issues for users, rolling back can quickly restore the previous, functional version, minimizing disruptions.

FlexDeploy and Rollback

FlexDeploy offers several options to rollbacks, each providing flexibility depending on the rollback needs. After each Deploy execution, FlexDeploy provides an option to initiate a rollback, allowing users to revert changes made during the deployment.

1-RollbackButton.png

1. Project Version (Versioned Artifacts)

FlexDeploy maintains a history of builds and deployments through versioned artifacts. Each build creates a new version of the package, allowing you to deploy any previous version of a package if you need to rollback to a prior state.

When to Use This Option: When you need to revert to a previous state for all files or a specific files within a package, you can use Project Version Source Type for rollback. This option is ideal if you want to restore the package or individual files to a prior state quickly and efficiently.

a. Navigate to the Package Execution and identify the previous version.

2-PreviousVersion.png

b. Click on the Rollback - Select Project Version Source Type and previous version as Rollback Value.

ST-ProjectVersion.png3-RollbackValue.png

c. Click Submit to initiate the rollback process.


2. SCM Revision

When files are committed to a source control system (such as GitHub, GitLab, or Azure), a commit history and file revisions are created. FlexDeploy can leverage these revisions for rollback.

When to Use This Option: When you need to revert to a prior state for one or specific files within a package, you can use SCM file revisions for those files. This option is ideal if you only need to restore individual files or a subset of files to a previous version in a package.

a. Click on the Rollback - Select SCM Revision Source Type and File Revision as Rollback Value.

ST-SCM.png

b. Click Submit to initiate the rollback process.


3. Backups Repository

FlexDeploy takes backup of the metadata from the target org before deployment and stores these backups in a designated Backups Repository on the FlexDeploy server. Backup Repository needs to be configured in order to use this option.

When to Use This Option: When you need to revert to the previous state of files that were affected by the current deployment, you can use the Backups Repository for rollback. This option is particularly useful if you want to restore files to their pre-deployment state. Before deployment, FlexDeploy saves a backup of the affected files, allowing you to deploy these backups if a rollback is necessary. This option ensures that you can restore files to their original state before the recent changes were applied.

a. To view or download a backup, navigate to the deployment where the backup was created. Click on Artifacts, and the Backups will be displayed below the Artifacts.

Backup3.png

b. To restore the backed-up files, Click on the Rollback - Select Backup Repository Source Type and current version as Rollback Value.

ST-Backup.png

c. Click Submit to initiate the rollback process.

d. Alternatively, you can add the backed-up files to source control and manually build and deploy them.


4. Delete (Rollback Option for Deleting Files)

The rollback also allows you to remove/deletion of files that were newly deployed or mistakenly deployed to the target org. This option is useful when you need to undo changes by deleting specific files or components from the target org.

If you wants to delete files from the target Salesforce Org as a part of a rollback, follow these steps:

a. Click on the Rollback - Select the Delete option, use the toggle button to select the specific files that you want to delete.

Delete.png

b. Click Submit to initiate the rollback process.


Rollback capabilities in FlexDeploy for Salesforce development offer flexibility, precision, and confidence in deployment management. Whether you are reverting a full deployment or rolling back specific components, FlexDeploy’s versioned artifacts, file revisions, and backups repository provide the tools necessary to ensure system stability and minimize downtime. By integrating rollback strategies into your deployment workflow, you can ensure smoother, more reliable Salesforce development and maintenance.

  • No labels