From 83aef9a2d83c3027a8ed38e01cd65fa1bba874cb Mon Sep 17 00:00:00 2001
From: wangzilun <964606955@qq.com>
Date: Tue, 08 Mar 2022 16:51:10 +0800
Subject: [PATCH] test234q432
---
Jenkinsfile | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 3738f9a..a12d05f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -20,13 +20,14 @@
stages {
stage('source') {
steps {
- checkout([$class: 'GitSCM'
+ def changeLogSets = checkout([$class: 'GitSCM'
, branches: [[name: "${GIT_BRANCH}"]]
, doGenerateSubmoduleConfigurations: false
, extensions: []
, submoduleCfg: []
, userRemoteConfigs: [[credentialsId: "${GIT_CREDENTIALS_ID}", url: "${url}"]]
])
+ println "changeLogSets ${changeLogSets}"
}
}
@@ -40,7 +41,13 @@
//}
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"
+ printenv
+ '''
}
}
@@ -82,7 +89,7 @@
}
}
- stage('version add master') {
+ stage('version add develop') {
when {
//版本号自动添加逻辑需同时符合下列触发条件:
//1. 不能在master分支触发
@@ -104,7 +111,7 @@
}
}
steps {
- versionAddDevelop("${project_name}","${GIT_CREDENTIALS_ID}","${url}","${GIT_BRANCH}")
+ versionAddCom("${project_name}","${GIT_CREDENTIALS_ID}","${url}","${GIT_BRANCH}")
}
}
--
Gitblit v1.9.1