Jenkins: Is there any way to cleanup Jenkins workspace?

后端 未结 11 1876
既然无缘
既然无缘 2020-11-29 03:18

How can I cleanup the workspace in Jenkins? I am using AccuRev as version control tool.

I created freestyle projects in Jenkins.

11条回答
  •  天涯浪人
    2020-11-29 03:51

    Assuming the question is about cleaning the workspace of the current job, you can run:

    test -n "$WORKSPACE" && rm -rf "$WORKSPACE"/*
    

提交回复
热议问题