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
eac_tools-0.75.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
avm-eac_webapp_base0-0.18.2 lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.74.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.74.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.73.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.72.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
avm-eac_webapp_base0-0.18.1 lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.70.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
avm-eac_webapp_base0-0.18.0 lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.70.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.69.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.69.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.68.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.67.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
avm-eac_webapp_base0-0.17.2 lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.67.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
avm-eac_webapp_base0-0.17.1 lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.66.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.65.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb
eac_tools-0.65.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/deploy.rb