bug 记录

ks-jenkins

出现内存不足错误

起初想在jenkins 中进行配置 发现找不到自动删除历史构建选项,看了kubesphere 文档也没找到选择git 仓库时配置历史构建保留时间,但是不选择git 仓库时是有的。

最终在jenkins 下系统管理下 工具中编写命令脚本进行手动删除历史构建

groovy 复制代码
def folder = Jenkins.instance.getItemByFullName("文件名")
def job = folder.getItem("流水线名")
def maxNumber = 40
job.getItem("分支名").builds.findAll {
    it.number<maxNumber
}.each {
    it.delete()
}

作者声明

handlebars 复制代码
如有问题,欢迎指正!
相关推荐
青春易逝丶14 分钟前
术语缩写
java
ideal-cs21 分钟前
总结:Nginx配置文件案例说明
java·运维·nginx·nginx配置文件
无尽的沉默1 小时前
Thymeleaf 基本语法和表达式
java·开发语言
Coder_Boy_1 小时前
Java后端核心技术体系全解析(个人总结)
java·开发语言·spring boot·分布式·spring cloud·中间件
南部余额1 小时前
函数式接口 Lambda 表达式好搭档:Predicate、Function、Consumer、Supplier
java·开发语言·consumer·lambda·function·predicate·supplier
Java后端的Ai之路1 小时前
【JDK】-JDK 17 新特性整理(比较全)
java·开发语言·后端·jdk17
小小小米粒1 小时前
Spring Boot Starter ,不止是 “打包好配置的工具类包”
java·开发语言
用户8307196840822 小时前
告别冗余!Spring Boot Web 入参转换 6 种玩法,@InitBinder 可以退休了
java·spring boot
Desirediscipline2 小时前
#include<limits>#include <string>#include <sstream>#include <iomanip>
java·开发语言·前端·javascript·算法
lucky67072 小时前
Laravel 9.x LTS重磅升级:六大核心改进
java·php·laravel