diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /doc/development/rake_tasks.md | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc42
Diffstat (limited to 'doc/development/rake_tasks.md')
-rw-r--r-- | doc/development/rake_tasks.md | 56 |
1 files changed, 54 insertions, 2 deletions
diff --git a/doc/development/rake_tasks.md b/doc/development/rake_tasks.md index cd7f8cba39b..8261330223d 100644 --- a/doc/development/rake_tasks.md +++ b/doc/development/rake_tasks.md @@ -145,6 +145,58 @@ bin/rake 'gitlab:seed:vulnerabilities' bin/rake 'gitlab:seed:vulnerabilities[group-path/project-path]' ``` +#### Seed a project with environments + +You can seed a project with [environments](../ci/environments/index.md). + +By default, this creates 10 environments, each with the prefix `ENV_`. +Only `project_path` is required to run this command. + +```shell +bundle exec rake "gitlab:seed:project_environments[project_path, seed_count, prefix]" + +# Examples +bundle exec rake "gitlab:seed:project_environments[flightjs/Flight]" +bundle exec rake "gitlab:seed:project_environments[flightjs/Flight, 25, FLIGHT_ENV_]" +``` + +#### Seed CI variables + +You can seed a project, group, or instance with [CI variables](../ci/variables/index.md). + +By default, each command creates 10 CI variables. Variable names are prepended with its own +default prefix (`VAR_` for project-level variables, `GROUP_VAR_` for group-level variables, +and `INSTANCE_VAR_` for instance-level variables). + +Instance-level variables do not have environment scopes. Project-level and group-level variables +use the default `"*"` environment scope if no `environment_scope` is supplied. If `environment_scope` +is set to `"unique"`, each variable is created with its own unique environment. + +```shell +# Seed a project with project-level CI variables +# Only `project_path` is required to run this command. +bundle exec rake "gitlab:seed:ci_variables_project[project_path, seed_count, environment_scope, prefix]" + +# Seed a group with group-level CI variables +# Only `group_name` is required to run this command. +bundle exec rake "gitlab:seed:ci_variables_group[group_name, seed_count, environment_scope, prefix]" + +# Seed an instance with instance-level CI variables +bundle exec rake "gitlab:seed:ci_variables_instance[seed_count, prefix]" + +# Examples +bundle exec rake "gitlab:seed:ci_variables_project[flightjs/Flight]" +bundle exec rake "gitlab:seed:ci_variables_project[flightjs/Flight, 25, staging]" +bundle exec rake "gitlab:seed:ci_variables_project[flightjs/Flight, 25, unique, CI_VAR_]" + +bundle exec rake "gitlab:seed:ci_variables_group[group_name]" +bundle exec rake "gitlab:seed:ci_variables_group[group_name, 25, staging]" +bundle exec rake "gitlab:seed:ci_variables_group[group_name, 25, unique, CI_VAR_]" + +bundle exec rake "gitlab:seed:ci_variables_instance" +bundle exec rake "gitlab:seed:ci_variables_instance[25, CI_VAR_]" +``` + ### Automation If you're very sure that you want to **wipe the current database** and refill @@ -258,7 +310,7 @@ One way to generate the initial list is to run the Rake task `rubocop:todo:gener bundle exec rake rubocop:todo:generate ``` -To generate TODO list for specific RuboCop rules, pass them comma-separated as +To generate TODO list for specific RuboCop rules, pass them comma-seperated as argument to the Rake task: ```shell @@ -372,7 +424,7 @@ a file for quick reference. ## Show obsolete `ignored_columns` -To see a list of all obsolete `ignored_columns` run: +To see a list of all obsolete `ignored_columns` definitions run: ```shell bundle exec rake db:obsolete_ignored_columns |