[JIRA] (JENKINS-61000) Storing "jenkins.model.Jenkins.get().nodes" in local variable and sleeping causes "NotSerializableException" in vSphereCloudLauncher

2020-02-06 Thread alpans...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61000  
 
 
  Storing "jenkins.model.Jenkins.get().nodes" in local variable and sleeping causes "NotSerializableException" in vSphereCloudLauncher   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Labels: 
 vSphereCloudLauncher  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204468.158148000.2661.1581001680653%40Atlassian.JIRA.


[JIRA] (JENKINS-61000) Storing "jenkins.model.Jenkins.get().nodes" in local variable and sleeping causes "NotSerializableException" in vSphereCloudLauncher

2020-02-06 Thread alpans...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61000  
 
 
  Storing "jenkins.model.Jenkins.get().nodes" in local variable and sleeping causes "NotSerializableException" in vSphereCloudLauncher   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Environment: 
 Jenkins 2. 190 204 . 3 2 vSphere Plugin 2.21  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.204468.158148000.2659.1581001621480%40Atlassian.JIRA.


[JIRA] (JENKINS-61000) Storing "jenkins.model.Jenkins.get().nodes" in local variable and sleeping causes "NotSerializableException" in vSphereCloudLauncher

2020-02-06 Thread alpans...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61000  
 
 
  Storing "jenkins.model.Jenkins.get().nodes" in local variable and sleeping causes "NotSerializableException" in vSphereCloudLauncher   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 

  
 
 
 
 

 
 This simple pipeline script causes  "java.io.NotSerializableException: org.jenkinsci.plugins.vSphereCloudLauncher"  exception (see consoleText in attachments):{code:java}import hudson.model.Nodepipeline {agent {label 'master'}stages {stage('Defect reproducing stage') {steps {script {List nodes = jenkins.model.Jenkins.get().nodes;sleep(5);}}}}}{code}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 

[JIRA] (JENKINS-61000) Storing "jenkins.model.Jenkins.get().nodes" in local variable and sleeping causes "NotSerializableException" in vSphereCloudLauncher

2020-02-06 Thread alpans...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61000  
 
 
  Storing "jenkins.model.Jenkins.get().nodes" in local variable and sleeping causes "NotSerializableException" in vSphereCloudLauncher   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Environment: 
 Jenkins 2.190.3vSphere Plugin 2.21  
 

  
 
 
 
 

 
 This simple pipeline script causes exception (see consoleText in attachments):{code:java}import hudson.model.Nodepipeline {agent {label 'master'}stages {stage('Defect reproducing stage') {steps {script {List nodes = jenkins.model.Jenkins.get().nodes;sleep(5);}}}}}{code}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are 

[JIRA] (JENKINS-61000) Storing "jenkins.model.Jenkins.get().nodes" in local variable and sleeping causes "NotSerializableException" in vSphereCloudLauncher

2020-02-06 Thread alpans...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexandr Panshin created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61000  
 
 
  Storing "jenkins.model.Jenkins.get().nodes" in local variable and sleeping causes "NotSerializableException" in vSphereCloudLauncher   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 vjuranek  
 
 
Attachments: 
 consoleText  
 
 
Components: 
 groovy-plugin  
 
 
Created: 
 2020-02-06 14:40  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Alexandr Panshin  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

[JIRA] (JENKINS-58474) Port not reachable while creating a slave agent in windows for a linux master

2019-10-08 Thread alpans...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexandr Panshin commented on  JENKINS-58474  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Port not reachable while creating a slave agent in windows for a linux master   
 

  
 
 
 
 

 
 Have the same problem.  If I try connect the same agent to another Jenkins server on Windows 10, everything works.  Both servers have same version of Jenkins (2.190.1), approximately same set of plugins. Even tried to use static port and explicitly whitelist it on CentOS, did not help.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200609.1562940037000.3208.1570528320294%40Atlassian.JIRA.


[JIRA] (JENKINS-55748) Jenkins cannot execute one job with the same (by value, not adress) parameters, more than once

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55748  
 
 
  Jenkins cannot execute one job with the same (by value, not adress) parameters, more than once   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Summary: 
 Jenkins cannot execute  more, than  one job with the same (by value, not adress) parameters, more than once  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55748) Jenkins cannot execute more, than one job with the same (by value, not adress) parameters, more than once

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin commented on  JENKINS-55748  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Jenkins cannot execute more, than one job with the same (by value, not adress) parameters, more than once   
 

  
 
 
 
 

 
 Probably is a special case of this defect  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55748) Jenkins cannot execute more, than one job with the same (by value, not adress) parameters, more than once

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55748  
 
 
  Jenkins cannot execute more, than one job with the same (by value, not adress) parameters, more than once   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 

  
 
 
 
 

 
 I want to execute same job with same parameters five timesBut the following code leads to only one actual execution:{code:java}pipeline {agent nonestages {stage('Processing same project 5 times') {steps {script {def projectsBuilds = [:]for (int i = 0; i < 5; i++) { int currentIteration = i String uniqueRunName = String.format('Run #%d', currentIteration); def labelParameters = [] labelParameters.add([$class: 'LabelParameterValue', name: 'node', label: 'linux']) labelParameters.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'Sample-Job']) print(String.format("This parameters set hash is \"%s\"", labelParameters.hashCode())) projectsBuilds[uniqueRunName] = { stage(String.format('Sample-Job execution #%d', currentIteration)) { build job: 'Sample-Job', parameters: labelParameters } }}parallel projectsBuilds;}}}}}{code}As you see from execution log screen (screen0), though I explicitly instantiate "labelParameters" on each iteration, it has the same hash code in every iteration. Seems, Jenkins groovy plugin consider this situation as "one parameters container - one run"  Meanwhile if I just add one more parameter to container - current iteration index, groovy stops to "optimize" my code and now "labelParameters" has different hash code on every iteration. This leads to execution of "Sample-Job" 5 times, as intended (screen1){code:java}pipeline {agent nonestages {stage('Processing same project 5 times') {steps {script {def projectsBuilds = [:]for (int i = 0; i < 5; i++) { int currentIteration = i String uniqueRunName = String.format('Run #%d', currentIteration); def labelParameters = [] labelParameters.add([$class: 'LabelParameterValue', name: 'node', label: 'linux']) labelParameters.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'Sample-Job']) labelParameters.add([$class: "StringParameterValue", name: "ITERATION_INDEX", value: currentIteration.toString()]) print(String.format("This parameters set hash is \"%s\"", labelParameters.hashCode())) projectsBuilds[uniqueRunName] = { stage(String.format('Sample-Job execution #%d', currentIteration)) { build job: 'Sample-Job', parameters: labelParameters  

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

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin closed an issue as Duplicate  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Found the source of the problem, created new defect, which better describes problem  
 

  
 
 
 
 

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

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Status: 
 Open Closed  
 
 
Resolution: 
 Duplicate  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55748) Jenkins cannot execute more, than one job with the same (by value, not adress) parameters, more than once

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55748  
 
 
  Jenkins cannot execute more, than one job with the same (by value, not adress) parameters, more than once   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Summary: 
 Jemnkins Jenkins  cannot execute more, than one job with the same (by value, not adress) parameters, more than once  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55748) Jemnkins cannot execute more, than one job with the same (by value, not adress) parameters, more than once

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55748  
 
 
  Jemnkins cannot execute more, than one job with the same (by value, not adress) parameters, more than once   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 vjuranek  
 
 
Attachments: 
 screen0.jpg, screen1.jpg  
 
 
Components: 
 groovy-plugin  
 
 
Created: 
 2019-01-23 14:44  
 
 
Environment: 
 Jenkins 2.150.1, Pipeline-Groovy Plugin 2.57  
 
 
Labels: 
 groovy parallel  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Alexandr Panshin  
 

  
 
 
 
 

 
 I want to execute same job with same parameters five times But the following code leads to only one actual execution: 

 

pipeline {
agent none
stages {
stage('Processing same project 5 times') {
steps {
script {
def projectsBuilds = [:]

for (int i = 0; i < 5; i++) {
int currentIteration = i
String uniqueRunName = String.format('Run #%d', currentIteration);

def labelParameters = []
labelParameters.add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])
labelParameters.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 

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

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin edited a comment on  JENKINS-55600  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parallel execution of same job N times with different parameters leads to only 1 execution of the job   
 

  
 
 
 
 

 
 Though I still guess it is a defect (I suppose "labelParameters = []" instruction in Groovy should rewrite pointer value?), this problem seems to appear because of using same "labelParameters" variable for all of jobs. Using separate Instantiating  container for parameters for each job seems to solve the problem:{code:java}pipeline {agent nonestages {stage('Processing projects') {steps {script {def projects = ['project0', 'project1', 'project2', 'project3', 'project4']def projectsBuilds = [:] // essential change herefor (project in projects) { //JENKINS-55426 need to save iterated variable value into intermediate variable, otherwise there will be last value from collection for all jobs def currentProject = project def labelParameters = [] labelParameters.add([$class: 'LabelParameterValue', name: 'node', label: 'linux']) labelParameters.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: currentProject]) projectsBuilds[currentProject] = { stage(String.format('%s execution', currentProject)) { build job: 'Sample-Job', parameters: labelParameters } }}print(projectsBuilds)parallel projectsBuilds;}}}}}{code}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more 

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

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin commented on  JENKINS-55600  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parallel execution of same job N times with different parameters leads to only 1 execution of the job   
 

  
 
 
 
 

 
 Though I still guess it is a defect (I suppose "labelParameters = []" instruction in Groovy should rewrite pointer value?), this problem seems to appear because of using same "labelParameters" variable for all of jobs. Using separate container for parameters for each job seems to solve the problem: 

 

pipeline {
agent none
stages {
stage('Processing projects') {
steps {
script {
def projects = ['project0', 'project1', 'project2', 'project3', 'project4']
def projectsBuilds = [:] // essential change here

for (project in projects) {
//JENKINS-55426 need to save iterated variable value into intermediate variable, otherwise there will be last value from collection for all jobs
def currentProject = project
def labelParameters = []
labelParameters.add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])
labelParameters.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: currentProject])

projectsBuilds[currentProject] = {
stage(String.format('%s execution', currentProject)) {
build job: 'Sample-Job', parameters: labelParameters
}
}
}

print(projectsBuilds)
parallel projectsBuilds;
}
}
}
}
}
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

[JIRA] (JENKINS-55600) Parallel execution of same job N times with different parameters leads to only 1 execution 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 1 execution 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  projects  = [ :]def labelParameters = []labelParameters.add([$class:  ' LabelParameterValue', name: 'node', label: 'linux'])labelParameters.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: ' project0' ])projectsBuilds['project0'] = { stage(String.format('%s execution' , ' project0 project1 ' )) { build job: 'Sample-Job' ,  parameters: labelParameters }}labelParameters = []labelParameters.add([$class:  ' LabelParameterValue project2 ',  name:  ' node project3 ',  label:  ' linux project4 '] )  labelParameters.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project1']) def projectsBuilds ['project1']  =  { stage(String.format('%s execution', 'project1')) { build job: 'Sample-Job', parameters: labelParameters }}labelParameters =  [ ]labelParameters.add([$class :  'LabelParameterValue', name: 'node', label: 'linux' ] )  def labelParameters .add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project2'])  projectsBuilds['project2'] = { stage for ( String.format('%s execution', 'project2' project in projects ) )  {  build job: 'Sample  //JENKINS - Job' 55426 need to save iterated variable value into intermediate variable ,  parameters: labelParameters }}labelParameters = []labelParameters.add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])labelParameters.add([$class: "StringParameterValue", name: "PROJECT_NAME",  otherwise there will be last  value : 'project3'])  from collection for all jobs  projectsBuilds['project3']  def currentProject  =  {  project   stage(String.format('%s execution', 'project3')) { build job: 'Sample-Job', parameters:  labelParameters  }}labelParameters  = []

[JIRA] (JENKINS-55600) Parallel execution of same job N times with different parameters leads to only 1 execution 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 1 execution of the job   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Priority: 
 Major Minor  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55600) Parallel execution of same job N times with different parameters leads to only 1 execution 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 1 execution of the job   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Attachment: 
 screen.jpg  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55600) Parallel execution of same job N times with different parameters leads to only 1 execution 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 1 execution of the job   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 

  
 
 
 
 

 
 1) I created sample job (see "sample_job_config.xml" attachment) which has "PROJECT_NAME" parameter2) 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 labelParameters = []labelParameters.add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])labelParameters.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project0'])projectsBuilds['project0'] = { stage(String.format('%s execution', 'project0')) { build job: 'Sample-Job', parameters: labelParameters }}labelParameters = []labelParameters.add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])labelParameters.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project1'])projectsBuilds['project1'] = { stage(String.format('%s execution', 'project1')) { build job: 'Sample-Job', parameters: labelParameters }}labelParameters = []labelParameters.add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])labelParameters.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project2'])projectsBuilds['project2'] = { stage(String.format('%s execution', 'project2')) { build job: 'Sample-Job', parameters: labelParameters }}labelParameters = []labelParameters.add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])labelParameters.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project3'])projectsBuilds['project3'] = { stage(String.format('%s execution', 'project3')) { build job: 'Sample-Job', parameters: labelParameters }}labelParameters = []labelParameters.add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])labelParameters.add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project4'])projectsBuilds['project4'] = { stage(String.format('%s execution', 'project4')) { build job: 'Sample-Job', parameters: labelParameters }   

[JIRA] (JENKINS-55600) Parallel execution of same job N times with different parameters leads to only 1 execution 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 1 execution of the job   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Summary: 
 Parallel execution of same job N times with different parameters leads to only  2 executions  1 execution  of the job  
 

  
 
 
 
 

 
 1) I created sample job (see "sample_job_config.xml" attachment) which has "PROJECT_NAME" parameter2) 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  labelParameters  = [] labelParameters0 labelParameters .add([$class: 'LabelParameterValue', name: 'node', label: 'linux']) labelParameters0 labelParameters .add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project0'])projectsBuilds['project0'] = { stage(String.format('%s execution', 'project0')) { build job: 'Sample-Job', parameters:  labelParameters0  labelParameters  }} def labelParameters1 labelParameters  = [] labelParameters0 labelParameters .add([$class: 'LabelParameterValue', name: 'node', label: 'linux']) labelParameters0 labelParameters .add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project1'])projectsBuilds['project1'] = { stage(String.format('%s execution', 'project1')) { build job: 'Sample-Job', parameters:  labelParameters1  labelParameters  }} def labelParameters2 labelParameters  = [] labelParameters0 labelParameters .add([$class: 'LabelParameterValue', name: 'node', label: 'linux']) labelParameters0 labelParameters .add([$class: "StringParameterValue", name: "PROJECT_NAME", value: 'project2'])projectsBuilds['project2'] = { stage(String.format('%s execution', 'project2')) { build job: 'Sample-Job', parameters:  labelParameters2  labelParameters  }} def labelParameters3 labelParameters  = [] labelParameters0 labelParameters .add([$class: 'LabelParameterValue', name: 'node', label: 'linux'])   

[JIRA] (JENKINS-55600) Parallel execution of same job N times with different parameters leads to only 1 execution 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 1 execution of the job   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Attachment: 
 screen0.jpg  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55600) Parallel execution of same job N times with different parameters leads to only 1 execution 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 1 execution of the job   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Attachment: 
 screen1.jpg  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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', 

[JIRA] (JENKINS-55425) Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55425  
 
 
  Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Attachment: 
 log.txt  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55425) Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55425  
 
 
  Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Attachment: 
 log.txt  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55425) Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55425  
 
 
  Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Attachment: 
 jobAlwaysSuccessful.jpg  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55425) Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55425  
 
 
  Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Attachment: 
 log.txt  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55425) Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55425  
 
 
  Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 

  
 
 
 
 

 
 I have four jobs - 2 for windows and 2 for linux agents. These are simple test jobs :  just copy one file to another directory, sleep 10 seconds and echo "successfull".One of the linux jobs is intentionally wrong - path to file is non-existent.I try to run these jobs in parallel from pipeline script:{code:java}import jenkins.model.Jenkinspipeline {agent nonestages {stage('Preparing machines') {steps {script {def machines = ['agent-windows0', 'agent-windows1', 'agent-redhat0', 'agent-redhat1']def machinePreparations = [:]for (machine in machines) { def agentName = machine def labelParameters = [] labelParameters.add([$class: 'NodeParameterValue', name: 'node_name', labels: [agentName], nodeEligibility: [$class: 'AllNodeEligibility']]) labelParameters.add([$class: 'StringParameterValue', name: 'ARBITRARY_PARAMETER', value: 'ARBITRARY_VALUE']) machinePreparations[agentName] = { stage(agentName + ' preparation') { build job: '../Preparation/' + agentName, parameters: labelParameters def node = Jenkins.get().nodes.find({it.name == agentName}) node.setLabelString(node.getLabelString() + 'successful') println(String.format("Job with machine %s successfully done!", agentName)) } }}parallel machinePreparations}}}}}{code}Sometimes everything goes right - only wrong linux job fails, all other finish successfully.But sometimes another linux job is also marked as failed in pipeline tab (See screen attached)In the job tab, this job is still successful though.In this case, everything, which is supposed to be done within this failed/successfull job is done, but code, which goes after "build job" instruction is not executed  
 

  
 
 
 
 

 
 
 

 
 
 

[JIRA] (JENKINS-55426) Using "for in" loop for generating tasks for "parallel" execution, causes all tasks to have last value from iterated collection

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55426  
 
 
  Using "for in" loop for generating tasks for "parallel" execution, causes all tasks to have last value from iterated collection   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 

  
 
 
 
 

 
 When I try to generate tasks for parallel execution using the following code:{code:java}import jenkins.model.Jenkinspipeline {agent nonestages {stage('Preparing machines') {steps {script {def machines = ['agent-windows0', 'agent-windows1', 'agent-redhat0', 'agent-redhat1']def machinePreparations = [:]for (machine in machines) { def labelParameters = [] labelParameters.add([$class: 'NodeParameterValue', name: 'node_name', labels: [machine], nodeEligibility: [$class: 'AllNodeEligibility']]) labelParameters.add([$class: 'StringParameterValue', name: 'ARBITRARY_PARAMETER', value: 'ARBITRARY_VALUE']) machinePreparations[machine] = { stage(machine + ' preparation') { build job: '../Preparation/' + machine, parameters: labelParameters def node = Jenkins.get().nodes.find({it.name == machine}) node.setLabelString(node.getLabelString() + 'successful') println(String.format("Job with machine %s successfully done!", machine)) } }}parallel machinePreparations}}}}}{code}I have all the tasks receiving last value from collection ("agent-redhat1") - see screen attached.This can be partially fixed by saving "machine" variable into another intermediate variable and using this intermediate variable instead:{code:java}import jenkins.model.Jenkinspipeline {agent nonestages {stage('Preparing machines') {steps {script {def machines = ['agent-windows0', 'agent-windows1', 'agent-redhat0', 'agent-redhat1']def machinePreparations = [:]for (machine in machines) { def agentName = machine def labelParameters = [] labelParameters.add([$class: 'NodeParameterValue', name: 'node_name', labels: [agentName], nodeEligibility: [$class: 'AllNodeEligibility']]) labelParameters.add([$class: 'StringParameterValue', name: 'ARBITRARY_PARAMETER', value: 'ARBITRARY_VALUE']) machinePreparations[agentName] = { stage(agentName + ' preparation') { build job: '../Preparation/' + agentName, parameters: labelParameters def node = Jenkins.get().nodes.find({it.name == agentName}) node.setLabelString(node.getLabelString() + 'successful') println(String.format("Job with machine %s successfully done!", agentName))

[JIRA] (JENKINS-55426) Using "for in" loop for generating tasks for "parallel" execution, causes all tasks to have last value from iterated collection

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55426  
 
 
  Using "for in" loop for generating tasks for "parallel" execution, causes all tasks to have last value from iterated collection   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 vjuranek  
 
 
Attachments: 
 screen1.jpg  
 
 
Components: 
 groovy-plugin  
 
 
Created: 
 2019-01-07 14:55  
 
 
Environment: 
 Jenkins 2.150.1, Pipeline-Groovy Plugin 2.57  
 
 
Labels: 
 groovy parallel  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Alexandr Panshin  
 

  
 
 
 
 

 
 When I try to generate tasks for parallel execution using the following code: 

 

import jenkins.model.Jenkins

pipeline {
agent none
stages {
stage('Preparing machines') {
steps {
script {
def machines = ['agent-windows0', 'agent-windows1', 'agent-redhat0', 'agent-redhat1']
def machinePreparations = [:]

for (machine in machines) {
def labelParameters = []
labelParameters.add([$class: 'NodeParameterValue', name: 'node_name', labels: [machine], nodeEligibility: [$class: 'AllNodeEligibility']])
labelParameters.add([$class: 'StringParameterValue', name: 

[JIRA] (JENKINS-55425) Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55425  
 
 
  Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed   
 

  
 
 
 
 

 
Change By: 
 Alexandr Panshin  
 
 
Attachment: 
 screen.jpg  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55425) Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed

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


 
 
 
 

 
 
 

 
   
 Alexandr Panshin created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55425  
 
 
  Generating tasks in "for in" loop and executing them in parallel SOMETIMES causes failure of successfull task if another one failed   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 vjuranek  
 
 
Components: 
 groovy-plugin  
 
 
Created: 
 2019-01-07 14:41  
 
 
Environment: 
 Jenkins 2.150.1, Pipeline-Groovy Plugin 2.57  
 
 
Labels: 
 groovy parallel  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Alexandr Panshin  
 

  
 
 
 
 

 
 I have four jobs - 2 for windows and 2 for linux agents. These are simple test jobs just copy one file to another directory, sleep 10 seconds and echo "successfull". One of the linux jobs is intentionally wrong - path to file is non-existent. I try to run these jobs in parallel from pipeline script: 

 

import jenkins.model.Jenkins

pipeline {
agent none
stages {
stage('Preparing machines') {
steps {
script {
def machines = ['agent-windows0', 'agent-windows1', 'agent-redhat0', 'agent-redhat1']
def machinePreparations = [:]

for (machine in machines) {
def agentName = machine
def labelParameters = []
labelParameters.add([$class: 'NodeParameterValue', name: 'node_name', labels: [agentName], nodeEligibility: [$class: 'AllNodeEligibility']])
labelParameters.add([$class: 

[JIRA] (JENKINS-55113) Constructor, using other methods of the class, causes "hudson.remoting.ProxyException: com.cloudbees.groovy.cps.impl.CpsCallableInvocation"

2018-12-15 Thread alpans...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexandr Panshin commented on  JENKINS-55113  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Constructor, using other methods of the class, causes "hudson.remoting.ProxyException: com.cloudbees.groovy.cps.impl.CpsCallableInvocation"   
 

  
 
 
 
 

 
 Thank you for clarification and workaround, Devin!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-55113) Constructor, using other methods of the class, causes "hudson.remoting.ProxyException: com.cloudbees.groovy.cps.impl.CpsCallableInvocation"

2018-12-10 Thread alpans...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexandr Panshin created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-55113  
 
 
  Constructor, using other methods of the class, causes "hudson.remoting.ProxyException: com.cloudbees.groovy.cps.impl.CpsCallableInvocation"   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 workflow-cps-plugin  
 
 
Created: 
 2018-12-10 18:26  
 
 
Environment: 
 Jenkins 2.150.1, Pipeline-Groovy Plugin 2.57  
 
 
Labels: 
 groovy  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Alexandr Panshin  
 

  
 
 
 
 

 
 Using the constructor, which calls to another public method of the class causes "hudson.remoting.ProxyException: com.cloudbees.groovy.cps.impl.CpsCallableInvocation" on execution: 

 

pipeline {
agent none
stages {
stage('Processing projects') {
agent {label 'master'}
steps {
script {
def example = new Example(3)
println(example.getNumber())
}
}
}
}
}

public class Example {
private int a;

public Example() {
a = 0;
}

public Example(int base) {
this();
addDoubled(base);
}

public void addDoubled(int base) {
a += base * 2;
}

public int getNumber() {
return a;
}
}
 

 Using the same class without using such constructor works fine: