From 0b2d1128b21ba3c2072e82b34d945a4eda55e6db Mon Sep 17 00:00:00 2001
From: fqx <qingxufan0923@163.com>
Date: Mon, 22 Nov 2021 14:41:05 +0800
Subject: [PATCH] develop merge feature before1
---
Jenkinsfile | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 61da019..469f901 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -12,6 +12,8 @@
//给日志加上时间错, 需安装 Timestamper 插件
timestamps()
ansiColor('xterm')
+ //丢弃旧的构建前两个为发布包保留天数(比此早的发布包将被删除,但构建的日志、操作历史、报告等将被保留)和构建个数
+ buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '7', numToKeepStr: '10')
}
stages {
@@ -32,7 +34,7 @@
sh '''
#定义颜色的变量
- RED_COLOR='\\E[1;31m' #红
+ RED_COLOR='\\033[1;31m' #红
GREEN_COLOR='\\E[1;32m' #绿
YELOW_COLOR='\\E[1;33m' #黄
BLUE_COLOR='\\E[1;34m' #蓝
@@ -61,7 +63,7 @@
echo ----需注意!----- && \$SETCOLOR_WARNING
echo ----正常的!----- && \$SETCOLOR_NORMAL
- echo "BRANCH ${GIT_BRANCH}"
+ echo -e "\${GREEN_COLOR}BRANCH ${GIT_BRANCH}\${RES}"
printenv
'''
test("${project_name}","${GIT_CREDENTIALS_ID}","${url}","${GIT_BRANCH}")
--
Gitblit v1.9.1