This plugin integrates with CloudBees Feature Management to facilitate feature flagging as part of deployments and releases.
Plugin version 1.2.3.2022041481
Revised on April 14, 2022
Plugin configurations
Plugin configurations are sets of parameters that apply across some or all of the plugin procedures. They reduce repetition of common values, create predefined parameter sets for end users, and securely store credentials where needed. Each configuration is given a unique name that is entered in designated parameters on procedures that use them.
Creating plugin configurations
To create plugin configurations in CloudBees CD, complete the following steps:
-
Go to
to open the Plugin Manager. -
Find the EC-FeatureFlags-1.2.3.2022041481 row.
-
Select Configure to open the Configurations page.
-
Select Create Configuration as per the description of parameters below.
Configuration procedure parameters
Parameter | Description |
---|---|
Configuration Name | The name for the created configuration |
Description | Description for the configuration |
User Token | The User Token required to connect to the CloudBees Feature Flags Instance. It can be retrieved from App Settings → Integrations → User Token → Show. |
Check Connection? | If checked, the connection endpoint and credentials entered as part of the configuration will be tested. If this option is checked, configuration will not be saved if the test fails. |
Debug Level | This option sets debug level for logs. If info is selected, only summary information will be shown, for debug, there will be some debug information and for trace the whole requests and responses will be shown. |
Plugin procedures
Get Environments
This procedure retrieves the different environments registered in CloudBees Feature Management for the specified Application.
Get Experiments
This procedure retrieves all flags associated with a specified Application and Environment.
Get Experiments parameters
Parameter | Description |
---|---|
Configuration Name | Previously defined configuration for the plugin |
Application Id | The Id of the application from which flags should be retrieved. It can be chosen from App Settings → Integrations → Application Id. |
Environment Name | Environment name, e.g. Production. |
Get Experiment
Retrieves a single flag data associated with a specified flag.
Get Experiment parameters
Parameter | Description |
---|---|
Configuration Name | Previously defined configuration for the plugin |
Application Id | The Id of the application from which the specified flag should be retrieved. It can be chosen from App Settings → Integrations → Application Id. |
Environment Name | Environment name, e.g. Production. |
Flag Name | Name of the flag that is managed by the flag. If the flag for the selected flag does not exist, the procedure will fail. |
Create or Update Experiment
This procedure creates a new CloudBees Feature Flags flag. If the flag exists already it would update it.
Create or Update Experiment parameters
Parameter | Description |
---|---|
Configuration Name | Previously defined configuration for the plugin |
Application Id | The Id of the application from which the specified flag should be retrieved. It can be chosen from App Settings → Integrations → Application Id. |
Environment Name | Environment name, e.g. Production. |
Flag Name | The name of the flag, e.g. featureEnabled. |
Action | The action to uptake. Available actions are: Set value - set boolean flag true/false. Set splitted value - set split percentage. Set scheduled value - set percentage and scheduled date. |
Condition | The condition for the action. Available conditions are: All Users (No condition) Target Groups - apply only for the specific target groups |
Flag Value | The value to set. Checked equals to True. |
True Percentage | Percentage for the True value expressed as a number. Default is 100. |
Start Date | Start date for the scheduled value. |
Target Groups | Target groups covered by the condition. When specifying multiple target groups, separate them by a new line. |
Target Groups Operator | The logical relationship between the groups. |
Enabled | If checked, this flag will be enabled. |
Default Value | Default value for the flag if no conditions are provided. |
Apply to version | Apply condition only to specified version. |
Operator | Set version operator. |
Semantic version | Application version to compare to. |
Toggle flag
This procedure will enable/disable the flag
Toggle flag parameters
Parameter | Description |
---|---|
Configuration Name | Previously defined configuration for the plugin |
Application ID | The Id of the application from which the specified flag should be retrieved. It can be chosen from App Settings → Integrations → Application Id. |
Environment Name | Environment name, e.g. Production. |
Flag Name | The name of the flag, e.g. featureEnabled. |
Targeting | Enable of disable the targeting. |
Collect Reporting Data
Collect Reporting Data parameters
Parameter | Description |
---|---|
Configuration name | Previously defined configuration for the plugin |
Application Id | The Id of the application from which flags should be retrieved. It can be chosen from App Settings → Integrations → Application Id. |
Environment Name | Environment name, e.g. Production. |
Filter by flag name | Regex for filtering flags by their names, eg. myFlag\d+ |
Filter by flag label | Regex for filtering flags by their label, eg. myFlag Label\d+ |
Metadata property path | Property sheet where run metadata will be stored. If omitted, /mySchedule/EC-Git-%JobName%-%Report Object Type% will be used for schedule contest. For all other contexts root is /myProject. |
Transform script | Allows a user to provide Groovy closure for payload customization. This script will be invoked by the plugin with 1 or 2 parameters. * if one parameter: it is a payload object. * if two parameters: 1st parameter is context object (FlowPlugin), 2nd is a payload object. In this example "flagsStale" field will be changed in the payload object: { Object pluginObject, Map flag -> if (!flag) { return flag } flag["flagsStale"] *= 10 return flag } or { Map flag -> if (!flag) { return flag } flag["flagsStale"] *= 10 return flag } |
Preview | If checked, no data will be sent to the reporting system. Use this option to preview gathered data. |
Debug | If checked, the log level will be set to "Debug" for the job. |
Release name | Name of the CloudBees Flow release collected data relates to. |
Release project name | Name of the CloudBees Flow release project collected data relates to. |
Use Case
This example provides a simple example of how the EC-FeatureFlags can be used with a CloudBees CD Deployment.
