I'm using jenkins job dsl to configure my multibranch pipeline jobs. Actually my all settings are working except logRotator. My aim is to delete the old builds and keep a particular number of build. I can use
options {
buildDiscarder(logRotator(numToKeepStr: '10'))
}
in freestyle job for this purpose. The multibranch pipeline job configure section not having discardold build section as an option in UI. Is there any way I can use the logRotator without adding this to my jenkins file.