Working with Environments

Environments represent your deployment pipeline: production, staging, or testing. CloudBees Feature Flags supports working with multiple Environments. You can create an unlimited number of Environments. CloudBees Feature Flags also allows you to easily clone feature flags configuration between Environments so anything done in staging or testing can easily be moved to production (and vice versa).

Environments share the following:

  • Flags

  • Target Groups

  • Custom Properties

Environments Do NOT share the following:

  • Configuration

  • Audit Logs

  • Permissions

Production is the default environment

You can not change the name nor delete the Production environment.

Working with Environments

  • Go to the CloudBees Feature Flags dashboard, on the left sidebar, click on App Settings.

  • Click on the Environments tab.

  • From here, you can make whatever changes you need.

Creating an Environment

  • From App SettingsEnvironments tab, click the Add New Environment link.

  • You will be prompted to create your environment.

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

  • Click the Generate Key button to proceed.

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

  • When you’re done, click the Close button, and observe that your new environment is now listed in the Environments tab.

  • Also observe that you now see the new environment listed in the navigation bar on the left. Like the default environment, it will have its own Feature Flags and Audit Log which you can see by clicking on it in the navigation bar.

Modifying an Environment

  • From App SettingsEnvironments tab, click on the row of the environment that you wish to modify.

  • You will be prompted with a dialog that allows you to change the name and description of the environment. To do so, make changes in the Name and Description text boxes, respectively, bearing in mind that you cannot leave Name blank.

  • When you are finished making changes, click the Save Changes button to proceed or, optionally, the Cancel button to cancel the changes.

  • Assuming you saved, your changes will be reflected in the Environments tab and any changes you made to its name will appear on the left in the navigation bar.

  • Environment left navigation menu order can also be changed; using the left drag and drop icon re-arrange the order of the environments as needed.

Deleting an Environment

  • From App SettingsEnvironments tab, move your mouse over the row of the environment you want to delete and observe that a Delete link with a trash can appears. Click that link.

  • A warning message will prompt you, asking if you’re sure you want to delete the environment. Click Delete to proceed and Cancel if you selected this in error.

  • Assuming you opted to delete, you will now see that your environment has been removed from the Environments tab and from the navigation bar on the left.

  • Note that you cannot delete the default environment, Production.

Cloning Feature Flags configuration across Environments

  • Navigate to the environment and feature flag you wish to clone

  • On the Flag Details screen, click the Settings tab at the top, and you’ll see settings for the feature flag.

  • Click the Clone To Environment link, and you’ll be prompted with a dialog asking you to select the environment to which you want to clone it.

  • If the feature flag already exists in the target environment, the dialog will prompt you to confirm that you want to overwrite the existing feature flag configuration. If so, click the Override Flag button. If this was a mistake, click Cancel.

  • If the feature flag does not yet exist in the target environment, to clone it, pick the environment you want to clone it to from the drop-down in the dialog box. To proceed, click the Clone Flag button. Otherwise, click Cancel.

  • You will now see the cloned configuration on the destination environment.

Cloning a feature flag configuration copies the feature flag rules, its targeting state and its hidden/visible state.

Environments overview

Finally, you can see an overview of all feature flags for all environments by clicking Flags Overview in the navigation bar on the left. For each environment, you will see the targeting status and the latest value configured.