From e1167fcb452f8f2beb28cb3f51becf159615e780 Mon Sep 17 00:00:00 2001 From: Manuele Simi Date: Wed, 29 May 2019 22:04:19 -0400 Subject: [PATCH] Access to the local file system with the HOME env variable. --- Jenkinsfile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8d5c345..694b245 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,27 +5,30 @@ def (options,maven_local_repo_path,maven_settings_file) = ['','',''] if (params.Type == 'SNAPSHOT-DRY-RUN') { echo "Configure Maven for SNAPSHOT-DRY-RUN artifacts" options = '' - maven_local_repo_path = '~/local-snapshots' - maven_settings_file = '~/.m2/jenkins-shapshots-dry-run-settings.xml' + maven_local_repo_path = "${env.HOME}/local-snapshots" + maven_settings_file = "${env.HOME}/.m2/jenkins-shapshots-dry-run-settings.xml" + maven_settings_file = "${env.HOME}/.m2/settings.xml" //TODO: to remove, just for testing } if (params.Type == 'SNAPSHOT') { echo "Configure Maven for SNAPSHOT artifacts" options = '' - maven_local_repo_path = '~/local-snapshots' - // use the default settings - maven_settings_file = '~/.m2/settings.xml' + maven_local_repo_path = "${env.HOME}/local-snapshots" + maven_settings_file = "${env.HOME}/.m2/jenkins-shapshots-settings.xml" + maven_settings_file = "${env.HOME}/.m2/settings.xml" //TODO: to remove, just for testing } if (params.Type == 'RELEASE-DRY-RUN') { echo "Configure Maven for RELEASE-DRY-RUN artifacts" options = '' - maven_local_repo_path = '~/local-releases' - maven_settings_file = '~/.m2/jenkins-releases-dry-run-settings.xml' + maven_local_repo_path = "${env.HOME}/local-releases" + maven_settings_file = "${env.HOME}/.m2/jenkins-releases-dry-run-settings.xml" + maven_settings_file = "${env.HOME}/.m2/settings.xml" //TODO: to remove, just for testing } if (params.Type == 'RELEASE') { echo "Configure Maven for RELEASE artifacts" options = '' - maven_local_repo_path = '~/local-releases' - maven_settings_file = '~/.m2/jenkins-releases-settings.xml' + maven_local_repo_path = "${env.HOME}/local-releases" + maven_settings_file = "${env.HOME}/.m2/jenkins-releases-settings.xml" + maven_settings_file = "${env.HOME}/.m2/settings.xml" //TODO: to remove, just for testing } echo "Use settings file at ${maven_settings_file}" echo "Use local repo at ${maven_local_repo_path}"