Changes in / [e229c22:57aa6f5]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
re229c22 r57aa6f5 74 74 75 75 //Properties sent by the git-hooks (ref name, latest commit hash, previous commit hash) 76 properties( [[$class: 'ParametersDefinitionProperty', parameterDefinitions: \77 [[$class: 'StringParameterDefinition', name: 'GitRefName', defaultValue: 'master', description: 'name of the ref that changed' ], \78 [$class: 'StringParameterDefinition', name: 'GitRefNewValue', defaultValue: 'HEAD', description: 'new commit of the reference' ], \79 [$class: 'StringParameterDefinition', name: 'GitRefOldValue', defaultValue: 'HEAD~1', description: 'old commit of the reference']] \80 ]] )76 // properties( [[$class: 'ParametersDefinitionProperty', parameterDefinitions: \ 77 // [[$class: 'StringParameterDefinition', name: 'GitRefName', defaultValue: 'master', description: 'name of the ref that changed' ], \ 78 // [$class: 'StringParameterDefinition', name: 'GitRefNewValue', defaultValue: 'HEAD', description: 'new commit of the reference' ], \ 79 // [$class: 'StringParameterDefinition', name: 'GitRefOldValue', defaultValue: 'HEAD~1', description: 'old commit of the reference']] \ 80 // ]] ) 81 81 82 82 try { 83 84 sh 'git reflog > GIT_COMMIT' 85 git_reflog = readFile('GIT_COMMIT') 86 gitRefName = env.BRANCH_NAME 87 gitRefNewValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1] 88 gitRefNewValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][2] 89 83 90 echo "Properties-start" 84 echo "ref name : ${ GitRefName}"85 echo "ref new value : ${ GitRefNewValue}"86 echo "ref old value : ${ GitRefOldValue}"91 echo "ref name : ${gitRefName}" 92 echo "ref new value : ${gitRefNewValue}" 93 echo "ref old value : ${gitRefOldValue}" 87 94 echo "Properties-stop" 88 95
Note: See TracChangeset
for help on using the changeset viewer.