I want to read checksum from artifactory given the artifactory url and append it to an attribute. I tried to look for examples but people are hardcoding the checksum value like below. If I hardcode the value, I will have to update it when I have new artifact. I do not want to do that. Please let me know if there is anyway to get this value from artifactory. I have a code to compute checksum in the my chef code using digest. I will compare the checksum from artifactory and the checksum I computed in the recipe.
source 'http://www.example.com/tempfiles/testfile'
mode '0755'
checksum '3a7dac00b1' # A SHA256 (or portion thereof) of the file.
end
To compare the computed checksum with the local checksum, I have seen people hardcoding local checksum value. Instead I want to read it from artifactory through chef. ex:
```computed_checksum = Digest::SHA2.file(temp.path).hexdigest Artifactory_checksum = Read from artifactory ?
if Artifactory_checksum != computed_chceksum throws error.....''''