Class: CapistranoMulticonfigParallel::SingleAppManager
- Inherits:
-
BaseManager
- Object
- BaseManager
- CapistranoMulticonfigParallel::SingleAppManager
- Includes:
- Celluloid, Celluloid::Logger
- Defined in:
- lib/capistrano_multiconfig_parallel/helpers/single_app_manager.rb
Overview
class used to find application dependencies
Instance Attribute Summary
Attributes inherited from BaseManager
#application, #args, #argv, #condition, #default_stage, #deps, #job_registered_condition, #jobs, #manager, #name, #original_argv, #stage
Instance Method Summary collapse
- #deploy_single_app(options) ⇒ Object
- #run ⇒ Object
- #run_custom_command(options) ⇒ Object
- #stage_deploy(options) ⇒ Object
Methods inherited from BaseManager
#can_start?, #can_tag_staging?, #check_before_starting, #check_giflow_tasks, #check_multi_stages, #collect_jobs, #configuration, #confirmation_applies_to_all_workers?, #custom_command?, #custom_commands, #deploy_app, #executes_deploy_stages?, #fetch_multi_stages, #get_app_additional_env_options, #initialize, #initialize_data, #multi_apps?, #process_jobs, #start, #tag_staging_exists?, #verify_options_custom_command, #wants_deploy_production?, #worker_environments
Constructor Details
This class inherits a constructor from CapistranoMulticonfigParallel::BaseManager
Instance Method Details
#deploy_single_app(options) ⇒ Object
41 42 43 44 45 46 |
# File 'lib/capistrano_multiconfig_parallel/helpers/single_app_manager.rb', line 41 def deploy_single_app() return if custom_command? collect_jobs() do || deploy_app() end end |
#run ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/capistrano_multiconfig_parallel/helpers/single_app_manager.rb', line 8 def run = {} if custom_command? run_custom_command() else deploy_single_app() end process_jobs end |
#run_custom_command(options) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/capistrano_multiconfig_parallel/helpers/single_app_manager.rb', line 18 def run_custom_command() return unless custom_command? = () action_name = @name if action_name == custom_commands[:stages] stage_deploy() else raise "Custom command #{@name} not available for single apps" end end |
#stage_deploy(options) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/capistrano_multiconfig_parallel/helpers/single_app_manager.rb', line 29 def stage_deploy() return unless custom_command? stages = fetch_multi_stages return if stages.blank? stages = check_multi_stages(stages) collect_jobs() do || stages.each do |stage| deploy_app(.merge('stage' => stage)) end end end |