Create Feature Flags plugin procedures

3 minute readExtensibilityDeveloper productivity

Plugin procedures can be used in procedure steps, process steps, and pipeline tasks, allowing you to orchestrate third-party tools at the appropriate time in your component, application process, or pipeline.

Depending on your plugin configuration and how you run procedures, the Input parameters  Configuration name field may behave differently in the CloudBees CD/RO UI. For more information, refer to Differences in plugin UI behavior.

Create or Update Experiment

Creates a new CloudBees Feature Management flag. If the flag already exists, it is updated.

Input parameters

Table 1. Create or Update Experiment input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Application ID

Required. The ID of the application from which the specified flag should be retrieved. It can be selected from App Settings  Integrations  Application ID.

Environment Name

Required. The environment’s name. For example, Production.

Flag Name

Required. The name of the flag. For example, featureEnabled.

Action

Required. The action to take. The available actions are:

  • Set value: Set the boolean flag to true or false.

  • Set split value: Set the split percentage.

  • Set scheduled value: Set the percentage and scheduled date.

Condition

Required. The condition for the action. The available conditions are:

  • All Users: No conditions are applied for the action.

  • Target Groups: Applies the condition only for specific target groups.

Flag Value

The value to set. If selected, the Flag Value is set to True.

True Percentage

The percentage for the True value, expressed as a number. The default is 100.

Start Date

The 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 selected, this flag is enabled.

Default Value

The default value for the flag if no conditions are provided.

Apply to version

Apply the condition only to the specified version.

Operator

Set the version operator.

Semantic version

The application version to compare against.

Get Environments

Retrieves the different environments registered in CloudBees Feature Management for the specified application.

Input parameters

Table 2. Get Environments input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Application ID

Required. The ID of the application whose environments need to be retrieved. It can be selected from App Settings  Integrations  Application ID.

Output parameters

Table 3. Get Environments output parameters
Parameter Description

environments

A JSON representation of the registered environments.

Get Experiment

Retrieves a single flag’s data associated with a specified flag.

Input parameters

Table 4. Get Experiment input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Application ID

Required. The ID of the application from which the specified flag should be retrieved. It can be selected from App Settings  Integrations  Application ID.

Environment Name

Required. The environment name. For example, Production.

Flag Name

Required. The name of the flag that is managed by the flag. If the flag for the selected flag does not exist, the procedure fails.

Output parameters

Table 5. Get Experiment output parameters
Parameter Description

experiment

A JSON representation of the flag.

Get Experiments

Retrieves all flags associated with a specified application and environment.

Input parameters

Table 6. Get Experiments input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Application ID

Required. The ID of the application from which flags should be retrieved. It can be selected from App Settings  Integrations  Application ID.

Environment Name

Required. The environment name. For example, Production.

Output parameters

Table 7. Get Experiments output parameters
Parameter Description

experiments

A JSON representation of the flags that are retrieved.

Toggle flag

Enables or disables the flag.

Input parameters

Table 8. Toggle flag input parameters
Parameter Description

Configuration name

Required. The previously defined configuration for the plugin.

Application ID

Required. The ID of the application from which the specified flag should be retrieved. It can be selected from App Settings  Integrations  Application ID.

Environment Name

Required. The environment’s name. For example, Production.

Flag Name

Required. The name of the flag. For example, featureEnabled.

Targeting

Required. Enable or disable targeting.