Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks/gitlab/redis.rake')
-rw-r--r--lib/tasks/gitlab/redis.rake23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/redis.rake b/lib/tasks/gitlab/redis.rake
new file mode 100644
index 00000000000..6983c5fc318
--- /dev/null
+++ b/lib/tasks/gitlab/redis.rake
@@ -0,0 +1,23 @@
+# 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