Pete Whitehead
Pete Whitehead

Reputation: 178

How can I check if a package has already been uploaded to Artifactory from a Jenkins pipeline?

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?

Upvotes: 2

Views: 1218

Answers (1)

Ariel
Ariel

Reputation: 3506

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.

Upvotes: 1

Related Questions