mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-08-01 15:53:04 +00:00
24 lines
756 B
Ruby
24 lines
756 B
Ruby
# frozen_string_literal: true
|
|
|
|
namespace :gitlab do
|
|
namespace :redis do
|
|
namespace :secret do
|
|
desc "GitLab | Redis | Secret | Show Redis secret"
|
|
task :show, [:instance_name] => [:environment] do |_t, args|
|
|
Gitlab::EncryptedRedisCommand.show(args: args)
|
|
end
|
|
|
|
desc "GitLab | Redis | Secret | Edit Redis secret"
|
|
task :edit, [:instance_name] => [:environment] do |_t, args|
|
|
Gitlab::EncryptedRedisCommand.edit(args: args)
|
|
end
|
|
|
|
desc "GitLab | Redis | Secret | Write Redis secret"
|
|
task :write, [:instance_name] => [:environment] do |_t, args|
|
|
content = $stdin.tty? ? $stdin.gets : $stdin.read
|
|
Gitlab::EncryptedRedisCommand.write(content, args: args)
|
|
end
|
|
end
|
|
end
|
|
end
|