oneops-admin/lib/shared/cookbooks/artifact/libraries/chef_artifact.rb
# Downloads a file to disk from the configured Nexus server.
# 
# @param  node [Chef::Node] the node
# @param  source [String] a colon-separated Maven identified string that represents the artifact
# @param  destination_dir [String] a path to download the artifact to
#
# @option options [Boolean] :ssl_verify
#   a boolean to pass through to the NexusCli::RemoteFactory#create method indicated whether
#   ssl methods should or should not be verified.
# 
# @return [Hash] writes a file to disk and returns a Hash with
# information about that file. See NexusCli::ArtifactActions#pull_artifact.
Downloads a file to disk from the configured Nexus server.
Downloads a file to disk from the configured Nexus server .
def retrieve_from_nexus(node, source, destination_dir, options = {})
        require 'nexus_cli'
        config = data_bag_config_for(node, DATA_BAG_NEXUS)
        if config.empty?
          raise DataBagNotFound.new(DATA_BAG_NEXUS)
        end
        remote = NexusCli::RemoteFactory.create(config, options[:ssl_verify])
        remote.pull_artifact(source, destination_dir)
      end
def retrieve_from_nexus ( node , source , destination_dir , options = { } ) require 'nexus_cli' config = data_bag_config_for ( node , DATA_BAG_NEXUS ) if config . empty? raise DataBagNotFound . new ( DATA_BAG_NEXUS ) end remote = NexusCli :: RemoteFactory . create ( config , options [ :ssl_verify ] ) remote . pull_artifact ( source , destination_dir ) end
Downloads a file to disk from the configured Nexus server.
Downloads a file to disk from the configured Nexus server .
writes a file to disk and returns a Hash with information about that file. See NexusCli::ArtifactActions#pull_artifact.
writes a file to disk and returns a Hash with information about that file . See NexusCli :: ArtifactActions#pull_artifact .
Hash
node
None
source
a colon-separated Maven identified string that represents the artifact
a colon - separated Maven identified string that represents the artifact
destination_dir
a path to download the artifact to
a path to download the artifact to
options
:ssl_verify a boolean to pass through to the NexusCli::RemoteFactory#create method indicated whether ssl methods should or should not be verified.
: ssl_verify a boolean to pass through to the NexusCli :: RemoteFactory#create method indicated whether ssl methods should or should not be verified .