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