Module: HybridPlatformsConductor::Deployer::ConfigDSLExtension

Defined in:
lib/hybrid_platforms_conductor/deployer.rb

Overview

Extend the Config DSL

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#deployment_logsObject (readonly)

List of log plugins. Each info has the following properties:

  • nodes_selectors_stack (Array<Object>): Stack of nodes selectors impacted by this rule.

  • log_plugins (Array<Symbol>): List of log plugins to be used to store deployment logs.

Array< Hash<Symbol, Object> >



28
29
30
# File 'lib/hybrid_platforms_conductor/deployer.rb', line 28

def deployment_logs
  @deployment_logs
end

#packaging_timeout_secsObject (readonly)

Integer: Timeout (in seconds) for packaging repositories



31
32
33
# File 'lib/hybrid_platforms_conductor/deployer.rb', line 31

def packaging_timeout_secs
  @packaging_timeout_secs
end

Instance Method Details

#init_deployer_configObject

Mixin initializer



34
35
36
37
# File 'lib/hybrid_platforms_conductor/deployer.rb', line 34

def init_deployer_config
  @packaging_timeout_secs = 60
  @deployment_logs = []
end

#packaging_timeout(packaging_timeout_secs) ⇒ Object

Set the packaging timeout

Parameters
  • packaging_timeout_secs (Integer): The packaging timeout, in seconds



43
44
45
# File 'lib/hybrid_platforms_conductor/deployer.rb', line 43

def packaging_timeout(packaging_timeout_secs)
  @packaging_timeout_secs = packaging_timeout_secs
end

#send_logs_to(*log_plugins) ⇒ Object

Set the deployment log plugins to be used

Parameters
  • log_plugins (Symbol or Array<Symbol>): The list of (or single) log plugins to be used



51
52
53
54
55
56
# File 'lib/hybrid_platforms_conductor/deployer.rb', line 51

def send_logs_to(*log_plugins)
  @deployment_logs << {
    nodes_selectors_stack: current_nodes_selectors_stack,
    log_plugins: log_plugins.flatten
  }
end