Promoting 1.0.0-SNAPSHOT to Release?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Promoting 1.0.0-SNAPSHOT to Release?

dave_p
Hi,

We have a build record and associated artifacts that are in libs-snapshot-local, and called "1.0.0-SNAPSHOT.jar". We like it, and would like to promote it to libs-snapshot-release.

When using either the Jenkins plugin or the REST API, I get an error regarding the snapshot policy on the destination repository. This is the curl command I am using.

curl -X POST -f -u ${USERNAME}:${PASSWORD} -H "Content-Type: application/json" -d "{"status":"${STATUS_MESSAGE}","ciUser":"${USERNAME}","targetRepo":"libs-release-local","dryRun":true}" "http://${ARTIFACTORY_URL}/artifactory/api/build/promote/${PROJECT}/${BUILDNUMBER}"

I am assuming that, because the jar is named "${PROJECTNAME}-1.0.0-SNAPSHOT.jar, that Artifactory is (rightfully) assuming it's a snapshot.

Is there a way to convert a build from a snapshot to a release candidate when promoting?

I could download, rename, and upload the jar, but if I did that how could I preserve the metadata (links back to Jenkins, etc.) or indicate in the build record that the project had been promoted? (Would i have to manually create a new build record as well?)

Based on the REST API documentation, if I omit the targetRepo, I'm assuming the jar would remain in the libs-snapshot-local repository - what is the point to promotion in this case. Would it still be treated like a snapshot with regard to retention/deletion rules?

Thanks,
Dave P.
Reply | Threaded
Open this post in threaded view
|

Re: Promoting 1.0.0-SNAPSHOT to Release?

alfredo.ramos
CONTENTS DELETED
The author has deleted this message.