RiotGamesCookbooks / artifact-cookbook

Provides your cookbooks with the Artifact Deploy LWRP
Other
134 stars 91 forks source link

Avoid the package extraction #163

Closed ntorres-globant closed 9 years ago

ntorres-globant commented 9 years ago

My application doesn't need to extract the war package. In fact "unzip" is not installed. Is it possible to skip the package extraction with a flag or something like it?

Thanks!

BarthV commented 9 years ago

I did it on my own wrapper. I'll check the code later, but it's not impossible at all :)

ntorres-globant commented 9 years ago

Actually, the version here: https://supermarket.chef.io/cookbooks/artifact/versions/1.12.1 (that is what the chef server automatically downloads when requested) is different from this repository contents.

The supermarket version has the package extraction for war files and the github version does not.

Since I need the later behaviour I just downloaded the code and manually uploaded to the chef server bypassing the supermarket.

Thanks BarthV for your response.

More details

Here: https://github.com/RiotGamesCookbooks/artifact-cookbook/blob/master/providers/deploy.rb

when /(war|jar)$/
  ruby_block "Copy War/JAR File to Release_Path" do
    block do
      ::FileUtils.cp "#{cached_tar_path}", "#{release_path}"
    end

and the supermarket version (BTW: both same version number 1.12.1)

when /zip|war|jar/ if Chef::Artifact.windows? windows_zipfile release_path do source cached_tar_path overwrite true retries 2 end else package "unzip" execute "extract_artifact!" do command "unzip -q -u -o #{cached_tar_path} -d #{release_path}" user new_resource.owner group new_resource.group retries 2 end end

frntn commented 9 years ago

I'm having the same issue here. Any idea when the supermarket repo will be synced ? (I 'd like to keep on using Berkshelf and prevent myself from manual hacks)