Jenkins管道擦除工作区 [英] Jenkins Pipeline Wipe Out Workspace

查看:852
本文介绍了Jenkins管道擦除工作区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在运行Jenkins 2.x,并且喜欢新的Pipeline插件.但是,由于存储库中有这么多分支,磁盘空间会迅速填满.

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.

是否存在与Pipeline兼容的插件,我可以在成功构建时清除工作空间?

Is there any plugin that's compatible with Pipeline that I can wipe out the workspace on a successful build?

推荐答案

您可以使用 deleteDir() 作为管道Jenkinsfile的最后一步(假设您没有更改工作目录).

You can use deleteDir() as the last step of the pipeline Jenkinsfile (assuming you didn't change the working directory).

这篇关于Jenkins管道擦除工作区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆