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
#exec, #have_resource_class_for?, #resource_class_for
Methods included from Mixin::LazyModuleInclude
#descendants, #include, #included
Methods included from DSL::MethodMissing
#describe_self_for_error, #method_missing
Methods included from DSL::Definitions
add_definition, #evaluate_resource_definition, #has_resource_definition?
Methods included from DSL::Resources
add_resource_dsl, remove_resource_dsl
Methods included from DSL::ChefProvisioning
Methods included from DSL::Cheffish
Methods included from DSL::Powershell
Methods included from DSL::Audit
Methods included from DSL::RebootPending
Methods included from DSL::PlatformIntrospection
#docker?, #platform?, #platform_family?, #value_for_platform, #value_for_platform_family
Methods included from DSL::RegistryHelper
#registry_data_exists?, #registry_get_subkeys, #registry_get_values, #registry_has_subkeys?, #registry_key_exists?, #registry_value_exists?
Methods included from DSL::IncludeRecipe
#include_recipe, #load_recipe, #require_recipe
Methods included from DSL::DataQuery
#data_bag, #data_bag_item, #search
Methods included from EncryptedDataBagItem::CheckEncrypted
Methods included from Mixin::NotifyingBlock
#notifying_block, #subcontext_block
Methods included from DSL::DeclareResource
#build_resource, #declare_resource, #delete_resource, #delete_resource!, #edit_resource, #edit_resource!, #find_resource, #find_resource!, #with_run_context
Methods included from Mixin::ShellOut
#run_command_compatible_options, #shell_out, #shell_out!, #shell_out_with_systems_locale, #shell_out_with_systems_locale!
Methods included from Mixin::PowershellOut
#powershell_out, #powershell_out!
Methods included from Mixin::WindowsArchitectureHelper
#assert_valid_windows_architecture!, #disable_wow64_file_redirection, #forced_32bit_override_required?, #is_i386_process_on_x86_64_windows?, #node_supports_windows_architecture?, #node_windows_architecture, #restore_wow64_file_redirection, #valid_windows_architecture?, #with_os_architecture, #wow64_architecture_override_required?, #wow64_directory
Methods inherited from Chef::Provider
#action_nothing, #check_resource_semantics!, #cleanup_after_converge, #converge_by, #converge_if_changed, #define_resource_requirements, #events, include_resource_dsl, include_resource_dsl_module, #initialize, #load_current_resource, #node, #process_resource_requirements, provides, provides?, #requirements, #resource_collection, #resource_updated?, #run_action, #set_updated_status, supports?, use_inline_resources, #whyrun_mode?, #whyrun_supported?
Methods included from Mixin::Provides
#provided_as, #provides, #provides?
Methods included from Mixin::DescendantsTracker
#descendants, descendants, direct_descendants, #direct_descendants, find_descendants_by_name, #find_descendants_by_name, #inherited, store_inherited
Methods included from Chef::Provider::DeprecatedLWRPClass
#const_missing, #deprecated_constants, #register_deprecated_lwrp_class
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::MethodMissing
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_dir(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 |