Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download a snapshot artifact #26

Open
sqqqrly opened this issue Mar 26, 2015 · 4 comments
Open

Download a snapshot artifact #26

sqqqrly opened this issue Mar 26, 2015 · 4 comments

Comments

@sqqqrly
Copy link

sqqqrly commented Mar 26, 2015

I am trying to download snapshot artifacts and stat data about them from my Artifactory. While everything else is working, I cannot get this to work. Is there a way to do this?

Example that works with wget:
http://somewhere.com:8090/artifactory/libs-snapshot-local/com/company/foo/bar/foobar-artifact/0.1-master-SNAPSHOT/foobar-artifacts-0.1-master-SNAPSHOT.py

If this is not possible, I would like to make it so.

@knazarov
Copy link
Contributor

Hi @sqqqrly, could you please post any diagnostics? What error do you see?

@sqqqrly
Copy link
Author

sqqqrly commented Mar 31, 2015

Hi @racktear. I am not getting an error. I just didnt see how I could get the latest from a snapshot path. What I did instead was get the names of all the artifacts in the path and manually choose the latest to download. Is there a better way?

@knazarov
Copy link
Contributor

@sqqqrly I believe you don't need any special support from the python-artifactory, because there is already support from the artifactory itself:
https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-RetrieveLatestArtifact

Since the underlying mechanism in python-artifactory is just REST calls, you should be able to download artifacts by URLs like this:

http://localhost:8080/artifactory/libs-release-local/ch/qos/logback/logback-classic/0.9.9-SNAPSHOT/logback-classic-0.9.9-SNAPSHOT.jar

The SNAPSHOT keyword gets special treatment by artifactory, and it calculates the binary to return on the server side.

Please let me know if it works.

@knazarov
Copy link
Contributor

Although, treating such special URLs as symlinks and 'resolving' them via the pathlib-like interface looks better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants