From 3d277517c2a4544583a0e92e243e6be632258185 Mon Sep 17 00:00:00 2001
From: wangzilun <964606955@qq.com>
Date: Wed, 15 Dec 2021 17:36:44 +0800
Subject: [PATCH] test
---
Jenkinsfile | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index c6264a2..c925415 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -10,6 +10,7 @@
}
options {
//给日志加上时间错, 需安装 Timestamper 插件
+ //mvn test surefire-report:report
timestamps()
ansiColor('xterm')
//丢弃旧的构建前两个为发布包保留天数(比此早的发布包将被删除,但构建的日志、操作历史、报告等将被保留)和构建个数
@@ -29,7 +30,15 @@
}
}
- stage('test') {
+ stage('testMaven') {
+ steps {
+
+ sh 'mvn clean test -U'
+ junit allowEmptyResults: true, keepLongStdio: true, skipPublishingChecks: true, testResults: 'target/surefire-reports/*.xml'
+
+ }
+ }
+ stage('testFunction') {
steps {
sh '''
@@ -63,7 +72,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}")
@@ -92,6 +101,7 @@
echo "todo add version"
}
+
}
stage('deploy') {
when { branch 'master' }
--
Gitblit v1.9.1