Sha256: 7051f704ad485b32ee94f6943d969f9a7cc4f0166c1eef84fed10ec10ac14863

Contents?: true

Size: 945 Bytes

Versions: 18

Compression:

Stored size: 945 Bytes

Contents

# frozen_string_literal: true

require_relative "base"

module Neetob
  class CLI
    module Sre
      class Report < Base
        attr_accessor :environment

        def initialize(environment)
          super()
          @environment = environment
        end

        def run
          raise(StandardError, "Environment should be staging or production.") unless environments.include?(environment)

          RESOURCES.each do |product, values|
            next if environment == "staging" && [:NeetoDeploy, :NeetoCi].include?(product)

            ui.info "Processing for #{product}"
            ui.info `neetob sre checklist -a #{product} -e #{environment}`
            ui.info "\n\n"
          end
        end

        private

          def environments
            ["staging", "production"]
          end

          def pretty_print(command)
            ui.info `echo #{command} | sed 's/^/  /'`
          end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
neetob-0.5.16 lib/neetob/cli/sre/report.rb
neetob-0.5.15 lib/neetob/cli/sre/report.rb
neetob-0.5.14 lib/neetob/cli/sre/report.rb
neetob-0.5.13 lib/neetob/cli/sre/report.rb
neetob-0.5.12 lib/neetob/cli/sre/report.rb
neetob-0.5.11 lib/neetob/cli/sre/report.rb
neetob-0.5.10 lib/neetob/cli/sre/report.rb
neetob-0.5.9 lib/neetob/cli/sre/report.rb
neetob-0.5.8 lib/neetob/cli/sre/report.rb
neetob-0.5.7 lib/neetob/cli/sre/report.rb
neetob-0.5.6 lib/neetob/cli/sre/report.rb
neetob-0.5.5 lib/neetob/cli/sre/report.rb
neetob-0.5.4 lib/neetob/cli/sre/report.rb
neetob-0.5.3 lib/neetob/cli/sre/report.rb
neetob-0.5.2 lib/neetob/cli/sre/report.rb
neetob-0.5.1 lib/neetob/cli/sre/report.rb
neetob-0.5.0 lib/neetob/cli/sre/report.rb
neetob-0.4.37 lib/neetob/cli/sre/report.rb