Class: Central::Cli::Apps::DeployCommand
- Inherits:
-
Clamp::Command
- Object
- Clamp::Command
- Central::Cli::Apps::DeployCommand
- Includes:
- Common, DockerHelper, Common, StackOptions
- Defined in:
- lib/central/cli/apps/deploy_command.rb
Instance Attribute Summary collapse
-
#deploy_queue ⇒ Object
readonly
Returns the value of attribute deploy_queue.
-
#service_prefix ⇒ Object
readonly
Returns the value of attribute service_prefix.
-
#services ⇒ Object
readonly
Returns the value of attribute services.
Instance Method Summary collapse
Methods included from DockerHelper
#build_docker_image, #dockerfile_exist?, #image_exist?, #process_docker_images, #push_docker_image, #run_pre_build_hook, #validate_image_name
Methods included from Common
#app_json, #create_yml, #current_dir, #extend_env_vars, #extend_options, #extend_secrets, #load_services, #normalize_env_vars, #parse_services, #prefixed_name, #require_config_file, #service_exists?, #token, #valid_addons
Methods included from Services::ServicesHelper
#create_service, #delete_service, #deploy_service, #get_service, #int_to_filesize, #parse_image, #parse_links, #parse_log_opts, #parse_memory, #parse_ports, #parse_relative_time, #parse_secrets, #parse_service_id, #restart_service, #scale_service, #show_service, #start_service, #stop_service, #update_service, #wait_for_deploy_to_finish
Methods included from Common
#access_token=, #add_master, #api_url, #api_url=, #clear_current_stack, #client, #current_master, #current_master=, #current_master_index, #current_stack, #current_stack=, #ensure_custom_ssl_ca, #require_api_url, #require_current_stack, #require_token, #reset_client, #save_settings, #settings, #settings_filename
Methods included from StackOptions
Instance Attribute Details
#deploy_queue ⇒ Object (readonly)
Returns the value of attribute deploy_queue.
20 21 22 |
# File 'lib/central/cli/apps/deploy_command.rb', line 20 def deploy_queue @deploy_queue end |
#service_prefix ⇒ Object (readonly)
Returns the value of attribute service_prefix.
20 21 22 |
# File 'lib/central/cli/apps/deploy_command.rb', line 20 def service_prefix @service_prefix end |
#services ⇒ Object (readonly)
Returns the value of attribute services.
20 21 22 |
# File 'lib/central/cli/apps/deploy_command.rb', line 20 def services @services end |
Instance Method Details
#execute ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/central/cli/apps/deploy_command.rb', line 22 def execute require_api_url require_token require_config_file(filename) @deploy_queue = [] @service_prefix = project_name || current_dir @services = load_services(filename, service_list, service_prefix) process_docker_images(services) unless no_build? create_or_update_services(services) deploy_services(deploy_queue) end |