| | |
| | | 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}" |
| | | |
| | | } |
| | | } |
| | |
| | | //} |
| | | 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 |
| | | ''' |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | stage('version add master') { |
| | | stage('version add develop') { |
| | | when { |
| | | //版本号自动添加逻辑需同时符合下列触发条件: |
| | | //1. 不能在master分支触发 |
| | |
| | | } |
| | | } |
| | | steps { |
| | | versionAddDevelop("${project_name}","${GIT_CREDENTIALS_ID}","${url}","${GIT_BRANCH}") |
| | | versionAddCom("${project_name}","${GIT_CREDENTIALS_ID}","${url}","${GIT_BRANCH}") |
| | | } |
| | | } |
| | | |