wangzilun
2022-02-23 3fe9a4af65343c6150a505e7d55626e3de12186a
Jenkinsfile
@@ -33,8 +33,8 @@
        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'
            }
        }
@@ -52,10 +52,11 @@
                    ##mvn clean package -U
                    ##处理结果包
                    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}")
                }
        }