diff --git a/Jenkinsfile b/Jenkinsfile index 24fb52d..bf5a64c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -103,7 +103,10 @@ pipeline { steps { build(job: 'maven-parent', parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"], - [$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}"]]) echo "Done with maven-parent" + [$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}"], + [$class: 'LabelParameterValue', name: 'exec_label', label: "pipeline-agent", nodeEligibility: [$class: 'AllNodeEligibility']] + ]) + echo "Done with maven-parent" } } stage('build Core components') { @@ -169,8 +172,10 @@ def buildComponents(args) { if (args.items) { parallel args.items?.collectEntries { name -> [ "${name}": { if (name && !"NONE".equalsIgnoreCase(name)) - build(job: name, + build(job: 'maven-parent', parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"], - [$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}"]]) }]} - } + [$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}"], + [$class: 'LabelParameterValue', name: 'exec_label', label: "pipeline-agent", nodeEligibility: [$class: 'AllNodeEligibility']] + ]) + } } \ No newline at end of file diff --git a/README.md b/README.md index a91b30c..fb80e0d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Jenkins Pipeline script to manage a complete gCube release. * [Pipeline: Maven](https://plugins.jenkins.io/pipeline-maven) * [Pipeline: Basic Steps](https://plugins.jenkins.io/workflow-basic-steps) * [Kubernetes](https://plugins.jenkins.io/kubernetes) (for the YAML parser) +* [NodeLabelParameter](https://plugins.jenkins.io/nodelabelparameter) (The node and label parameter plugin allows to dynamically select the node on which a job should be executed.) * Jenkins configured with a JDK global tool named 'OpenJDK 8' * Jenkins configured with a Maven global tool named 'Maven 3.6.2'