From d748085413d188c1f49a40e53bce7d06883e9a81 Mon Sep 17 00:00:00 2001 From: Manuele Simi Date: Thu, 10 Oct 2019 10:10:06 -0400 Subject: [PATCH] Restore one share local repository among jobs. --- Jenkinsfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ecec0a7..06db8d8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,4 @@ +#!groovy​ import org.yaml.snakeyaml.Yaml // set the build options according to the Type of build @@ -62,7 +63,7 @@ pipeline { // see https://jenkins.io/doc/book/pipeline/syntax/#agent agent { - label 'pipeline-agent-garr' + label 'CD' } // see https://jenkins.io/doc/book/pipeline/syntax/#environment @@ -102,8 +103,8 @@ pipeline { steps { echo build(job: 'maven-parent', wait: true, parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"], - [$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}"], - [$class: 'LabelParameterValue', name: 'exec_label', label: "pipeline-agent-garr", nodeEligibility: [$class: 'AllNodeEligibility']] + [$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}/${PIPELINE_BUILD_NUMBER}"], + [$class: 'LabelParameterValue', name: 'exec_label', label: "CD", nodeEligibility: [$class: 'AllNodeEligibility']] ]).result echo "Done with maven-parent" } @@ -197,8 +198,8 @@ 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}/${PIPELINE_BUILD_NUMBER}/${name}"], - [$class: 'LabelParameterValue', name: 'exec_label', label: "pipeline-agent-garr", nodeEligibility: [$class: 'AllNodeEligibility']] + [$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}/${PIPELINE_BUILD_NUMBER}"], + [$class: 'LabelParameterValue', name: 'exec_label', label: "CD", nodeEligibility: [$class: 'AllNodeEligibility']] ]) } ]