I am successfully uploading my artifacts using the JFrong plugin. I think I have set up everything for automatic deletion once the number of builds (artifacts) is more than 5. However my artifacts are not deleted (I have them more than maxBuilds
property) although the user which I am using for upload has permission to delete artifact (I’ve tried and it works manually). Did I configure everything properly? Thanks
stage ('Artifactory stage') {
steps {
rtServer (
id: 'Artifactory',
url: 'https://artifactory.domain/artifactory',
credentialsId: 'test',
timeout: 300
)
}
}
stage ('Build info stage ') {
steps {
rtBuildInfo (
maxBuilds: 5,
deleteBuildArtifacts: true
)
}
}
stage ('Upload stage') {
steps {
rtUpload (
serverId: 'Artifactory',
spec: '''{
"files": [
{
"pattern": "arena-*.zip",
"target": "project/packages/"
}
]
}''',
)
}
}
stage ('Publish build info') {
steps {
rtPublishBuildInfo (
serverId: 'Artifactory'
)
}
}