From 8e2b6ff28313f1dcb1b600645f45fca2b16d1e0b Mon Sep 17 00:00:00 2001 From: newrain001 Date: Thu, 21 Dec 2023 10:56:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'Jenkinsfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ec52810..841fb17 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,6 @@ pipeline { environment { + APP_NAME = "RuoYi" DOCKER_REPOSITORY_CREDENTIAL_ID = "7cc63152-c727-40fc-b177-d8397396f1ba" HARBOR_HOST = "registry.cn-hangzhou.aliyuncs.com" NAMESPACE_NAME = "newrain_wang" @@ -79,18 +80,19 @@ spec: } } post { - failure { + always { dingtalk ( robot: '4eabbd09-a21a-40a9-84db-6440c0daebec', type: 'MARKDOWN', - title: '项目', + title: '镜像推送 ${PROJECT_NAME}', text: [ - '### Jenkins_job', + '### 项目 ${PROJECT_NAME}', '---', - '- 状态:${appName}代码编译失败', + '- 触发原因: ${CAUSE} ', + '- 状态:${BUILD_STATUS}', '- 版本:${BUILD_NUMBER}', - '- [查看部署详情](${STATUS_URL})', - '- [查看日志Console](${CONSOLE_URL})' + '- [查看部署详情](${PROJECT_URL})', + '- [查看日志Console](${BUILD_URL})' ], at: [ '17694993496' @@ -109,18 +111,19 @@ spec: } } post { - failure { + always { dingtalk ( robot: '4eabbd09-a21a-40a9-84db-6440c0daebec', type: 'MARKDOWN', - title: '项目部署', + title: '项目部署 ${PROJECT_NAME}', text: [ - '### Jenkins_job', + '### 项目 ${PROJECT_NAME}', '---', - '- 状态:${appName}项目部署失败', + '- 触发原因: ${CAUSE} ', + '- 状态:${BUILD_STATUS}', '- 版本:${BUILD_NUMBER}', - '- [查看部署详情](${STATUS_URL})', - '- [查看日志Console](${CONSOLE_URL})' + '- [查看部署详情](${PROJECT_URL})', + '- [查看日志Console](${BUILD_URL})' ], at: [ '17694993496'