Class: Mrsk::Commands::Builder

Inherits:
Base
  • Object
show all
Defined in:
lib/mrsk/commands/builder.rb

Defined Under Namespace

Classes: Base, Multiarch, Native

Constant Summary

Constants inherited from Base

Mrsk::Commands::Base::MAX_LOG_SIZE

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#container_id_for, #initialize, #run_over_ssh

Constructor Details

This class inherits a constructor from Mrsk::Commands::Base

Instance Method Details

#multiarchObject



29
30
31
# File 'lib/mrsk/commands/builder.rb', line 29

def multiarch
  @multiarch ||= Mrsk::Commands::Builder::Multiarch.new(config)
end

#multiarch_remoteObject



33
34
35
# File 'lib/mrsk/commands/builder.rb', line 33

def multiarch_remote
  @multiarch_remote ||= Mrsk::Commands::Builder::Multiarch::Remote.new(config)
end

#nameObject



4
5
6
# File 'lib/mrsk/commands/builder.rb', line 4

def name
  target.class.to_s.remove("Mrsk::Commands::Builder::").underscore
end

#nativeObject



21
22
23
# File 'lib/mrsk/commands/builder.rb', line 21

def native
  @native ||= Mrsk::Commands::Builder::Native.new(config)
end

#native_remoteObject



25
26
27
# File 'lib/mrsk/commands/builder.rb', line 25

def native_remote
  @native ||= Mrsk::Commands::Builder::Native::Remote.new(config)
end

#targetObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/mrsk/commands/builder.rb', line 8

def target
  case
  when config.builder && config.builder["multiarch"] == false
    native
  when config.builder && config.builder["local"] && config.builder["remote"]
    multiarch_remote
  when config.builder && config.builder["remote"]
    native_remote
  else
    multiarch
  end
end