Thoughts on technology and innovation
Ted Husted, Release Engineer
In a classic Ted Talk, Tom Hulme asks "What can we learn from shortcuts?".
For years, many of us have been looking for shortcuts through the Salesforce application lifecycle, so that we can use continuous delivery to develop packages for the AppExchange.
The lifecycle architects at Salesforce took a long look at the paths we were forging for ourselves, and they are now paving the way for source-driven development and continuous delivery.
#safeharbor - This article may contain forward-looking statements that involve risk, uncertainties, and assumptions. Any unreleased services or features referenced in this article are not currently available and may not be delivered on time or at all.
In the beginning, there was Test Driven Development, then came Behavior Driven Development. Now, Salesforce brings us the retronym "Source Driven Development" -- for those of us compelled to do things the hard way.
The easy way is to use the Salesforce builder interfaces to create apps with "Clicks Not Code". It's actually amazing how many truly useful apps can be created without writing a line of source code yourself!
If you need to push the envelope, Salesforce has always been an able-if-spartan coding platform. We have the necessities of life: development environments, code editors, unit tests, detailed logging, and deployment tools. As a bit of icing, there are also plugins for niceties like static analysis.
Until now, it has also been a do-it-yourself exercise to connect the dots and standup a continuous delivery system.
When you are collaborating on the development of a complex application, it's important to stay "release ready". Otherwise, when the time comes, you will be nothing like ready.
We might not want to deliver a new version of our packages to all of our production subscribers every day, but we need to be ready to deliver whatever has been done to date whenever we decide to deliver it. Staying release ready keeps us honest, and neatly avoids having a dozen partially-done items, but nothing ready to deliver.
A continuous delivery system is part pipeline and part mobius strip. Each batch of deliverables flows through the pipeline and circles back to the beginning.
On some platforms, the ideal batch size is one. While such a thing is achievable on the Force.com platform, it may be some time before it's the status quo. (Hope springs eternal.)
The Four Stages
The key DevOps stages are: Plan, Build, Release, Operate.
Scratch Orgs - Build
To keep packaging orgs pristine, most developers create changes in another environment before deploying the tested version for packaging.
You should let the "source of truth" bit sink in. It's much like saying: "Okay, okay, we get it, Galileo: The earth revolves around the sun."
Package Modules - Build
Often, larger applications are segmented into a base feature set and one or more extended feature sets. Each feature set can be organized into a package.
Scripted Push Upgrades - Release
An AppExchange app is also called a package, and platform deployments center around delivering packages.
App Innovation Partner Support Tools - Operate
Using the LMA Subscriber Console, App Innovation Partners can login to licensed subscibers (when access is granted), to help determine problems and adjust protected custom settings.
Feature Enablement - Operate
Activation Metrics - Plan
NextGen Packaging - Summer '17 thru Spring '18
According to various Dreamforce '16 presentations, a series of build and deploy changes are underway which will make it easier to create richer managed packages with more options in order to better serve specific customer segments.
As part of Salesforce DX, we continue the journey to fully externalize the source and metadata in your Salesforce environment as artifacts in source control so that you can use a true source driven development style. -- Wade Wegner, VP of Product for Salesforce DX.
The next year will be an exciting time for Salesforce DevOps. Stay tuned for tips and techniques as they develop. For any questions about Salesforce DX and Salesforce continuous integration generally, feel free to ping me in the DreamOps success group (Salesforce login needed).
For more see:
Are you already using continuous delivery with your managed package? Does DX sound familiar, or did you go a different way?
Ted Husted is a Kaizen Squad developer on the Nimble AMS product crew. "We make the good changes that create a great product."