Product
|
Cloud costs
|
released
May 19, 2022
|
3
min read
|

Why Integrate CI/CD Natively With Feature Flags

Updated
9/15/2023

We, at Harness, find ourselves talking a lot about the value of having CI/CD and Feature Flags together. This isn’t actually key to our product strategy, since our goal with all Harness modules is to build a product good enough to sell on its own (against competitors in that space). 

We build tools to be the best in the market, not just to bundle together. But, in building tools on a common platform, we always look for ways to maximize the impact of using modules together. The impact of Feature Flags and CI/CD when natively integrated is more significant—although somewhat different—than we expected.

Initially: One Single Pipeline 

When we first started working on this problem, we had a theory that modeling your entire software release end-to-end in a single unified pipeline might be the killer application for CI/CD and Feature Flags together—from build to deploy to rolling out the feature progressively, all in a single pipeline.

What we’ve found though, is that there are definitely situations that companies will have where combining CI/CD and Feature Flags into a pipeline together makes sense (more on that later), but it isn’t the day-to-day use case for most development teams. For most flags, and most deployments, users wanted them in separate pipelines.

While this realization didn’t mean our theory was valueless—since again there are times when it makes sense and the capability is great to have—it did mean that we had to go deeper to understand what the benefit was.

The interesting thing is that by this point, we were actively talking to customers about Harness Feature Flags, and we were using it internally with CI/CD, so we knew it was better to have them together. We weren’t on a fishing expedition trying to force value to happen. We just had to figure out why and when they are better together.

Why it Makes Sense to Combine Feature Flags and CI/CD 

Reason #1: Standardized UX

It may be the case that the majority of the time, your feature flag rollouts and deployments won’t share the same pipelines. However, the fact that you build these behaviors in the same UX, using the same terms, and sharing the same options, has a cumulative effect of making things easier to manage, understand, and ramp teammates up on—on both CI/CD and Feature Flags.

Deployment Pipeline
CI/CD with Feature Flags

Looking at the two simple pipeline examples above—one is for a deployment, and one is for rolling out a feature via a feature flag—you can see how both look, feel, and work the same.

Reason #2: Less Time Spent Managing Teams and Access

Every system that touches the production environment is a risk, and every dev tool is an employee onboarding and offboarding requirement. Managing production access, RBAC, team structure, project structure—and then auditing, applying governance rules, and oversight—all of these things carry both a large cost in terms of time (with highly skilled people toiling away at menial work), as well as opportunities to miss something. Let’s face it, we’ve all worked somewhere where an ex-employee from six months ago still had access to tools. 

By sharing key configs, such as environments, teams, and projects, the amount of setup, people management, and opportunities for risk are all significantly improved when accounted for on a single platform. Prod, in Harness, spans CI/CD/FF. Adding someone to a team with a permission level can apply to all modules. There’s no need to do things again and again.

Reason #3: Figuring Out What’s Happening

What happened in prod yesterday? If you use most toolchains, finding this information out involves three or four tabs, and maybe some data exports. Maybe the same person has access to them all, or maybe not. Hopefully there are no gaps, and you don’t have data siloed across different teams.

If you ask the same question with Harness, you get dashboards that span CI, CD, and Feature Flags, as well as a combined audit log of all activity in your environments. Quite simply, it’s almost impossible to not to easily find out what happened and when. All of the common digging, mixing data, and tying a timeline or storyline together across multiple tools is gone.

FF Analytics

In our experience, this makes ops teams, engineering management, and customer support teams feel so much better. Breakdowns usually happen at the seams, and there are no seams with Harness. For instance, our own ops team is able to easily see when a deployment that contains a new configuration controlled by a feature flag finishes, as well as what environment it’s been enabled in, and who has access—all from within one unified platform.

Reason #4: Combined Pipelines (When it Makes Sense!)

I noted earlier that combining CI/CD and Feature Flags activity into a single pipeline didn’t make sense all of the time, but in the right context, it can be an absolute godsend.

Your day-to-day deployments of smaller changes are probably not the best fit for this kind of combined pipeline. However, there are times when you’re making a more significant, coordinated change. Let’s say you’re migrating a ton of user data over to a new subsystem as part of a deployment, and you want to ramp users on the new subsystem post-deployment by region.

A combined pipeline in this case is by far the simplest, most governable and observable way to accomplish this otherwise complex task. 

Combined Pipeline - CI/CD Feature Flags
A CI/CD pipeline with a feature flag stage seamlessly integrated in.

Consider the use for this as being perfect for your more deliberate, bespoke release scenarios, such as features that require non-typical coordination, carefully planned traffic ramp, or observation windows post-deployment. 

You probably don’t need this on every deployment, but there’s no doubt that when you need it, it’s a game-changer. On top of that, these pipelines can be governed globally, allowing you to set policies like “don’t allow prod flag changes if a deployment has gone bad in the last 5 minutes,” making the entire toolchain safe and compliant.

We’ll Repeat it Again: When it Makes Sense

Natively integrating CI/CD and Feature Flags has been a discovery journey for us at Harness. What we’ve found is that the benefits are as much in the cognition load, the organization management, the improved governance, and reduced risk, as much as they are in the unique end-to-end pipeline.

The ability to build pipelines together has a huge impact in the right situations, but you’ll get everyday value out of having these tools together.

Want to try Feature Flags and play around with these cool features? Sign up for your free trial today and create a flag.

Sign up now

Sign up for our free plan, start building and deploying with Harness, take your software delivery to the next level.

Get a demo

Sign up for a free 14 day trial and take your software development to the next level

Documentation

Learn intelligent software delivery at your own pace. Step-by-step tutorials, videos, and reference docs to help you deliver customer happiness.

Case studies

Learn intelligent software delivery at your own pace. Step-by-step tutorials, videos, and reference docs to help you deliver customer happiness.

We want to hear from you

Enjoyed reading this blog post or have questions or feedback?
Share your thoughts by creating a new topic in the Harness community forum.

Sign up for our monthly newsletter

Subscribe to our newsletter to receive the latest Harness content in your inbox every month.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Feature Flags