Parallels / artifactory

A Python client for Artifactory
MIT License
82 stars 54 forks source link

Make repository root configurable #22

Closed ddresser closed 8 years ago

ddresser commented 9 years ago

I am using JFrog's artifactoryonline SaaS service with a repository url like: https://mycompany.artifactoryonline.com/(mycompany)/path/to/artifacts Notice that the root (in parenthesis) is the name of my company and not 'artifactory' as is hardcoded in the module. I would suggest that the root value become a configurable item. Thank you.

knazarov commented 9 years ago

Hi @ddresser Do you have any suggestions for this in mind?

I'm aware of this design shortcoming, and would like to fix it. Though, possibly without overcomplicating the API.

ddresser commented 9 years ago

I'll try to take a look at this. My first thought was to try to determine the "root" value automatically using a regex, but it seems reasonable to make the "root" an optional item in the configuration file and split on the defined value or 'artifactory' if none is provided. Do you have a preference?

knazarov commented 9 years ago

@ddresser I thought about the same. I'd add the artifactory root URI as:

I'm not sure whether using regexes for this purpose is a good idea. I'll think and let you know.

ssbarnea commented 9 years ago

Just wanted to evaluate the module and reached the same issue. Clearly this is a bug and not an enhancement.

knazarov commented 9 years ago

@ssbarnea @ddresser Sorry for taking so long to fix this. I believe this pull request will solve the problem: https://github.com/Parallels/artifactory/pull/34

rasebo commented 8 years ago

Having a different root for Artifactory, even in private deployments, is quite common, even if the workaround to make this happen isn't "officially" supported by jfrog. The pull requests should be merged.

knazarov commented 8 years ago

@rasebo and everyone in this thread

I've implemented a fix for this problem. It will be enough to specify your custom base in global config file, and splitroot() will work as expected.