How to remove old builds in jenkins? [duplicate]

2019-04-29 22:01发布

This question already has an answer here:

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?

2条回答
唯我独甜
2楼-- · 2019-04-29 22:41

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.

查看更多
老娘就宠你
3楼-- · 2019-04-29 22:49

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.

查看更多
登录 后发表回答