GrowthBook Feature Flags Extension

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

Supported Editions

Liquibase Pro

Installation

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

Copy
lpm update
lpm add growthbook

Setup

  • A SDK Key is required for the extension to access the GrowthBook API.
  • A URL is required for the GrowthBook API. If using GrowthBook Cloud, this is https://cdn.growthbook.io
Copy
--growth-book-sdk-key=PARAM

         SDK Key for GrowthBook API
         (liquibase.growthBook.sdkKey)
         (LIQUIBASE_GROWTH_BOOK_SDK_KEY)
         [deprecated: --growthBookSdkKey]

--growth-book-url=PARAM

         URL for GrowthBook API
         (liquibase.growthBook.url)
         (LIQUIBASE_GROWTH_BOOK_URL)
         [deprecated: --growthBookUrl]

Usage

To use this extension, add the growthBookFeatureFlag 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:
     -  growthBookFeatureFlag:
          enabledFlags: changelog-testing
Copy
<changeSet id="1" author="example">
    <preConditions>
        <ext:growthBookFeatureFlag enabledFlags="changelog-testing"/>
    </preConditions>
    ...
</changeSet>

Feedback and Issues

Please submit all feedback and issues to this idea board.