Feature management quickstart

3 minute read

Feature flags provide dynamic control over feature availability in your application, allowing you to enable or disable them without redeployment. Embedded within your code, these flags facilitate safe, real-time activation of features through CloudBees Unify. This approach supports continuous integration and delivery, optimizing your ability to test, iterate, and deploy updates efficiently and securely.

How they work

Separation of deploy and release

Feature flags allow you to deploy new code to production but control the activation of new features separately, ensuring that only fully vetted features are exposed to users. This means you can continuously integrate and deploy without tying the release of features to your deployment schedule.

Granular control

Deploy features to specific user groups—for instance, internal teams, beta testers, or premium customers—without affecting the broader user base. This control is invaluable for testing features under real-world conditions and gathering targeted feedback.

Instantaneous rollback

Encounter an issue in production? Simply toggle the feature off. This immediate, targeted rollback capability supports incident management by minimizing downtime and user impact—helping teams respond quickly and maintain a stable release environment.

Facilitating experiments and A/B testing

Feature flags support robust experimentation frameworks, enabling you to run A/B tests by exposing different user segments to varying feature configurations. This empowers you to make data-driven decisions based on real user interaction.

Implementing feature flags within your software development lifecycle not only enhances your ability to deliver software quickly and reliably but also helps maintain high-quality user experiences. By using feature flags, development teams can build safer release strategies, ensure consistent performance, and innovate with confidence.

Benefits

  • Reduce risk: Decouple code deployment from feature exposure.

  • Target specific audiences: Deliver features to internal testers, segments, or enterprise customers without separate branches or builds.

  • Accelerate incident response: Instantly disable problematic features in production—no redeploy needed. Minimize customer impact while preserving system stability.

  • A/B test and experiment: Gather insights by rolling out variations to subgroups in real time.

Technical requirements

  • SDK integration: Integrate the SDK into your application to enable feature flags.

  • Access to CloudBees feature management: Ensure your CloudBees Unify plan includes access to feature management.

  • Application and environment setup in Unify: Create and link your application to environments within Unify.

  • For detailed environment requirements and supported SDKs:

Configuration steps

To configure feature management:

  1. Install the SDK: Incorporate the CloudBees SDK into your application, ensuring connectivity with CloudBees feature management.

  2. Configure feature flags: Define feature flags in Unify to support your release workflows and user segmentation.

  3. Manage and monitor flags: Adjust flag configurations as needed, ensuring they meet your testing and rollout objectives effectively.

  4. Set up an environment: Link your application to environments in Unify that correspond to your development, testing, and production stages.

Example: Use feature flags in an Android app

Use this sample Android app to try feature management in a real-world example. The SDK integration and flag logic are already configured, so you can quickly evaluate how changing flag values in CloudBees affects your running app.

Try it out

We’ve created several feature management examples to help you get started. You can explore the example source code for this quickstart before cloning it: Android SDK feature management example.

  1. Clone the example project:

    git clone git@github.com:cloudbees-io/android-fm-example.git
  2. Open the project in Android Studio.

  3. Get your SDK key:

    1. Sign up at https://cloudbees.io/signup if you don’t already have an account.

    2. In CloudBees, go to Feature management  Flags, select your application and the linked environment, and copy the SDK key.

      If you do not see an SDK key on the Flags page, select Installation instructions to configure your SDK key.

  4. Add your SDK key to the app:

    In AndroidManifest.xml, replace the placeholder key:

    <meta-data android:name="rox.apiKey" android:value="your-cloudbees-sdk-key" />
  5. Run the app in Android Studio.

    Once the app launches, the feature flags shown in the table appear in your dashboard.

    Table 1. Flags for the Android app
    Flag name Type Description

    showMessage

    Boolean

    Show or hide a welcome message

    message

    String

    Customize the message text

    fontColor

    String

    Set text color: red, green, yellow, or blue

    fontSize

    Int32

    Set text size: 12, 14, or 18

    specialNumber

    Double

    Set a number: 2.72, 0.577, or 3.14

  6. Apply changes to the flags in CloudBees

    1. Navigate to Feature management, then select your application.

    2. Locate and configure one of the flags, setting its new value, and toggling Configuration status to On.

    3. Save changes. The app reflects new settings instantly.

Want to use your own app?

Explore SDK guides to integrate feature flags into your own Android or backend app.

Next steps