Sha256: 3ef411adddc23cef2d10a79f6baa3a5c2394de0061fcb302c0021c539437034f

Contents?: true

Size: 1.29 KB

Versions: 117

Compression:

Stored size: 1.29 KB

Contents

# frozen_string_literal: true

require 'avm/instances/runner'
require 'avm/path_string'
require 'eac_cli/core_ext'

module Avm
  module EacWebappBase0
    module Instances
      module Runners
        class Deploy
          runner_with :help do
            desc 'Deploy for instance.'
            arg_opt '-r', '--reference', 'Git reference to deploy.'
            arg_opt '-a', '--append-dirs', 'Append directories to deploy (List separated by ":").'
            bool_opt '-T', '--no-request-test', 'Do not test web interface after deploy.'
          end

          def deploy_class
            runner_context.call(:stereotype_module).const_get('Instances').const_get('Deploy')
          rescue ::NameError
            runner_context.call(:stereotype_module).const_get('Deploy')
          end

          def run
            result = deploy_class.new(runner_context.call(:instance), deploy_options).run
            if result.error?
              fatal_error result.to_s
            else
              infov 'Result', result.label
            end
          end

          def deploy_options
            { reference: parsed.reference,
              appended_directories: ::Avm::PathString.paths(parsed.append_dirs),
              no_request_test: parsed.no_request_test? }
          end
        end
      end
    end
  end
end

Version data entries

117 entries across 117 versions & 2 rubygems

Version Path
avm-eac_webapp_base0-0.19.0 lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.87.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
avm-eac_webapp_base0-0.18.4 lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.86.8 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.84.2 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
avm-eac_webapp_base0-0.18.3 lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.84.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.84.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.83.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.82.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.81.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.80.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.79.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.78.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.77.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.77.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.76.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.76.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.75.2 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.75.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb