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!