pipeline【参数】【triggers】【discard old builds】

  1. discard old builds
pipeline {
  options {
    buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30'))
  }
  ...
}

daysToKeepStr: history is only kept up to this days.
numToKeepStr: only this number of build logs are kept.
artifactDaysToKeepStr: artifacts are only kept up to this days.
artifactNumToKeepStr: only this number of builds have their artifacts kept.
  1. triggers
pipeline{
    agent{
        node "master"
    }
    triggers {
        cron('H/5 * * * *')
    }
原文地址:https://www.cnblogs.com/amize/p/15736365.html