[JIRA] (JENKINS-38795) global variables are not global singletons

2016-11-02 Thread witokondo...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Javier Delgado commented on  JENKINS-38795  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: global variables are not global singletons   
 

  
 
 
 
 

 
 I was maintaining the config state (the one I'm really interested into, but not inside the inner PR closure). I will let the repo as example showing how conf can be passed by, so it wont ming if action is treated as singleton. If anyone needs this, the inner closure with a parameter is the key (as well as the action invocation) Thanks Jesse  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
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-38795) global variables are not global singletons

2016-11-01 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick resolved as Duplicate  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 As noted in JENKINS-34416, when flow.groovy refers to the symbol action it is simply loading a plain class—it is not going through the global variable system at all—so it could not possibly share state. If you want to maintain state in action you must pass in an instance constructed from the main Jenkinsfile somehow.  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-38795  
 
 
  global variables are not global singletons   
 

  
 
 
 
 

 
Change By: 
 Jesse Glick  
 
 
Status: 
 Open Resolved  
 
 
Resolution: 
 Duplicate  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this 

[JIRA] (JENKINS-38795) global variables are not global singletons

2016-10-06 Thread witokondo...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Javier Delgado created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-38795  
 
 
  global variables are not global singletons   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 workflow-cps-global-lib-plugin  
 
 
Created: 
 2016/Oct/06 3:14 PM  
 
 
Environment: 
 Jenkins 2.24  cps-global-lib 2.3  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Javier Delgado  
 

  
 
 
 
 

 
 Similar to JENKINS-34416 (and might be another bad examples interpretation), having several global classes, an invocation from the Jenkinsfile makes a different object than a invocation from another class. Running a job with https://github.com/witokondoria/jenkins-multibranch-test as implicitly loaded global library and running the same repo Jenkinsfile, the job console output shows two different objects for invocations from Jenkinsfile:7 and closure vars.flow:24 Might be related to this, action.otherAction() cant be invoked from within the Jenkinsfile (replacing Jenkinsfile:7)  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment