diff options
Diffstat (limited to 'lib/tasks/gitlab/smtp.rake')
-rw-r--r-- | lib/tasks/gitlab/smtp.rake | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/smtp.rake b/lib/tasks/gitlab/smtp.rake new file mode 100644 index 00000000000..23ad7577e3c --- /dev/null +++ b/lib/tasks/gitlab/smtp.rake @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +namespace :gitlab do + namespace :smtp do + namespace :secret do + desc 'GitLab | SMTP | Secret | Write SMTP secrets' + task write: [:environment] do + content = $stdin.tty? ? $stdin.gets : $stdin.read + Gitlab::EncryptedSmtpCommand.write(content) + end + + desc 'GitLab | SMTP | Secret | Edit SMTP secrets' + task edit: [:environment] do + Gitlab::EncryptedSmtpCommand.edit + end + + desc 'GitLab | SMTP | Secret | Show SMTP secrets' + task show: [:environment] do + Gitlab::EncryptedSmtpCommand.show + end + end + end +end |