How to remove old builds in jenkins? [duplicate]

淺唱寂寞╮ 提交于 2019-12-06 02:50:08

问题


I removed old build folders from the build directory in Jenkins expecting them to be removed in the UI, unfortunately whilse these build directories are gone, their UI link still exists. I now have two questions
1) How can I get rid of the defunct links in the UI?
2) How can I delete old build from cli and have it reflected in the UI?


回答1:


You must either restart Jenkins or reload the data, in order to reconcile the UI with its back end. There is no other way.

If you have access to the "Manage Jenkins" menu there is a link to "Reload Configuration from Disk", which is a little less invasive than a restart.

Keep in mind that the system will be not usable for a few seconds while the data is reloaded, just like during a full restart. If you have a lot of builds, this might take a little. So, make sure that this is ok with the other users of your system.




回答2:


A better way to remove old builds is discard-old-build plugin where you can specify how many builds you want to keep and all older builds are discarded.



来源:https://stackoverflow.com/questions/33570179/how-to-remove-old-builds-in-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!