Add migration to execute SelfMonitoring::Project::CreateService
What does this MR do?
This MR adds a migration to create a project for self-monitoring the GitLab instance by executing the SelfMonitoring::Project::CreateService
service. The service is copied into the migration to prevent changes to the service from causing migration failures later. There is a migration spec as well, which should also help to prevent code changes from causing migration failures.
The db/post_migrate/20190809072552_set_self_monitoring_project_alerting_token.rb
migration is EE only. It generates an alertmanager token for the above project, and stores it in the project_alerting_settings
DB table.
EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15071
Docs MR: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31530
Issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/56883
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios. -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content