From f5d336033c4bb7d3647ab9fed65ddfa8be09b95e Mon Sep 17 00:00:00 2001
From: wangzilun <964606955@qq.com>
Date: Mon, 28 Feb 2022 16:32:57 +0800
Subject: [PATCH] 测试

---
 Jenkinsfile |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index b7eea16..08b42c6 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -30,14 +30,14 @@
 
             }
         }
-        stage('testMaven') {
-            steps {
+        //stage('testMaven') {
+            //steps {
 
-                sh 'mvn clean test -U'
-                junit allowEmptyResults: true, keepLongStdio: true, skipPublishingChecks: true, testResults: 'target/surefire-reports/*.xml'
+                //sh 'mvn clean test -U'
+                //junit allowEmptyResults: true, keepLongStdio: true, skipPublishingChecks: true, testResults: 'target/surefire-reports/*.xml'
 
-            }
-        }
+            //}
+        //}
         stage('testFunction') {
             steps {
                 sh 'echo test'
@@ -51,11 +51,12 @@
                     ####maven编译部署#####
                     ##mvn clean package -U
                     ##处理结果包
-                    versionFile=\$(find . -iname "${projectName}.java")
+                    versionFile=\$(find . -iname "${project_name}.java")
+                    str="-"
                     old_version_all=\$(cat \$versionFile | sed -nr \'s/^[^0-9]*"([^"]+)".*;/\\1/p\')
                     echo "old_version_all \$old_version_all"
                     echo "project_name \$project_name"
-                    if [ ["\$old_version_all" =~ "-"] ];then
+                    if [[ "\${old_version_all}" =~ "\$str" ]];then
                         echo "包含"
                     else
                         echo "不包含"
@@ -82,7 +83,7 @@
             steps {
                 //http(s)的git链接使用帐号密码,ssh使用 keyFileVariable: 'SSH_KEY'
                 echo "todo version add"
-                versionAddDevelop("${project_name}","${GIT_CREDENTIALS_ID}","${url}","${GIT_BRANCH}")
+                //versionAddDevelop("${project_name}","${GIT_CREDENTIALS_ID}","${url}","${GIT_BRANCH}")
                 }
         }
 

--
Gitblit v1.9.1