Jenkins Pipeline Wipe Out Workspace

前端 未结 13 1435
你的背包
你的背包 2020-12-04 08:59

We are running Jenkins 2.x and love the new Pipeline plugin. However, with so many branches in a repository, disk space fills up quickly.

Is there any plugin that

13条回答
  •  抹茶落季
    2020-12-04 09:40

    Using the 'WipeWorkspace' extension seems to work as well. It requires the longer form:

    checkout([
       $class: 'GitSCM',
       branches: scm.branches,
       extensions: scm.extensions + [[$class: 'WipeWorkspace']],
       userRemoteConfigs: scm.userRemoteConfigs
    ])
    

    More details here: https://support.cloudbees.com/hc/en-us/articles/226122247-How-to-Customize-Checkout-for-Pipeline-Multibranch-

    Available GitSCM extensions here: https://github.com/jenkinsci/git-plugin/tree/master/src/main/java/hudson/plugins/git/extensions/impl

提交回复
热议问题