Rename repo_root to git_root.

This commit is contained in:
Manuele Simi 2021-01-24 21:11:41 -05:00
parent f3f4edd768
commit ecf6d15cb1
1 changed files with 4 additions and 4 deletions

8
Jenkinsfile vendored
View File

@ -35,13 +35,13 @@ pipeline {
PIPELINE_BUILD_NUMBER = "${env.BUILD_NUMBER}"
ACTION_REPORT = "${agent_root_folder}/actions.${env.BUILD_NUMBER}.csv"
ACTION_URL="${actionURL}"
REPO_ROOT="${repo_root}"
REPO_ROOT="${git_root}"
}
parameters {
string(name: 'repo_root',
string(name: 'git_root',
defaultValue: 'https://code-repo.d4science.org/TestActions/',
description: 'The root URL of the repositories')
string(name: 'repo_list',
@ -75,7 +75,7 @@ pipeline {
stage(projects[i]) {
echo "About to execute over ${projects[i]}"
checkout_and_exec(projects[i], action_code)
sh "echo -e ${projects[i]},${repo_root}/${projects[i]},Completed >> $ACTION_REPORT"
sh "echo -e ${projects[i]},${git_root}/${projects[i]},Completed >> $ACTION_REPORT"
}
}
}
@ -118,7 +118,7 @@ pipeline {
* NOTE: 'credentialsId' be manually configured in Jenkins to access all the repos
*/
def checkout_and_exec(repo_name, actions) {
def repo_url = "${repo_root}/${repo_name}"
def repo_url = "${git_root}/${repo_name}"
sh(script: "rm -r ${repo_name} || true", returnStdout: true)?.trim()
checkout([
$class : 'GitSCM',