2017-05-31 17:06:01 -04:00
|
|
|
# Manage feature flags
|
|
|
|
|
|
|
|
Starting from GitLab 9.3 we support feature flags via
|
|
|
|
[Flipper](https://github.com/jnunemaker/flipper/). You should use the `Feature`
|
|
|
|
class (defined in `lib/feature.rb`) in your code to get, set and list feature
|
2017-06-29 12:53:57 -04:00
|
|
|
flags.
|
|
|
|
|
|
|
|
During runtime you can set the values for the gates via the
|
|
|
|
[features API](../api/features.md) (accessible to admins only).
|
|
|
|
|
|
|
|
## Feature groups
|
|
|
|
|
|
|
|
Starting from GitLab 9.4 we support feature groups via
|
|
|
|
[Flipper groups](https://github.com/jnunemaker/flipper/blob/v0.10.2/docs/Gates.md#2-group).
|
|
|
|
|
2017-07-05 15:55:27 -04:00
|
|
|
Feature groups must be defined statically in `lib/feature.rb` (in the
|
|
|
|
`.register_feature_groups` method), but their implementation can obviously be
|
2017-07-06 20:34:51 -04:00
|
|
|
dynamic (querying the DB etc.).
|
2017-06-29 12:53:57 -04:00
|
|
|
|
|
|
|
Once defined in `lib/feature.rb`, you will be able to activate a
|
|
|
|
feature for a given feature group via the [`feature_group` param of the features API](../api/features.md#set-or-create-a-feature)
|