Environments

6 minute readDeveloper productivity

Multiple environments are crucial in software development for pre-deployment testing. Environments represent your deployment pipeline, and you can create an unlimited number of environments in CloudBees Feature Management. CloudBees Feature Management also allows you to easily clone feature flag configurations between environments, so that a flag configuration set up in one environment can easily be moved to another. For more information, refer to Cloning a flag configuration.

Environments share the following:

  • Flags

  • Target groups

  • Custom properties

Environments do not share the following:

  • Configuration

  • Audit logs

  • Permissions

Environments Overview

Creating and managing an environment, and viewing flags in environments.

Watch the video

The environment overview page

Each environment has its own overview page that lists all feature flags used in that environment. You can use this page to understand flag usage across each environment.

Environment overview page actions

You can search or filter flags, hide flags, and create new flags on the flag overview page.

  • Search for flags by typing an entire flag name or some part of a flag name into the search box.

  • Select Filter to search for flags using one or more filters. Refer to Filtering flags for more information.

  • Select the Show cleanup candidates filter to see the flags that you may be able to delete. Refer to Deleting a feature flag for more information.

  • Select Create flag to create a new flag. Refer to Creating a feature flag for more information.

  • All flags are listed on the Flags tab, except for hidden flags, which are listed on the Hidden flags tab. Refer to Hiding a flag for more information.

Environment overview page flag list

The environment overview page provides specific information about all flags in the environment.

Production environment overview
Figure 1. Flags in environments > Production displayed

Information about each flag within the environment is organized using specific terms. The following table defines these terms:

Table 1. Description of table columns for Flags in environments
Column heading Description

Name

You can name a flag using any text. If you use the format <namespace>.<flagname>, you can filter flags by <namespace>.

Status

Flag status is derived from the flags' impression data. Each flag can be in 5 possible states. Refer to Flag status for more information.

Labels

All associated labels.

Created

How long since the flag was created.

Updated

How long since the flag was updated.

Impressions

The number of browser visitors in a specific time frame for each configured value. Select the impression summary to access the detailed impression data.

Feature

All associated flag groups, called features. Refer to Flag groups (features) for more information.

Filtering flags

The Filter option allows you to filter flags by:

  • Status

  • Configuration

  • Label

  • Flag type

  • Namespace

  • Feature

Flag filters
Figure 2. Flag filters with example options selected

To filter flags:

  1. From the CloudBees Feature Management Home page, in the left pane, select the environment.

  2. Select Filter, located to the right of the search box.

  3. Select any filtering options you want. You can start typing to use autocomplete if desired.

  4. Select Apply filters.

The filtered flag list is displayed.

If you use the format <namespace>.<flagname>, you can filter flags by <namespace>.

Sorting flags

You can sort feature flags in an environment, as listed in the following table. Flags cannot be sorted by their labels or features, and flags can only be sorted by one column at a time.

Table 2. Flag sorting options
Column heading Sorting method

Name

Alphabetically

Status

Alphabetically

Created

Timestamp

Updated

Timestamp

Impressions

Total impressions

To sort flags:

  1. From the CloudBees Feature Management Home page, in the left pane, select the environment.

  2. Select the column heading that you want to sort.

  3. Select the column heading again to change the sort order from ascending to descending, or vice versa.

An arrow to the right of the column heading indicates how the flags are sorted.

Flag status

For each environment we report a status for each feature flag. The feature flag status is there to help you understand where this feature flag is in its lifecycle. The flag status should help with questions such as:

  • Has the flag been deployed?

  • Is the flag unused?

  • Is the flag serving the same value to all target groups?

The flag status is derived from impression data.

Each Flag can be in one of five possible states:

  1. Active - Received impressions with different values over the last seven days

  2. Stale - Received impressions over the last seven days, but with all the same value

  3. Inactive - Received no impressions over the last seven days

  4. Setup - No impressions received yet

  5. Permanent - A permanent (long-lived) flag, so impression data is not counted/available

When creating a flag, you can set it to Permanent status and ignore impression data. This is usually done when the flag is a configuration / "long-lived" flag (such as timeout, URLs). From the flag’s Settings tab, you can set a flag to permanent status after it has been created.

CloudBees Feature Management time-to-live of impression data is 45 days. This means that flags created before this capability was released that had had no impression data in the last 45 days would be labeled as Inactive, although they may never have had impression data (Setup status). This is a temporary state which only applies to older flags as described above.

Hiding a flag

You can hide any flag of any status so that it will not display on the Flags tab, but will instead be listed on the Hidden flags tab. Hiding a flag is a convenient way to filter out unused flags. You can also delete a flag if it is no longer used.

The Hide flag function exists on the environment level. You need to have Full access permission to the environment to hide a flag.

To hide a flag:

  1. From the CloudBees Feature Management Home page, in the left pane, select the environment.

  2. Locate the name of the flag in the list.

  3. Select the three vertical dots menu and choose Hide flag.

The flag is now located on the Hidden flags tab in the environment overview page.

Working with environments

You can see an overview of all feature flags for all environments by selecting Overview in the side panel. For each environment, you see the targeting status and the latest value configured.

All environments are listed under Flags in environments in the left panel. Selecting an environment displays a flag list, including:

  • Status

  • Labels

  • When created

  • When updated

  • Impressions

  • Features

Using the environment’s overview screen, you can create and modify flags, but you cannot modify the environment itself.

You can create, rearrange, modify, and delete environments from the App Settings > Environments tab.

The Production environment is the default environment. You cannot modify nor delete the Production environment.

Creating an environment

Production is the default environment. You can add unlimited environments in each app.

To create a new environment:

  1. From the CloudBees Feature Management Home page, select the App Settings  Environments tab, then select Add New Environment.

  2. Enter a name for the environment in the Name text box and an optional description for the environment in the Description text box.

  3. Click Create to proceed.

  4. The dialog will now show you your SDK key for this environment. If desired, select the Copy link at the right of the text box (or highlight the text and copy manually) to copy the key to your clipboard.

    For enterprise usage, we recommend assigning each environment key to a build variable, so that your continuous integration engine can handle key selection.
  5. Select Close.

The new environment is now listed in the Environments tab and in the left panel.

Rearranging the environment listing order

You can rearrange the listing order of environments, including the Production environment.

To rearrange the environment order:

  1. From the CloudBees Feature Management Home page, select the App Settings  Environments tab.

  2. Select the six dots icon to the left of an environment name to drag and drop it to a different location in the list.

  3. The updated order will be reflected in the left panel.

Modifying an environment

You can edit the name or description of any environment, except for the Production environment.

To change an environment name or description:

  1. From the CloudBees Feature Management Home page, select the App Settings  Environments tab, then select the row of the environment that you wish to modify.

  2. Update the Name or Description as desired.

  3. Select Save changes.

Your changes are reflected in the Environments tab. Any updates to the environment name are also shown in the left pane under Flags in environments.

Deleting an environment

You can delete any environment, except for the Production environment.

To delete an environment:

  1. From the CloudBees Feature Management Home page, select the App Settings  Environments tab, then select the X link in the environment row you want to delete.

  2. In the modal window, select Delete.

The environment is now removed from the Environments tab and from the left panel.