Flagsmith Feature Flags Extension

Precondition to control the execution of a changelog or changeset based on the state of the feature flag in Flagsmith.

Supported Editions

Pro

Installation

The easiest way to install this extension is with lpm liquibase package manager.

Copy
lpm update
lpm add flagsmith

Setup

  • SDK Key is required for the extension to access the Flagsmith API.
  • URL is required for the extension to access the Flagsmith API.
Copy
--flagsmith-sdk-key=PARAM

     SDK Key for Flagsmith API
     (liquibase.flagsmith.sdkKey)
     (LIQUIBASE_FLAGSMITH_SDK_KEY)
     [deprecated: --flagsmithSdkKey]

--flagsmith-url=PARAM
     URL for Flagsmith API
     DEFAULT: https://www.flagsmith.com/api/v1/
     (liquibase.flagsmith.url)
     (LIQUIBASE_FLAGSMITH_URL)
     [deprecated: --flagsmithUrl]

Usage

To use this extension, add the flagsmithFeatureFlag precondition to your Changelog or Changeset with an enabledFlags attribute. The value for enabledFlags is either a string with one feature flag key or a comma separated string with multiple feature flag keys. All feature flags must be enabled for the precondition to pass.

Example

Copy
databaseChangeLog:
  -  preConditions:
     -  flagsmithFeatureFlag:
          enabledFlags: changelog-testing
Copy
<changeSet id="1" author="example">
    <preConditions>
        <ext:flagsmithFeatureFlag enabledFlags="changelog-testing"/>
    </preConditions>
    ...
</changeSet>

Feedback and Issues

Please submit all feedback and issues to this idea board.