Class: Chef::Provider::Deploy::Revision
- Inherits:
-
Chef::Provider::Deploy
- Object
- Chef::Provider
- Chef::Provider::Deploy
- Chef::Provider::Deploy::Revision
- Defined in:
- lib/chef/provider/deploy/revision.rb
Constant Summary
Constants included from Mixin::ShellOut
Mixin::ShellOut::DEPRECATED_OPTIONS
Instance Attribute Summary
Attributes inherited from Chef::Provider::Deploy
#previous_release_path, #release_path, #scm_provider, #shared_path
Attributes inherited from Chef::Provider
#action, #cookbook_name, #current_resource, #new_resource, #recipe_name, #run_context
Instance Method Summary collapse
Methods inherited from Chef::Provider::Deploy
#action_force_deploy, #action_rollback, #callback, #copy_cached_repo, #create_dirs_before_symlink, #define_resource_requirements, #deploy, #enforce_ownership, #initialize, #link_current_release_to_production, #link_tempfiles_to_current_release, #load_current_resource, #migrate, #purge_tempfiles_from_current_release, #restart, #rollback, #rollback_to, #run, #run_scm_sync, #run_symlinks_before_migrate, #sudo, #svn_force_export, #symlink, #update_cached_repo, #verify_directories_exist, #whyrun_supported?
Methods included from Mixin::Command
#chdir_or_tmpdir, #handle_command_failures, #output_of_command, #run_command, #run_command_and_return_stdout_stderr, #run_command_with_systems_locale
Methods included from Mixin::Command::Windows
Methods included from Mixin::Command::Unix
Methods included from Mixin::FromFile
Methods included from DSL::Recipe
#build_resource, #declare_resource, #describe_self_for_error, #evaluate_resource_definition, #exec, #has_resource_definition?, #have_resource_class_for?, #method_missing, #resource_class_for
Methods included from Mixin::ConvertToClassName
#constantize, #convert_to_class_name, #convert_to_snake_case, #filename_to_qualified_string, #snake_case_basename
Methods included from Mixin::ShellOut
#run_command_compatible_options, #shell_out, #shell_out!, #shell_out_with_systems_locale, #shell_out_with_systems_locale!
Methods inherited from Chef::Provider
#action_nothing, #cleanup_after_converge, #converge_by, #define_resource_requirements, #events, #initialize, #load_current_resource, #node, node_map, #process_resource_requirements, provides, provides?, #requirements, #resource_collection, #resource_updated?, #run_action, #set_updated_status, supports?, #whyrun_mode?, #whyrun_supported?
Methods included from Mixin::DescendantsTracker
#descendants, descendants, direct_descendants, #direct_descendants, find_descendants_by_name, #find_descendants_by_name, #inherited, store_inherited
Constructor Details
This class inherits a constructor from Chef::Provider::Deploy
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Chef::DSL::Recipe
Instance Method Details
#action_deploy ⇒ Object
37 38 39 40 |
# File 'lib/chef/provider/deploy/revision.rb', line 37 def action_deploy validate_release_history! super end |
#all_releases ⇒ Object
33 34 35 |
# File 'lib/chef/provider/deploy/revision.rb', line 33 def all_releases sorted_releases end |
#cleanup! ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/chef/provider/deploy/revision.rb', line 42 def cleanup! super known_releases = sorted_releases Dir["#{Chef::Util::PathHelper.escape_glob(new_resource.deploy_to)}/releases/*"].each do |release_dir| unless known_releases.include?(release_dir) converge_by("Remove unknown release in #{release_dir}") do FileUtils.rm_rf(release_dir) end end end end |