Class: Navy::TaskContainerBuilder
- Inherits:
-
Object
- Object
- Navy::TaskContainerBuilder
- Includes:
- ContainerBuilding
- Defined in:
- lib/navy/task_container_builder.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#cluster ⇒ Object
readonly
Returns the value of attribute cluster.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#convoy_id ⇒ Object
readonly
Returns the value of attribute convoy_id.
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#specification ⇒ Object
readonly
Returns the value of attribute specification.
Instance Method Summary collapse
- #build_post ⇒ Object
- #build_pre ⇒ Object
-
#initialize(app, config, options) ⇒ TaskContainerBuilder
constructor
A new instance of TaskContainerBuilder.
Constructor Details
#initialize(app, config, options) ⇒ TaskContainerBuilder
Returns a new instance of TaskContainerBuilder.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/navy/task_container_builder.rb', line 6 def initialize(app, config, ) @app = app @config = config @options = @convoy_id = [:convoy] @cluster = [:cluster] @specification = { :type => "task", :env => {}, :links => [], :volumes_from => [] } @dependencies = [] end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
4 5 6 |
# File 'lib/navy/task_container_builder.rb', line 4 def app @app end |
#cluster ⇒ Object (readonly)
Returns the value of attribute cluster.
4 5 6 |
# File 'lib/navy/task_container_builder.rb', line 4 def cluster @cluster end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
4 5 6 |
# File 'lib/navy/task_container_builder.rb', line 4 def config @config end |
#convoy_id ⇒ Object (readonly)
Returns the value of attribute convoy_id.
4 5 6 |
# File 'lib/navy/task_container_builder.rb', line 4 def convoy_id @convoy_id end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
4 5 6 |
# File 'lib/navy/task_container_builder.rb', line 4 def dependencies @dependencies end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/navy/task_container_builder.rb', line 4 def @options end |
#specification ⇒ Object (readonly)
Returns the value of attribute specification.
4 5 6 |
# File 'lib/navy/task_container_builder.rb', line 4 def specification @specification end |
Instance Method Details
#build_post ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/navy/task_container_builder.rb', line 34 def build_post tasks = config.post_tasks(app.name) unless tasks.empty? build_task_container_settings(:post, app, config, tasks) build_mode_dependencies(app, config) build_app_links(app, config) build_dep_links(app, config) build_env_flags(app, config) build_volumes_flags(app, config) build_additional_args(app, config) build_container end end |
#build_pre ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/navy/task_container_builder.rb', line 21 def build_pre tasks = config.pre_tasks(app.name) unless tasks.empty? build_task_container_settings(:pre, app, config, tasks) build_app_dependencies(app, config) build_dep_links(app, config) build_env_flags(app, config) build_volumes_flags(app, config) build_additional_args(app, config) build_container end end |