Class: Pipely::Build::Definition
- Inherits:
-
Struct
- Object
- Struct
- Pipely::Build::Definition
- Defined in:
- lib/pipely/build/definition.rb
Overview
Represent a pipeline definition, built from a Template and some config.
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#env ⇒ Object
Returns the value of attribute env.
-
#s3_prefix ⇒ Object
Returns the value of attribute s3_prefix.
-
#scheduler ⇒ Object
Returns the value of attribute scheduler.
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config
6 7 8 |
# File 'lib/pipely/build/definition.rb', line 6 def config @config end |
#env ⇒ Object
Returns the value of attribute env
6 7 8 |
# File 'lib/pipely/build/definition.rb', line 6 def env @env end |
#s3_prefix ⇒ Object
Returns the value of attribute s3_prefix
6 7 8 |
# File 'lib/pipely/build/definition.rb', line 6 def s3_prefix @s3_prefix end |
#scheduler ⇒ Object
Returns the value of attribute scheduler
6 7 8 |
# File 'lib/pipely/build/definition.rb', line 6 def scheduler @scheduler end |
#template ⇒ Object
Returns the value of attribute template
6 7 8 |
# File 'lib/pipely/build/definition.rb', line 6 def template @template end |
Instance Method Details
#base_filename ⇒ Object
11 12 13 |
# File 'lib/pipely/build/definition.rb', line 11 def base_filename config[:namespace] end |
#pipeline_name ⇒ Object
7 8 9 |
# File 'lib/pipely/build/definition.rb', line 7 def pipeline_name config[:name] end |
#s3_path_builder ⇒ Object
15 16 17 |
# File 'lib/pipely/build/definition.rb', line 15 def s3_path_builder S3PathBuilder.new(config[:s3].merge(prefix: s3_prefix)) end |
#to_json ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/pipely/build/definition.rb', line 19 def to_json template.apply_config(:environment => env) template.apply_config(config) template.apply_config(s3_path_builder.to_hash) template.apply_config(scheduler.to_hash) template.to_json end |