Reputation: 16673
I have two Jenkins jobs that build our software.
One job runs when it detects a change in the repository. The other job runs nightly.
I want the nightly job to start from a clean slate, that is, build all the artifacts - jars, wars, poms, rpms, etc. On the other hand, I want the other jobs to use existing artifacts - I already do this.
For the nightly job, I delete the local .m2 repository. But how do I delete the appropriate version in artifactory? For example, if I'm building a 1.0.0-SNAPSHOT version, I want to delete ALL artifacts in artifactory with that version beforehand.
Upvotes: 1
Views: 2743
Reputation: 1257
If you just want to delete old snapshots, you can set Max Unique Snapshots
to 1 for your Artifactory local repository. See here.
"The maximum number of unique snapshots (of the same artifact) to store. Any number of snapshots above the max are automatically removed by age."
Hope that helps!
Upvotes: 2