- add_command_under_category(string, string, string, int, ruby_block)
- add_command(string, string, int, ruby_block)
Adding new gitlab-ctl
commands
New gitlab-ctl
commands can be added to two directory : files/gitlab-ctl-commands
and files/gitlab-ctl-commands-ee
. Chef stores gitlab-ctl
commands in /opt/gitlab/embedded/service/omnibus-ctl
.
There are two main functions you will use to add commands (https://github.com/chef/omnibus-ctl):
add_command_under_category(string, string, string, int, ruby_block)
This method will add a new command to your ctl under a category, useful for grouping similar commands together logically in help output.
Input arguments:
- Name of the command.
- Category of the command. It should be string consisting of only characters and “-“. If the category does not exist, it will be added. Default categories are “general” and “service-management” (if the latter is enabled).
- Description. This will be outputted below the command name when the help command is run.
- Ruby block. Ruby code to be executed when your command is run (arguments to that command will be passed into the block).
add_command(string, string, int, ruby_block)
This method will add a new command to your ctl without a category. It will be displayed above all categories when the help command is called.
Input arguments are the same as add_command_under_category
except 2 doesn’t exist.
Help and feedback
If there's something you don't like about this feature
To propose functionality that GitLab does not yet offer
To further help GitLab in shaping new features
If you didn't find what you were looking for
If you want help with something very specific to your use case, and can use some community support
POST ON GITLAB FORUM
If you have problems setting up or using this feature (depending on your GitLab subscription)
REQUEST SUPPORT
To view all GitLab tiers and features or to upgrade
If you want to try all features available in GitLab.com
If you want to try all features available in GitLab self-managed
If you spot an error or a need for improvement and would like to fix it yourself in a merge request
EDIT THIS PAGE
If you would like to suggest an improvement to this doc