Jenkins build之后清理workspace

disableDeferredWipeout: true, 这个选项是关闭延时删除,立即删除。

  stage('Clean') {
    steps {
      cleanWs(
          cleanWhenAborted: true, 
          cleanWhenFailure: true, 
          cleanWhenNotBuilt: true, 
          cleanWhenSuccess: true, 
          cleanWhenUnstable: true, 
          cleanupMatrixParent: true, 
          disableDeferredWipeout: true,
          deleteDirs: true
      )
  	}
  }

如果本文对您有所帮助,请帮忙点赞,谢谢!

你可能感兴趣的:(Jenkins)