0
votes

I understand this has been already answered (Here's a link) but I still have a question. I know that build retention support for Jenkins pipelines has been added but I didn't see an option to "Automatically remove old builds stored in Artifactory according to Jenkins's configured policy for discarding old builds." There is an option to use:

// deleteBuildArtifacts is false by default. buildInfo.retention maxBuilds: 10, maxDays: 7, doNotDiscardBuilds: ["3", "4"], deleteBuildArtifacts: true

where I can explicitly specify which builds to keep but is it possible to have this to be controlled by Jenkins policy? How can I avoid build/artifact removal from artifactory repository for those that are set "keep this build forever"?

Thanks!

1
I don't think that you have an option to decide which builds are "good for deletion" and which are not. For this kind of logic, I believe that you will need to write a user plugin in Artifactory (only in the PRO version) that will enforce this by properties.Ariel

1 Answers

0
votes

Cant you create another post build action using builpromote plugin to promote the build which you want to keep for ever.