diff --git a/doc/development/ai_features/index.md b/doc/development/ai_features/index.md index 7b95ea0323cf8060c994cc56e2bad084f278866c..281136c9210a59f830f49ea9fa5527c43a582e70 100644 --- a/doc/development/ai_features/index.md +++ b/doc/development/ai_features/index.md @@ -991,7 +991,7 @@ For evaluation in merge request pipelines, we use: To seed project and group resources for testing and evaluation, run the following command: ```shell -FILTER=gitlab_duo bundle exec rake db:seed_fu +SEED_GITLAB_DUO=1 FILTER=gitlab_duo bundle exec rake db:seed_fu ``` This command executes the [development seed file](../development_seed_files.md) for GitLab Duo, which creates `gitlab-duo` group in your GDK. diff --git a/doc/development/development_seed_files.md b/doc/development/development_seed_files.md index cebfd01942ad69bdb8d6943aa66ee48f830d51f6..e77b84b77c9449382eee44dec507915425469800 100644 --- a/doc/development/development_seed_files.md +++ b/doc/development/development_seed_files.md @@ -26,4 +26,4 @@ data for features. | Issue Analytics<br><br>Insights | `NEW_PROJECT=1 bin/rake gitlab:seed:insights:issues` | [insights Rake task](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/lib/tasks/gitlab/seed/insights.rake) | | DORA metrics | `SEED_DORA=1 FILTER=dora_metrics bundle exec rake db:seed_fu` | [92_dora_metrics](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/db/fixtures/development/92_dora_metrics.rb) | | Code Suggestion data in ClickHouse | `FILTER=ai_usage_stats bundle exec rake db:seed_fu` | [94_ai_usage_stats](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/db/fixtures/development/94_ai_usage_stats.rb) | -| GitLab Duo | `FILTER=gitlab_duo bundle exec rake db:seed_fu` | [95_gitlab_duo](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/db/fixtures/development/95_gitlab_duo.rb) | +| GitLab Duo | `SEED_GITLAB_DUO=1 FILTER=gitlab_duo bundle exec rake db:seed_fu` | [95_gitlab_duo](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/db/fixtures/development/95_gitlab_duo.rb) | diff --git a/ee/db/fixtures/development/95_gitlab_duo.rb b/ee/db/fixtures/development/95_gitlab_duo.rb index e020ed7bbc4b8abbf29601d67e6a136f88718bc2..bfe60aece78fbfa84943557d01c679a4fc5f7ea6 100644 --- a/ee/db/fixtures/development/95_gitlab_duo.rb +++ b/ee/db/fixtures/development/95_gitlab_duo.rb @@ -79,6 +79,13 @@ def fixture_file_upload(*args, **kwargs) end Gitlab::Seeder.quiet do + flag = ENV['SEED_GITLAB_DUO'] + + unless flag + puts "Skipped. Use the SEED_GITLAB_DUO=1 environment variable to enable." + next + end + Gitlab::Seeder::GitLabDuo.new.clean! Gitlab::Seeder::GitLabDuo.new.seed! end