diff --git a/Jenkinsfile b/Jenkinsfile index 37578d5..ecec0a7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -70,6 +70,7 @@ pipeline { JOB_OPTIONS = "${options}" MAVEN_LOCAL_REPO = "${agent_root_folder}/${maven_local_repo_path}" GCUBE_RELEASE_NUMBER = "${params.gCube_release_version}" + PIPELINE_BUILD_NUMBER = "${env.BUILD_NUMBER}" } // see https://jenkins.io/doc/book/pipeline/syntax/#parameters @@ -90,7 +91,7 @@ pipeline { sh ''' echo "Create a fresh local repository" rm -rf $MAVEN_LOCAL_REPO - mkdir -p $MAVEN_LOCAL_REPO/${env.BUILD_NUMBER}/ + mkdir -p $MAVEN_LOCAL_REPO/${PIPELINE_BUILD_NUMBER}/ echo "Done with local repository" ''' @@ -196,7 +197,7 @@ def buildComponents(args, maven_settings_file, maven_local_repo_path) { if (name && !"NONE".equalsIgnoreCase(name)) build(job: name, parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"], - [$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}/${env.BUILD_NUMBER}/${name}"], + [$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}/${PIPELINE_BUILD_NUMBER}/${name}"], [$class: 'LabelParameterValue', name: 'exec_label', label: "pipeline-agent-garr", nodeEligibility: [$class: 'AllNodeEligibility']] ]) }