Package tlib :: Package base :: Module ArtifactoryHelper :: Class ArtifactoryHelper
[hide private]
[frames] | no frames]

Class ArtifactoryHelper

object --+
         |
        ArtifactoryHelper

Helper class to facilitate interacting with Artifactory

Instance Methods [hide private]
 
__init__(self, repository, group_id)
Constructor method :param repository: (str) Name of the repo in Artifactory (ie: libs-release-local) :param group_id: (str) Name of the group in Artifactory (ie: com.ypg.yid)
 
cleanup_downloads(self, downloads)
Removes the specified files :param downloads: (list) a list of files to delete :return: (bool) If files were removed or not
 
get_artifact(self, artifact_id, version, criteria=None)
Fetches the artifact from Artifactory and write the file to disk.
 
get_versions(self, artifact_id)
Retrieve all the available versions for the specified artifact :param artifact_id: (str) name of the artifact in Artifactory :return: (list) A list of versions sorted from latest to oldest

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  build_server_url = 'http://artifactory.ypdev.ca/artifactory'
  group_id = ''
  repository = ''
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, repository, group_id)
(Constructor)

 

Constructor method :param repository: (str) Name of the repo in Artifactory (ie: libs-release-local) :param group_id: (str) Name of the group in Artifactory (ie: com.ypg.yid)

Overrides: object.__init__

get_artifact(self, artifact_id, version, criteria=None)

 

Fetches the artifact from Artifactory and write the file to disk. A criteria can be added to help :param artifact_id: (str) name of the artifact in Artifactory :param version: (str) numeric representation of the artifact version :param criteria: (str) a filter criteria for choosing the artifact to download (ex: .jar, -QA.msi) :return: (list) a list of successfully downloaded files