Learn about feature flags

2 minute read

Feature flags, the conditional statements around application feature code, are key to the CloudBees platform and can encompass many different types of logic and code.

Flags are defined as Boolean, number, or string types.

You can control application feature deployment separately from code releases by toggling a flag configuration on or off.

Each flag has its own configuration, the set of conditions for which the flag is enabled or disabled. The flag configuration can be as simple as the value true, or as complex as nested condition sets matching finely targeted groups.

To learn more, refer to Configure feature flags.

A feature flag is scoped to the organization or sub-organization (org or sub-org) where it is created. Orgs and sub-orgs are the top level of the resource structure in the platform and in feature management. Feature flags and other feature management entities are not shared between orgs and sub-orgs.

How flags relate to environments

Feature flags are scoped to the organization or sub-organization (org or sub-org) where they are created. Within a single org or sub-org, a feature flag is shared across all environments. This design supports reusability and scalability of flags in different stages of development and deployment.

For example, the MySubOrg sub-org contains three environments, Dev, Stage, and Prod. A flag named myFeatureFlag created in MySubOrg is available to all three environments within the same sub-org.

Flag is shared among environments
Figure 1. An example feature flag called myFeatureFlag is available in all environments within the same org or sub-org.

Some aspects of a flag are environment-specific. The flag configuration, SDK key, and stickiness behavior can differ across environments. For example, myFeatureFlag might expose a feature to external beta testers in the Dev environment, but target only Firefox users in the Stage environment. Each environment controls the flag’s configuration and status independently.

In the flag overview, flags created directly in an environment are labeled as Original under Source. When viewed in other environments within the same org or sub-org, the Source is shown as Shared.

Table 1. Flag characteristics that are shared/not shared across environments.
Flag characteristic Shared across environments?

Required flag settings (flag name and type)

Optional flag settings