Chapter 09/circuit-oneops-1-master/components/cookbooks/artifact/providers/deploy.rb
# Copies the artifact from its cached path to its release path. The cached path is
# the configured Chef::Config[:file_cache_path]/artifact_deploys
#
# @example
#   cp /tmp/vagrant-chef-1/artifact_deploys/artifact_test/1.0.0/my-artifact /srv/artifact_test/releases/1.0.0
#
# @return [void]
Copies the artifact from its cached path to its release path. The cached path is
the configured Chef::Config[:file_cache_path]/artifact_deploys
Copies the artifact from its cached path to its release path . The cached path is the configured Chef :: Config [ : file_cache_path ] / artifact_deploys
def copy_artifact
  recipe_eval do
    execute "copy artifact" do
      command Chef::Artifact.copy_command_for(cached_tar_path, release_path)
      user new_resource.owner unless Chef::Artifact.windows?
      group new_resource.group unless Chef::Artifact.windows?
    end
  end
end
def copy_artifact recipe_eval do execute "copy artifact" do command Chef :: Artifact . copy_command_for ( cached_tar_path , release_path ) user new_resource . owner unless Chef :: Artifact . windows? group new_resource . group unless Chef :: Artifact . windows? end end end
Copies the artifact from its cached path to its release path.
Copies the artifact from its cached path to its release path .
None
void
example
cp /tmp/vagrant-chef-1/artifact_deploys/artifact_test/1.0.0/my-artifact /srv/artifact_test/releases/1.0.0
cp / tmp / vagrant - chef - 1 / artifact_deploys / artifact_test / 1 . 0 . 0 / my - artifact / srv / artifact_test / releases / 1 . 0 . 0