Set PIPELINE_BUILD_NUMBER in the env section.
This commit is contained in:
parent
08626b8234
commit
514e7764da
|
@ -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']]
|
||||
])
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue