Documentation needed for adding custom service templates
Currently there is no documentation on how to add custom service templates.
I had to spend a while searching for locations of files and where to define things to get create a new one. The one I created was a modification to the Slack service template, that allows a separate slack webhook for CI events
The route I took was:
- Add the service in:
/opt/gitlab/embedded/service/gitlab-rails/app/models/project_service/new_service.rb
The next 2 steps need to be repeated after an upgrade
- Add the
to_param
in:
/opt/gitlab/embedded/service/gitlab-rails/app/models/service.rb
- And add field names allowed in:
/opt/gitlab/embedded/service/gitlab-rails/app/controllers/projects/services_controller.rb
This requires gitlab-ctl restart unicorn which requires a short downtime
Existing projects need to have the "save" button clicked within "services"