summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-06-29 18:53:57 +0200
committerRémy Coutable <remy@rymai.me>2017-07-06 11:18:25 +0200
commitc8ce1f0d5d5908351fd8a0e60c00e67c1be25ed9 (patch)
tree8fd6fec1a4ac7b165bbffaf7bfccf02fba233213
parent53af1eb7e984ad9a03bdb0957e91f4bd0d43b9e0 (diff)
downloadgitlab-ce-c8ce1f0d5d5908351fd8a0e60c00e67c1be25ed9.tar.gz
Document the feature groups
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--doc/api/README.md1
-rw-r--r--doc/api/features.md2
-rw-r--r--doc/development/feature_flags.md18
3 files changed, 18 insertions, 3 deletions
diff --git a/doc/api/README.md b/doc/api/README.md
index b7f6ee69193..95e7a457848 100644
--- a/doc/api/README.md
+++ b/doc/api/README.md
@@ -17,6 +17,7 @@ following locations:
- [Deploy Keys](deploy_keys.md)
- [Environments](environments.md)
- [Events](events.md)
+- [Feature flags](features.md)
- [Gitignores templates](templates/gitignores.md)
- [GitLab CI Config templates](templates/gitlab_ci_ymls.md)
- [Groups](groups.md)
diff --git a/doc/api/features.md b/doc/api/features.md
index 63a361de7ac..2ceea977d85 100644
--- a/doc/api/features.md
+++ b/doc/api/features.md
@@ -1,4 +1,4 @@
-# Features API
+# Features flags API
All methods require administrator authorization.
diff --git a/doc/development/feature_flags.md b/doc/development/feature_flags.md
index 5c6316b9ac6..cf9636eb6f6 100644
--- a/doc/development/feature_flags.md
+++ b/doc/development/feature_flags.md
@@ -3,5 +3,19 @@
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
-flags. During runtime you can set the values for the gates via the
-[admin API](../api/features.md).
+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).
+
+Feature groups must be defined statically in `lib/feature.rb` (in the `.register_feature_groups` method), but their implementation can obviously be
+dynamic (querying the DB etc.). You can see how the `performance_team` feature
+group for a concrete example.
+
+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)