Continuous Integration and Continuous Development (CI/CD) is constantly talked about. Anyone working in the software or IT industry has heard of the term. In fact, a report by CD foundation reveals interesting stats on how orgs and teams use CI/CD to achieve their goals. It says 47% of developers use CI/CD in one way or another while one in five developers surveyed uses CI/CD to automate all aspects of building, testing, and deployment of code!
And with DevOps picking up steam, DevOps processes can automate a lot of the regular activities, such as validating and testing software. Increased adoption of CI/CD has led to an improved performance for lead time on code changes and fixing downtime issues.
But ensuring a fully automated and reproducible build, including testing, which runs many times a day, is challenging. This automation is extremely important because it allows each developer to integrate daily and frequently which reduces integration problems.
It’s here that CI tools like Copado, Autorabit, or Jenkins can help. Orgs can set up the CI tools of their choice in the repository as well as define when the test suites should run. Once the configuration is done, the developers just need to set the required rules and trigger the script, which continues to build, run test suites, and deploy the component to the target environment/destination. Teams can analyze the results and fix bugs via the logs provided by the CI tools at the end of script execution.
Choosing a suitable tool will make all the difference. Today, we’re going to focus on how you can enhance the efficiency of Salesforce DevOps by automating processes with Jenkins.
What is Jenkins and Why Do Businesses Use It?
Jenkins is an open-source CI/CD server and a leader in the DevOps space with a rich set of integrations and community support. Jenkins has been around for a long time and is being used by businesses to accelerate the software development process through automation. Businesses that wish to maintain a consistent enterprise toolchain across the technology stacks continue to use Jenkins for their Salesforce release management practice as well.
A notable aspect of Jenkins is its plugins, which allow the integration of several DevOps stages. through which it achieves Continuous Integration. As to why businesses use it, the tool has a lot going for it:
- Being an open-source tool, it offers great community support.
- It’s easy to install and free to use.
- Offers 1000+ plugins to enable it to integrate with most of the development, testing, and deployment tools.
- Developers can easily code if the plugin doesn’t exist and automate processes per requirements.
- Being built with Java, it’s portable on all the major platforms.
Does Jenkins Have Limitations?
Salesforce developers often sing praises about Jenkins. However, there are a couple of challenges with the tool.
- Governor limits: For Salesforce Orgs that are heavy in metadata (with >10, 000 members), the deployments are huge as well, resulting in deployment errors due to Governor limits as well as dependencies.
- Bulk deployments: It’s difficult to isolate the changes for a particular user story for the QA team to test as there will be multiple commits from developers and all of them are packaged and deployed as one metadata package.
- Complex metadata: Some of the Salesforce metadata types like Profiles and Layouts are XML-driven and are tricky from a change management perspective as they have references from multiple other metadata items. It’s important to filter out some of the XML tags in these files before deployment.
- Testing effort: With the metadata API available for Apex test execution, you can only run the entire local tests in Sandbox or update specific tests for each build separately, which could be time-consuming in a few cases.
CloudFulcrum Can Help Businesses Get Past These Limitations
These limitations of Jenkins aren’t a big issue in itself. As mentioned earlier, the biggest advantage Jenkins offers is the flexibility for developers to build a plugin that suits the specific requirements of a business.
CloudFulcrum has developed a set of Jenkins plugins (for both metadata and SFDX) to accelerate the DevOps efforts of Salesforce customers. Here is a quick snapshot:
1. Lean Deployments
With the lean deployments plug-in, you can analyze the Git log to identify the added/modified/deleted components (including parent-child relationships) as well as create a custom metadata bundle based on the modifications. This has been shown to reduce the size of the deployment artifact by more than 90% and reduce deployment errors significantly.
2. Delta Deployments
With this plugin, you can update the XML files with only the desired XML tags, deleting all the unwanted references/dependencies and ensuring an optimal deployment package.
3. Dynamic Apex Test Detection
This plugin will help you identify what Apex test classes are to be run, including dependencies based on the Apex classes that are part of the package created with lean and delta deployments. This has been shown to bring down the Apex testing time across multiple Sandboxes by more than 95% as you need to run only the “required” tests, saving time and resources.
4. Quality Gates
This plugin lets you document guidelines for configuring the plugins like CheckMarx, ApexPMD, and Sonarqube, which are available to be set up as quality gates in Jenkins jobs to ensure a “shift left” of quality and security into the Salesforce development practice.
Enhance Salesforce DevOps with CloudFulcrum Via Jenkins
CloudFulcrum offers “Salesforce DevOps as a Service,” a purpose-driven advisory/managed services offering aimed at setting up a solid DevOps practice and accelerating the DevOps vision of customers. Here’s what we offer:
- DevOps assessment and maturity modeling: Our DevOps assessment framework offers a comprehensive review of your current Salesforce practice in Sandbox management, degree of deployment automation, GIT branching and conflict management, data migration, and testing, defect analysis, and automation. After a review, we present the complete DevOps maturity report along with our recommendations (short-term and long-term) to you to finalize the scope.
- Set up efficient CI/CD pipelines: We’ll customize the Jenkins plugins per your needs and integrate them into your CI/CD pipelines to reduce your deployment and apex testing effort. Our plugins have demonstrated 90% savings, resulting in making your DevOps process more efficient and delivering a higher ROI on your DevOps investment.
- Set up quality gates: We’ll set up quality gates for your Jenkins pipelines that will be customized at each environment to ensure your Salesforce practice follows the best practices. Some of the quality gates include:
- Deployments based on pull-request approvals
- Apex PMD
- Automated test execution
- DevSecOps tools integration like DigitSec, etc.
- Enterprise DevOps Dashboards & ROI: We’ll also set up the enterprise dashboards for your DevOps teams based on the key value streams and metrics and ensure a periodic review with the leadership team on the ROI realized.
For a quick conversation and understanding of how these Jenkins plugins work, schedule a discovery call.