问题描述
我已经在我的CentOS机器上部署了Jenkins,Jenkins运行了3天很好,但是昨天出现了磁盘空间太低"的情况.仅剩1.019GB."问题.
I have deployed Jenkins in my CentOS machine, Jenkins was working well for 3 days, but yesterday there was a 'Disk space is too low. Only 1.019GB left.' problem.
我该如何解决这个问题,它会使我的主人离线几个小时?
How can I solve this problem, it make my master offline for hours?
推荐答案
您可以轻松地从jenkins UI(我的版本为1.651.3)中更改阈值:
You can easily change the threshold from jenkins UI (my version is 1.651.3):
[]
此功能旨在防止在可用磁盘空间较低的从站上工作.降低阈值并不能解决某些作业在完成后无法正确清理的事实.
This feature is meant to prevent working on slaves with low free disk space. Lowering the threshold would not solve the fact that some jobs do not properly cleanup after they finish.
取决于您要构建的内容:
Depending on what you're building:
- 确保您了解构建的磁盘输出是什么-如果可能的话-将输出限制为仅发生在作业工作空间中.使用工作区清理插件作为构建后的步骤来清理工作区.
- 如果该过程必须将一些数据写入外部文件夹-请在构建后的步骤中手动清理它们.
- Make sure you understand what is the disk output of your build - if possible - restrict the output to happen only to the job workspace. Use workspace cleanup plugin to cleanup the workspace as post build step.
- If the process must write some data to external folders - clean them up manually on post build steps.
Alternative1 -为每个作业提供一个新的从服务器(使用现货从服务器-有许多插件与不同的云提供商集成,可以按需在自动机上进行供应)
Alternative1 - provision a new slave per job (use spot slaves - there are many plugins that integrate with different cloud provider to provision on the fly machines on demand)
Alternative2 -在容器中运行构建.构建完成后,所有内容都将被丢弃
Alternative2 - run the build inside a container. Everything will be discarded once the build is finished
这篇关于如何解决詹金斯“磁盘空间太低"的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!