Reputation: 2188
I am trying to deploy a md5 file to JFrog artifactory for one of our jars. The file has the extension md5. The filename has the name of the jar so if the jar was to be called file1.jar than its md5 would be file1.md5. Artifactory we have is of version 3.0. We are aware that Artifactory has its md5 checksum which is created when the jar is handed over to artifactory. This md5 that we are providing is created at the time that jar is created so we think is valuable.
However, when we try either with Artifactory Gradle Plugin from Bamboo or directly uploading the file manually to Artifactory we get the error:
Cannot deploy file 'filename.md5'. Target file to set checksum on doesn't exist artifactory
So it sounds as if a target file (the file for which md5 is the checksum) needs to be set for the md5 that we are trying to deploy but I don't see such a property anywhere in the upload interface.
Is it possible to do this in Artifactory at all and how if so?
Upvotes: 3
Views: 6230
Reputation: 170410
While is it true that Artifactory does not allow you to upload .md5
and .sha1sum
files you can get around this limitation quite easily because these files are generated by Artifactory anyway.
Be sure you do sort
the list of files to upload in order to be sure that your signature files are after the files themselves
Use this Artifactory bash upload with checksums example in order to upload the files.
You will see that the limitation is not present anymore because Artifactory will generate the checksums and the upload script will verify if the checksums do match before doing an upload.
Another benefit of this is that this approach of uploading is much faster because as it will not upload the same file twice to the server, also allowing you to run it several times without having problems.
Upvotes: 1
Reputation: 20376
You can configure the checksum policy of the repository to be:
If the deployed .jar file name is file1.jar
than Artifactory expects the .md5 file name to be file1.jar.md5
. If you deploy an .md5 file named file1.md5
, Artifactory will expect to find a file named file1
in the same path, which it will not find in your case and hence the error.
Upvotes: 4
Reputation: 22893
As you mentioned, Artifactory knows the checksums of all the artifacts (they aren't stored in files, but always accessible by adding .md5 or .sha1 to any filename). You can't store another correct checksum, since there is only one correct checksum (already known to Artifactory by the fact it stores the file).
So, there is no reason (and no way) to deploy md5 and sha1 files to Artifactory.
Upvotes: 2