2
votes

We are using the Jenkins pipeline Artifactory plugin, defined here: https://www.jfrog.com/confluence/display/RTF/Working+With+Pipeline+Jobs+in+Jenkins

Is there a way to check if a package is already uploaded to Artifactory?

1
What is the need for checking this? it will help with suggesting a solution...Ariel
Our build pipeline has the potential to run multiple times for the same version, so it is possible a package will already have been uploaded. I need to check if it is present and not upload in that case, as uploading will throw an exception (as we do not allow overwrites).Pete Whitehead

1 Answers

1
votes

You can send a head request and parse the response. In case of 200 the file exist, if 404 you can go ahead generate it.