[JIRA] (JENKINS-34818) Active Choice reactive parameter cannot access global parameters

2016-11-04 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Bruno P. Kinoshita commented on  JENKINS-34818  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Active Choice reactive parameter cannot access global parameters   
 

  
 
 
 
 

 
 I don't see why not Alon Chanukov. My bad for closing the issue without thinking about that. That would have been a much better way to fix/close it  Just pushed the code that includes the global node properties by default, when available. Couple of unit tests as well. Included in the next release 1.6. Cheers Bruno  
 

  
 
 
 
 

 
 
 

 
 
 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-34818) Active Choice reactive parameter cannot access global parameters

2016-11-04 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 SCM/JIRA link daemon commented on  JENKINS-34818  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Active Choice reactive parameter cannot access global parameters   
 

  
 
 
 
 

 
 Code changed in jenkins User: Bruno P. Kinoshita Path: src/test/java/org/biouno/unochoice/issue34818/TestGlobalNodePropertiesScript.java src/test/java/org/biouno/unochoice/issue34818/package-info.java src/test/java/org/biouno/unochoice/issue35101/TestGlobalNodePropertiesScript.java src/test/java/org/biouno/unochoice/issue35101/package-info.java http://jenkins-ci.org/commit/active-choices-plugin/e0b2555c0d53f385e176f2d73cc41a4035b38e82 Log: JENKINS-34818 Correct package and issue number  
 

  
 
 
 
 

 
 
 

 
 
 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-34818) Active Choice reactive parameter cannot access global parameters

2016-11-04 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 SCM/JIRA link daemon commented on  JENKINS-34818  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Active Choice reactive parameter cannot access global parameters   
 

  
 
 
 
 

 
 Code changed in jenkins User: Bruno P. Kinoshita Path: src/main/java/org/biouno/unochoice/AbstractScriptableParameter.java src/main/java/org/biouno/unochoice/util/Utils.java src/test/java/org/biouno/unochoice/issue35101/TestGlobalNodePropertiesScript.java src/test/java/org/biouno/unochoice/issue35101/package-info.java src/test/java/org/biouno/unochoice/util/TestUtils.java http://jenkins-ci.org/commit/active-choices-plugin/dcea3b7c0f346f69b52c476ae8f0e93d0e3edd74 Log: [FIXED JENKINS-34818] expand global node properties during script evaluation  
 

  
 
 
 
 

 
 
 

 
 
 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-34818) Active Choice reactive parameter cannot access global parameters

2016-11-04 Thread chanu...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alon Chanukov commented on  JENKINS-34818  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Active Choice reactive parameter cannot access global parameters   
 

  
 
 
 
 

 
 thanks for the work around but, is it impossible to have the plugin automatically do this code?  it is very annoying to add this code every time i want to get a variable... I would imagine every user would like access to all global variables always.  
 

  
 
 
 
 

 
 
 

 
 
 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-34818) Active Choice reactive parameter cannot access global parameters

2016-11-04 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Bruno P. Kinoshita closed an issue as Not A Defect  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Not a defect  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-34818  
 
 
  Active Choice reactive parameter cannot access global parameters   
 

  
 
 
 
 

 
Change By: 
 Bruno P. Kinoshita  
 
 
Status: 
 Resolved Closed  
 

  
 
 
 
 

 
 
 

 
 
 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-34818) Active Choice reactive parameter cannot access global parameters

2016-10-23 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Bruno P. Kinoshita updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-34818  
 
 
  Active Choice reactive parameter cannot access global parameters   
 

  
 
 
 
 

 
Change By: 
 Bruno P. Kinoshita  
 

  
 
 
 
 

 
 In manage_jenkins System i under Global properties-->Environment variablesI set a list of variables.I am unable to access any of them in my active choice parameter.see example of my usage below in images.If i simply switch the $DEVICES_MAP_DIR with the path that is shown in the global environment variable it works as expected using the global environment variable it fails.logs say: {noformat} Error executing script for dynamic parameterjava.io.FileNotFoundException: $DEVICES_MAP_DIR (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(Unknown Source) at groovy.util.CharsetToolkit.(CharsetToolkit.java:71) at org.codehaus.groovy.runtime.ResourceGroovyMethods.newReader(ResourceGroovyMethods.java:1572) at org.codehaus.groovy.runtime.ResourceGroovyMethods.getText(ResourceGroovyMethods.java:600) at org.codehaus.groovy.runtime.dgm$962.doMethodInvoke(Unknown Source) at org.codehaus.groovy.reflection.GeneratedMetaMethod$Proxy.doMethodInvoke(GeneratedMetaMethod.java:73) at org.codehaus.groovy.runtime.metaclass.MethodMetaProperty$GetBeanMethodMetaProperty.getProperty(MethodMetaProperty.java:76) at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:64) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296) at Script1.run(Script1.groovy:4) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:623) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:594) at org.biouno.unochoice.model.GroovyScript.eval(GroovyScript.java:130) at org.biouno.unochoice.model.ScriptlerScript.eval(ScriptlerScript.java:110) at org.biouno.unochoice.util.ScriptCallback.call(ScriptCallback.java:97) at org.biouno.unochoice.AbstractScriptableParameter.eval(AbstractScriptableParameter.java:216) at org.biouno.unochoice.AbstractScriptableParameter.getChoices(AbstractScriptableParameter.java:179) at org.biouno.unochoice.AbstractScriptableParameter.getChoices(AbstractScriptableParameter.java:167) at sun.reflect.GeneratedMethodAccessor546.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258) at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104) at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83) at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57) at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51) at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80) at 

[JIRA] (JENKINS-34818) Active Choice reactive parameter cannot access global parameters

2016-10-22 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Bruno P. Kinoshita started work on  JENKINS-34818  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
Change By: 
 Bruno P. Kinoshita  
 
 
Status: 
 Open In Progress  
 

  
 
 
 
 

 
 
 

 
 
 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-34818) Active Choice reactive parameter cannot access global parameters

2016-10-22 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Bruno P. Kinoshita stopped work on  JENKINS-34818  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
Change By: 
 Bruno P. Kinoshita  
 
 
Status: 
 In Progress Open  
 

  
 
 
 
 

 
 
 

 
 
 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-34818) Active Choice reactive parameter cannot access global parameters

2016-10-22 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Bruno P. Kinoshita resolved as Not A Defect  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-34818  
 
 
  Active Choice reactive parameter cannot access global parameters   
 

  
 
 
 
 

 
Change By: 
 Bruno P. Kinoshita  
 
 
Status: 
 Open Resolved  
 
 
Resolution: 
 Not A Defect  
 

  
 
 
 
 

 
 
 

 
 
 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-34818) Active Choice reactive parameter cannot access global parameters

2016-10-22 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Bruno P. Kinoshita commented on  JENKINS-34818  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Active Choice reactive parameter cannot access global parameters   
 

  
 
 
 
 

 
 Actually the plugin can access global parameters. But... When a global parameter, or global property, is created, it gets stored in a special area, and is merged with system environment variables when the build is executed. When the parameter is rendered, there is no build. Hence the issue, where there is no environment variable available. Not even as env var. The solution is to access the global parameter programmatically in Groovy. 

 

import jenkins.model.*

instance = Jenkins.getInstance()
globalNodeProperties = instance.getGlobalNodeProperties()

myParam = 'Not Set'

globalNodeProperties.each {
  envVars = it.getEnvVars()
  if (envVars.get('DEVICES_MAP_DIR') != null) {
myParam = envVars.get('DEVICES_MAP_DIR');
  }
}

return ['/home', myParam]
 

 Hope that helps Bruno  
 

  
 
 
 
 

 
 
 

 
 
 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.