class Artifactory::Resource::Artifact
- Artifactory::Resource::Artifact
- Artifactory::Resource::Base
- Reference
- Object
Included Modules
- JSON::Serializable
Extended Modules
Defined in:
artifactory/resources/artifact.crConstant Summary
-
CHECKSUM_SEARCH_URL =
"artifactory/api/search/checksum"
-
FETCH_URL_BASE =
"artifactory/storage"
-
PROP_SEARCH_URL =
"artifactory/api/search/prop"
-
SEARCH_URL =
"artifactory/api/search/artifact"
Constructors
Class Method Summary
Instance Method Summary
- #checksums : Hash(String, String)
- #checksums=(checksums : Hash(String, String))
-
#copy(destination, **options)
See #copy_or_move
-
#copy_or_move(action, destination, **options)
Copy or move current artifact to a new destination.
- #created : Time | Nil
- #created=(created : Time | Nil)
- #created_by : String | Nil
- #created_by=(created_by : String | Nil)
- #del_properties(*prop_names)
-
#delete
Delete this artifact from repository, suppressing any +ResourceNotFound+ exceptions might occur.
- #download_uri : String | Nil
- #download_uri=(download_uri : String | Nil)
- #get_contents
- #last_modified : Time | Nil
- #last_modified=(last_modified : Time | Nil)
- #last_updated : Time | Nil
- #last_updated=(last_updated : Time | Nil)
- #local_path : String | Nil
- #local_path=(local_path : String | Nil)
- #logger
-
#md5
The MD5 of this artifact.
- #mime_type : String | Nil
- #mime_type=(mime_type : String | Nil)
- #modified_by : String | Nil
- #modified_by=(modified_by : String | Nil)
-
#move(destination, **options)
See #copy_or_move
- #original_checksums : Hash(String, String)
- #original_checksums=(original_checksums : Hash(String, String))
- #path : String
- #path=(path : String)
-
#properties : Hash(String, JSON::Any)
GET /api/storage/libs-release-local/org/acme?properties[=x[,y]] { "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme" "properties":{ "p1": ["v1","v2","v3"], "p2": ["v4","v5","v6"] } }
-
#relative_path
Helper method for extracting the relative (repo) path, since it's not returned as part of the API.
- #replace_properties(new_properties : Hash(String, String) = Hash(String, String).new, **props)
- #repo : String
- #repo=(repo : String)
-
#sha1
The SHA of this artifact.
- #sha256
- #size : String
- #size=(size : String)
- #update_properties(new_properties : Hash(String, String) = Hash(String, String).new, **props)
-
#upload(repo : String | Nil = nil, remote_path : String | Nil = nil, headers : Hash(String, String) = Hash(String, String).new, properties : Hash(String, String) = Hash(String, String).new, **props)
Upload an artifact into the repository.
- #uri : String | Nil
- #uri=(uri : String | Nil)
Instance methods inherited from class Artifactory::Resource::Base
client : Artifactory::Client
client,
client=(client : Artifactory::Client)
client=,
to_s(io)
to_s,
url_safe(value)
url_safe
Constructor Detail
Class Method Detail
Instance Method Detail
Copy or move current artifact to a new destination.
@example Move the current artifact to +ext-releases-local+ artifact.move(to: '/ext-releaes-local/org/acme') @example Copy the current artifact to +ext-releases-local+ artifact.move(to: '/ext-releaes-local/org/acme')
@param [Symbol] action the action (+:move+ or +:copy+) @param [String] destination the server-side destination to move or copy the artifact @param [Hash] options the list of options to pass
@option options [Boolean] :fail_fast (default: +false+) fail on the first failure @option options [Boolean] :suppress_layouts (default: +false+) suppress cross-layout module path translation during copying or moving @option options [Boolean] :dry_run (default: +false+) pretend to do the copy or move
@return [Hash] the parsed JSON response from the server
Delete this artifact from repository, suppressing any +ResourceNotFound+ exceptions might occur.
GET /api/storage/libs-release-local/org/acme?properties[=x[,y]] { "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme" "properties":{ "p1": ["v1","v2","v3"], "p2": ["v4","v5","v6"] } }
Helper method for extracting the relative (repo) path, since it's not returned as part of the API.
@example Get the relative URI from the resource /libs-release-local/org/acme/artifact.deb
@return [String]
Upload an artifact into the repository. If the first parameter is a File object, that file descriptor is passed to the uploader. If the first parameter is a string, it is assumed to be the path to a local file on disk. This method will automatically construct the File object from the given path.
@see bit.ly/1dhJRMO Artifactory Matrix Properties
@example Upload an artifact from a File instance artifact = Artifact.new(local_path: '/local/path/to/file.deb') artifact.upload('libs-release-local', '/remote/path')
@example Upload an artifact with matrix properties artifact = Artifact.new(local_path: '/local/path/to/file.deb') artifact.upload('libs-release-local', "/remote/path", status: 'DEV', rating: 5, branch: 'master' )
@param [String] repo the key of the repository to which to upload the file @param [String] remote_path the path where this resource will live in the remote artifactory repository, relative to the repository key @param [Hash] headers the list of headers to send with the request @param [Hash] properties a list of matrix properties