jfrog / artifactory-scripts

Scripts for Artifactory (Usually, for REST API), community driven.
Apache License 2.0
148 stars 166 forks source link

Patch 1 #3

Closed brianpcarr closed 9 years ago

brianpcarr commented 9 years ago

Hi Baruch,

I have initiated a new pull request to patch-1 in the artifactory-scripts.git repo. This adds the ability to retain a count of artifacts based on the branch / job in the repo. It also adds a minDays and maxDays for artifact retention (beside the basic count). Please let me know if you have any problems pulling this.

I also wonder if you have any thougts about an issue I encountered with our size function which I mentioned previously…..

We quite routinely do something like: ItemHandle folder = repo.folder( path ) where repo is the object for a particular repo and path is the path within the repo to get to a folder of interest. The problem comes if I want to run the base directory for the repo. If path is null, an empty string, or just a dot (‘.’) I get an error.

For us this is no problem as we know all the artifacts of interest are in the ‘com’ directory so a size run through that folder works great. However, another group might have put their projects all in the top level folder in the repo and then there is no way to use the java client API to scan through that folder.

It is possible I am not using the right method, so if you can point me in the right direction that would be great. It is also possible that no one has really needed to scan through that folder and the function just isn’t there. If so, I imagine it would be quite straight forward to check the path for one of those three cases and just return the base folder. Neither of these is of pressing importance to us as everything we are interested in is in the com directory which we can access just fine. However, I would like your thoughts on this.

Thanks again for putting together such a fine product. Brian

From: Baruch Sadogursky [mailto:notifications@github.com] Sent: Sunday, November 02, 2014 6:39 AM To: JFrogDev/artifactory-scripts Cc: Brian Carr Subject: Re: [artifactory-scripts] Patch 1 (#3)

Merged #3https://github.com/JFrogDev/artifactory-scripts/pull/3.

— Reply to this email directly or view it on GitHubhttps://github.com/JFrogDev/artifactory-scripts/pull/3#event-187048656.