Title: Message Title
Alexandr Panshin updated an issue
Jenkins / JENKINS-55600
Parallel execution of same job N times with different parameters leads to only 2 executions of the job
Change By:
Alexandr Panshin
# 1) I created sample job (see "sample_job_config.xml" attachment) which has "PROJECT_NAME" parameter # 2) I want to run it in parallel 5 times with different "PROJECT_NAME" values. I created following script for this:{code:java}pipeline {agent nonestages {stage('Processing projects') {steps {script {def projectsBuilds = [:]def labelParameters0 = []labelParameters0.add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])labelParameters0.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project0'])projectsBuilds['project0'] = { stage(String.format('%s execution', 'project0')) { build job: 'Sample-Job', parameters: labelParameters0 }}def labelParameters1 = []labelParameters0.add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])labelParameters0.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project1'])projectsBuilds['project1'] = { stage(String.format('%s execution', 'project1')) { build job: 'Sample-Job', parameters: labelParameters1 }}def labelParameters2 = []labelParameters0.add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])labelParameters0.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project2'])projectsBuilds['project2'] = { stage(String.format('%s execution', 'project2')) { build job: 'Sample-Job', parameters: labelParameters2 }}def labelParameters3 = []labelParameters0.add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])labelParameters0.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project3'])projectsBuilds['project3'] = { stage(String.format('%s execution', 'project3')) { build job: 'Sample-Job', parameters: labelParameters3 }}def labelParameters4 = []labelParameters0.add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])labelParameters0.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project4'])projectsBuilds['project4'] = { stage(String.format('%s execution', 'project4')) { build job: 'Sample-Job',