3
0

gitUtil.groovy 443 B

12345678910111213
  1. def clone(Map gitConf, String base_branch, String path='projdir') {
  2. echo "-----> Check out project source from ${gitConf.address}:${base_branch}..."
  3. dir(path){
  4. git branch: "${base_branch}",
  5. credentialsId: "${gitConf.credentialId}",
  6. url: "${gitConf.address}"
  7. def COMMIT_SHA = sh(returnStdout: true, script: 'git rev-parse --short HEAD').trim()
  8. return COMMIT_SHA
  9. }
  10. }
  11. return this