lib/neetob/cli/sre/commands.rb in neetob-0.4.36 vs lib/neetob/cli/sre/commands.rb in neetob-0.4.37
- old
+ new
@@ -1,17 +1,33 @@
# frozen_string_literal: true
require "thor"
require_relative "check_essential_env"
+require_relative "checklist"
+require_relative "report"
module Neetob
class CLI
module Sre
class Commands < Thor
- desc "check_essential_env", "Confirm whether essential environment variables are set for all Neeto apps"
+ desc "check_essential_env", "Validate essential envs for all Neeto apps or for a single app you specify"
+ option :app, type: :string, aliases: :a, desc: "App name for validating essential envs for a single app, ex: neeto-deploy-web-production"
def check_essential_env
- CheckEssentialEnv.new.run
+ CheckEssentialEnv.new(options[:app]).run
+ end
+
+ desc "checklist", "Validate the Neeto SRE checklist for a single app"
+ option :app, type: :string, aliases: :a, desc: "App name, ex: NeetoChat", required: true
+ option :environment, type: :string, aliases: :e, desc: "Environment (staging/production)", required: true
+ def checklist
+ Checklist.new(options[:app], options[:environment]).run
+ end
+
+ desc "report", "Validate the Neeto SRE checklist for all apps"
+ option :environment, type: :string, aliases: :e, desc: "Environment (staging/production)", required: true
+ def report
+ Report.new(options[:environment]).run
end
end
end
end
end