class Artifactory::Resource::Artifact
def copy_or_move(action, destination, options = {})
-
(Hash)
-
Options Hash:
(**options)
-
:dry_run
(Boolean
) -- -
:suppress_layouts
(Boolean
) -- -
:fail_fast
(Boolean
) --
Parameters:
-
options
(Hash
) -- -
destination
(String
) -- -
action
(Symbol
) --
Other tags:
- Example: Copy the current artifact to +ext-releases-local+ -
Example: Move the current artifact to +ext-releases-local+ -
def copy_or_move(action, destination, options = {}) params = {}.tap do |param| param[:to] = destination param[:failFast] = 1 if options[:fail_fast] param[:suppressLayouts] = 1 if options[:suppress_layouts] param[:dry] = 1 if options[:dry_run] end endpoint = File.join('/api', action.to_s, relative_path) + "?#{to_query_string_parameters(params)}" client.post(endpoint, {}) end