Reputation: 28653
As part of my custom promotion process I want to get rid of older builds of the SNAPSHOT versions. When I trigger a build delete using the artifactory rest API using the 'artifacts=1' flag the artifacts itself are deleted successfully, but the according directories where the artifacts have been stored are still there. Is there a convenient way to delete those empty directories too during the build delete operation?
cheers,
René
Upvotes: 2
Views: 882
Reputation: 22893
The directories aren't deleted by default. You can write a user plugin to delete empty folders as afterDelete trigger. Here's an example: https://github.com/JFrogDev/artifactory-user-plugins/blob/master/cleanup/deleteEmptyDirs/deleteEmptyDirs.groovy
Upvotes: 2