How to write Pipeline to discard old builds?

前端 未结 9 802
暖寄归人
暖寄归人 2020-12-04 20:24

The groovy syntax generator is NOT working for sample step properties: Set Job Properties. I\'ve selected Discard old builds and then entered

9条回答
  •  抹茶落季
    2020-12-04 21:08

    1. To Discard build after particular number of days:

       options {
           buildDiscarder(logRotator(daysToKeepStr: '7'))
       }
      
    2. To Discard build after particular number of builds:

       options {
           buildDiscarder(logRotator(numToKeepStr: '7'))
       }
      

提交回复
热议问题