Use the NodeLabelParameter plugin to set the pipeline-agent on the downstream jobs.
This commit is contained in:
parent
6fa0647d39
commit
28d9446d6a
|
@ -103,7 +103,10 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
build(job: 'maven-parent',
|
build(job: 'maven-parent',
|
||||||
parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"],
|
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') {
|
stage('build Core components') {
|
||||||
|
@ -169,8 +172,10 @@ def buildComponents(args) {
|
||||||
if (args.items) {
|
if (args.items) {
|
||||||
parallel args.items?.collectEntries { name -> [ "${name}": {
|
parallel args.items?.collectEntries { name -> [ "${name}": {
|
||||||
if (name && !"NONE".equalsIgnoreCase(name))
|
if (name && !"NONE".equalsIgnoreCase(name))
|
||||||
build(job: name,
|
build(job: 'maven-parent',
|
||||||
parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"],
|
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']]
|
||||||
|
])
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -8,6 +8,7 @@ Jenkins Pipeline script to manage a complete gCube release.
|
||||||
* [Pipeline: Maven](https://plugins.jenkins.io/pipeline-maven)
|
* [Pipeline: Maven](https://plugins.jenkins.io/pipeline-maven)
|
||||||
* [Pipeline: Basic Steps](https://plugins.jenkins.io/workflow-basic-steps)
|
* [Pipeline: Basic Steps](https://plugins.jenkins.io/workflow-basic-steps)
|
||||||
* [Kubernetes](https://plugins.jenkins.io/kubernetes) (for the YAML parser)
|
* [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 JDK global tool named 'OpenJDK 8'
|
||||||
* Jenkins configured with a Maven global tool named 'Maven 3.6.2'
|
* Jenkins configured with a Maven global tool named 'Maven 3.6.2'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue