summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2018-04-12 14:07:44 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2018-04-16 14:05:35 +0200
commit392c411bdc16386ef42c86afaf8c4d8e4cddb955 (patch)
tree4dc69bd81002c4c68885442a201fd17328b40813 /lib
parent4fcee58636259e523a0e1b85e2090160a3938496 (diff)
downloadgitlab-ce-392c411bdc16386ef42c86afaf8c4d8e4cddb955.tar.gz
Introduce new ProjectCiCdSetting10244-add-project-ci-cd-settings
This model and the corresponding table will be used for storing settings specific to CI/CD, starting with the "group_runners_enabled" boolean. The model is called ProjectCiCdSetting and not ProjectCiCdSettings. The project exporter doesn't like plural model names as it uses "classify" which turns those into singular (so "ProjectCiCdSettings" becomes "ProjectCiCdSetting", producing an error if said class is undefined). The initial work in this commit was done by Dylan Griffith, with most of the migration work being done by Yorick Peterse.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/import_export/import_export.yml3
-rw-r--r--lib/gitlab/import_export/relation_factory.rb3
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/import_export/import_export.yml b/lib/gitlab/import_export/import_export.yml
index cd840bd5b01..be032e495ac 100644
--- a/lib/gitlab/import_export/import_export.yml
+++ b/lib/gitlab/import_export/import_export.yml
@@ -66,6 +66,7 @@ project_tree:
- :project_feature
- :custom_attributes
- :project_badges
+ - :ci_cd_settings
# Only include the following attributes for the models specified.
included_attributes:
@@ -75,6 +76,8 @@ included_attributes:
- :username
author:
- :name
+ ci_cd_settings:
+ - :group_runners_enabled
# Do not include the following attributes for the models specified.
excluded_attributes:
diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb
index 598832fb2df..e3e9f156fb4 100644
--- a/lib/gitlab/import_export/relation_factory.rb
+++ b/lib/gitlab/import_export/relation_factory.rb
@@ -17,7 +17,8 @@ module Gitlab
auto_devops: :project_auto_devops,
label: :project_label,
custom_attributes: 'ProjectCustomAttribute',
- project_badges: 'Badge' }.freeze
+ project_badges: 'Badge',
+ ci_cd_settings: 'ProjectCiCdSetting' }.freeze
USER_REFERENCES = %w[author_id assignee_id updated_by_id user_id created_by_id last_edited_by_id merge_user_id resolved_by_id closed_by_id].freeze