[JIRA] (JENKINS-55600) Parallel execution of same job N times with different parameters leads to only 2 executions of the job

2019-01-15 Thread alpans...@gmail.com (JIRA)
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', 

[JIRA] (JENKINS-55600) Parallel execution of same job N times with different parameters leads to only 2 executions of the job

2019-01-15 Thread alpans...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexandr Panshin created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55600  
 
 
  Parallel execution of same job N times with different parameters leads to only 2 executions of the job   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 vjuranek  
 
 
Attachments: 
 sample_job_config.xml, screen0.jpg, screen1.jpg  
 
 
Components: 
 groovy-plugin  
 
 
Created: 
 2019-01-15 13:37  
 
 
Environment: 
  Jenkins 2.150.1, Pipeline-Groovy Plugin 2.57  
 
 
Labels: 
 groovy parallel  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Alexandr Panshin  
 

  
 
 
 
 

 
 
 
I created sample job (see "sample_job_config.xml" attachment) which has "PROJECT_NAME" parameter 
I want to run it in parallel 5 times with different "PROJECT_NAME" values. I created following script for this: 
 

 

pipeline {
agent none
stages {
stage('Processing projects') {
steps {
script {
def projectsBuilds = [:]

def labelParameters0 = []
labelParameters0.add([$class: 'LabelParameterValue',