def clone(Map gitConf, String base_branch, String path='projdir') { echo "-----> Check out project source from ${gitConf.address}:${base_branch}..." dir(path){ git branch: "${base_branch}", credentialsId: "${gitConf.credentialId}", url: "${gitConf.address}" def COMMIT_SHA = sh(returnStdout: true, script: 'git rev-parse --short HEAD').trim() return COMMIT_SHA } } return this