From da8f58507005139d23553b0c6c735617d273d174 Mon Sep 17 00:00:00 2001
From: wangzilun <964606955@qq.com>
Date: Tue, 08 Mar 2022 16:45:14 +0800
Subject: [PATCH] 添加一个类

---
 Jenkinsfile |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 3738f9a..8530de5 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -40,7 +40,12 @@
         //}
         stage('testFunction') {
             steps {
-                sh 'echo test'
+                sh '''
+                    commit_name="\$(git show -s --pretty=%an)"
+                    commit_message="\$(git show -s --pretty=%s)"
+                    echo "\$commit_name"
+                    echo "\$commit_message"
+                '''
             }
         }
 
@@ -82,7 +87,7 @@
                 }
         }
 
-        stage('version add master') {
+        stage('version add develop') {
             when {
                 //版本号自动添加逻辑需同时符合下列触发条件:
                 //1. 不能在master分支触发
@@ -104,7 +109,7 @@
                 }
             }
             steps {
-                versionAddDevelop("${project_name}","${GIT_CREDENTIALS_ID}","${url}","${GIT_BRANCH}")
+                versionAddCom("${project_name}","${GIT_CREDENTIALS_ID}","${url}","${GIT_BRANCH}")
             }
         }
 

--
Gitblit v1.9.1