0
votes

I'm a new Artifactory user. My company just setup Artifactory v6.5.2 and I'm looking to use is for managing software deployed for our production team. What I need is a download link that will get documented in our product management system that directly points to the exact file that Software deployed for Production to use. I was anticipating this would look like this:

https://artifactory.mycompany.com/artifactory/myrepo/mymodule/mypkgfile_v1_b30b890becfb4a02510ed12a7283c676.tgz

I'm not seeing that Artifactory can do this for me. What I see is I can do this:

http://artifactory.mycompany.com/artifactory/myrepo/mymodule/mypkgfile_v1.tgz

However if another artifact is deployed with the same name, it's not reflected in the download link. This means that the link could return different results.

Am I missing something or am I asking Artifactory do something it's not intended to do?

1
If another artifact is deployed with the same name (at the same path), it will overwrite the old artifact which will no longer be available (except from the trash, I think). If you want to deploy a different artifact, why not use a different name?DarthFennec

1 Answers

1
votes

Artifactory returns the URL based on on the filename and the path (as any web server would do). Here are two options to achieve what you need:

  1. Name the artifacts uniquely (timestamps are the simplest). Instead of naming the artifact mypkgfile_v1.tgz, name it mypkgfile_v1-1553038888.tgz (I used the Unix Epoch time, but everything unique enough will do).
  2. This one is more evolved but doesn't require you to change the naming scheme.
    1. First, configure a custom repository layout to match your versioning.
    2. Once you've done that, every time you deploy an artifact, attach a unique identifier to the artifact as property during deployment (using matrix params, for example), deploying your artifact as mypkgfile_v1;timestamp=1553038888.
    3. On the revrieval, use the token for the latest release together with the timestamp you need as a matrix param:mypkgfile_v[RELEASE];timestamp=1553038888