问题描述
任何人都可以解释如何清除Jenkins代理的磁盘空间吗?
Can anyone explain how to clear Jenkins agents disk space?
我需要清除Jenkins代理的磁盘空间.这些从属计算机具有Windows操作系统.据说是通过JNLP代理连接的从属win7-agent-4",
I need to clear the disk space of Jenkins agents. These slave machines have windows OS.It is said "Slave win7-agent-4 "connected via JNLP agent,
我不知道登录这些远程代理计算机的方法吗?我们可以通过远程桌面或任何其他方法进行访问吗?
I don't know the method to login into these remote agents machine?.Can we access through remote desktop or any other method ?
推荐答案
您的问题过于笼统.您需要检查为什么磁盘已满.一个可能的原因是每个作业都属于随机从属,并在其工作区中创建大量文件.实际上,这在詹金斯(Jenkins)中是正确的工作流程.
Your question is too broad. You need to check why the disk-gets full. One possible reason is each job comes to random slave and creates lot of files in its workspace. That is actually a correct workflow in Jenkins.
您可以使用groovy脚本遍历所有从属服务器,检查所有作业的工作空间并删除工作空间内容.
You can use groovy script to iterate over all slaves, check workspace of all jobs and delete the workspace content.
最好由脚本完成:这是一种描述方式 https://gist.github.com/rb2k/8372402 :非常酷.
This is best done by script: Here is one way describedhttps://gist.github.com/rb2k/8372402 : very cool one.
(我不是作者,未经测试)
(I am not the author-not tested it )
这篇关于如何清除Jenkins代理的磁盘空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!