From e406986d9e848fe2cd490815a0279e46f3a16e24 Mon Sep 17 00:00:00 2001 From: KAllan357 Date: Mon, 20 May 2013 14:34:31 -0700 Subject: [PATCH] more logging on Nexus operations --- libraries/chef_artifact.rb | 3 ++- providers/deploy.rb | 10 ++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/libraries/chef_artifact.rb b/libraries/chef_artifact.rb index 3c6627e..c0d6f2f 100644 --- a/libraries/chef_artifact.rb +++ b/libraries/chef_artifact.rb @@ -101,6 +101,7 @@ def get_actual_version(node, artifact_location, ssl_verify=true) require 'rexml/document' config = nexus_config_for(node) remote = NexusCli::RemoteFactory.create(config, ssl_verify) + Chef::Log.info "artifact_deploy[get_actual_version] Finding latest version for #{artifact_location}." REXML::Document.new(remote.get_artifact_info(artifact_location)).elements["//version"].text else version @@ -167,4 +168,4 @@ def get_current_deployed_version(deploy_to_dir) end end end -end \ No newline at end of file +end diff --git a/providers/deploy.rb b/providers/deploy.rb index 6fd9b68..4ef3156 100644 --- a/providers/deploy.rb +++ b/providers/deploy.rb @@ -559,8 +559,6 @@ def latest?(version) end # Defines a resource call for downloading the remote artifact. - # - # @return [void] def retrieve_from_http remote_file cached_tar_path do source new_resource.artifact_location @@ -574,9 +572,11 @@ def retrieve_from_http end # Defines a remote_file resource call to download an artifact from Nexus. - # - # @return [void] def retrieve_from_nexus + log "artifact_deploy[retrieve_from_nexus] Retrieving artifact from Nexus with identifier of #{new_resource.artifact_location}." do + level :info + end + remote_file cached_tar_path do source Chef::Artifact.artifact_download_url_for(node, new_resource.artifact_location) owner new_resource.owner @@ -588,8 +588,6 @@ def retrieve_from_nexus end # Defines a resource call for a file already on the file system. - # - # @return [void] def retrieve_from_local execute "copy artifact from #{new_resource.artifact_location} to #{cached_tar_path}" do command Chef::Artifact.copy_command_for(new_resource.artifact_location, cached_tar_path)