summaryrefslogtreecommitdiff
path: root/lib/tasks/gitlab/service_desk_email.rake
blob: 39c9d40bf5cf0d8973c3759cb7755d839e91ec28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

namespace :gitlab do
  namespace :service_desk_email do
    namespace :secret do
      desc 'GitLab | Service Desk Email | Secret | Write Service Desk Email secrets'
      task write: [:environment] do
        content = $stdin.tty? ? $stdin.gets : $stdin.read
        Gitlab::EncryptedServiceDeskEmailCommand.write(content)
      end

      desc 'GitLab | Service Desk Email | Secret | Edit Service Desk Email secrets'
      task edit: [:environment] do
        Gitlab::EncryptedServiceDeskEmailCommand.edit
      end

      desc 'GitLab | Service Desk Email | Secret | Show Service Desk Email secrets'
      task show: [:environment] do
        Gitlab::EncryptedServiceDeskEmailCommand.show
      end
    end
  end
end