From e4a4c227b51b985af25ba82a5b169fa9025d04bc Mon Sep 17 00:00:00 2001 From: jianghao <332515344@qq.com> Date: Wed, 25 Feb 2026 17:30:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=93=8D=E5=BA=94=E6=9E=9A=E4=B8=BE):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AF=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit chore(Jenkinsfile): 清理构建后的Docker镜像 --- Jenkinsfile | 14 ++++++++++++++ .../com/timeline/common/response/ResponseEnum.java | 5 +++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f2d5816..30fa639 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -165,6 +165,20 @@ pipeline { } always { cleanWs() + + } + cleanup { + // 清理 Docker 镜像 + + script { + def services = ['gateway', 'user', 'story', 'file'] + for (service in services) { + def serviceDir = "timeline-${service}-service" + def imageName = "${REGISTRY}/timeline-${service}-service:${BUILD_NUMBER}" + + sh "docker rmi -f ${imageName}" + } + } } } } diff --git a/timeline-component-common/src/main/java/com/timeline/common/response/ResponseEnum.java b/timeline-component-common/src/main/java/com/timeline/common/response/ResponseEnum.java index 0246a8a..ff1687a 100644 --- a/timeline-component-common/src/main/java/com/timeline/common/response/ResponseEnum.java +++ b/timeline-component-common/src/main/java/com/timeline/common/response/ResponseEnum.java @@ -29,8 +29,9 @@ public enum ResponseEnum { // 操作错误 SEARCH_ERROR(4001, "查询数据库错误"), - NOT_FOUND_ERROR(4002, "未找到该资源"); - + NOT_FOUND_ERROR(4002, "未找到该资源"), + PARAM_ERROR(4003, "参数错误"); + private final int code; private final String message; }