Use a relative path for maven local_repo.

This commit is contained in:
Manuele Simi 2019-10-01 12:17:50 -04:00
parent b15af4cffe
commit 52a3e05cf0
1 changed files with 5 additions and 5 deletions

10
Jenkinsfile vendored
View File

@ -8,25 +8,25 @@ def agent_root_folder = '/var/lib/jenkins'
if (params.Type == 'SNAPSHOT-DRY-RUN') {
echo "Configure Maven for SNAPSHOT-DRY-RUN artifacts"
options = ''
maven_local_repo_path = "${agent_root_folder}/local-snapshots"
maven_local_repo_path = "local-snapshots"
maven_settings_file = "jenkins-snapshots-dry-run-settings.xml"
}
if (params.Type == 'SNAPSHOT') {
echo "Configure Maven for SNAPSHOT artifacts"
options = ''
maven_local_repo_path = "${agent_root_folder}/local-snapshots"
maven_local_repo_path = "local-snapshots"
maven_settings_file = "jenkins-snapshots-settings.xml"
}
if (params.Type == 'RELEASE-DRY-RUN') {
echo "Configure Maven for RELEASE-DRY-RUN artifacts"
options = ''
maven_local_repo_path = "${agent_root_folder}/local-releases"
maven_local_repo_path = "local-releases"
maven_settings_file = "jenkins-releases-dry-run-settings.xml"
}
if (params.Type == 'RELEASE-STAGING') {
echo "Configure Maven for RELEASE-STAGING artifacts"
options = ''
maven_local_repo_path = "${agent_root_folder}/local-staging"
maven_local_repo_path = "local-staging"
maven_settings_file = "jenkins-staging-settings.xml"
}
if (params.Type == 'RELEASE') {
@ -67,7 +67,7 @@ pipeline {
// see https://jenkins.io/doc/book/pipeline/syntax/#environment
environment {
JOB_OPTIONS = "${options}"
MAVEN_LOCAL_REPO = "${maven_local_repo_path}"
MAVEN_LOCAL_REPO = "/var/lib/jenkins/${maven_local_repo_path}"
GCUBE_RELEASE_NUMBER = "${params.gCube_release_version}"
}