[JIRA] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2016-02-04 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Bruno P. Kinoshita closed an issue as Fixed 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
Fixed in 1.3 
 
 
 
 
 
 
 
 
 
 Jenkins /  JENKINS-29476 
 
 
 
  The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 

Change By:
 
 Bruno P. Kinoshita 
 
 
 

Status:
 
 Resolved Closed 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-12-20 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 SCM/JIRA link daemon commented on  JENKINS-29476 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 
 
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 http://jenkins-ci.org/commit/active-choices-plugin/920bd258ce5801e3ddabb776bb2cfb8114658a08 Log: [FIXED JENKINS-29476] Add jenkinsProject variable to binding context 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-12-20 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 SCM/JIRA link daemon resolved as Fixed 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-29476 
 
 
 
  The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 

Change By:
 
 SCM/JIRA link daemon 
 
 
 

Status:
 
 In Progress Resolved 
 
 
 

Resolution:
 
 Fixed 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-12-20 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Bruno P. Kinoshita commented on  JENKINS-29476 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 
 
Comments added to the Pull Request, adding credit to PR submitter in the plug-in Wiki, alongside this issue number 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-12-20 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Bruno P. Kinoshita updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-29476 
 
 
 
  The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 
 
Screen shots, generated using two parameters. A simple cascade parameter with an array of numbers, and another cascade parameter with the following script: 

 

import hudson.model.*
import jenkins.model.*

def job = binding.jenkinsProject
return [job.name, Param001]
 

 
 
 
 
 
 
 
 
 
 

Change By:
 
 Bruno P. Kinoshita 
 
 
 

Attachment:
 
 JENKINS-32149-02.png 
 
 
 

Attachment:
 
 JENKINS-32149-01.png 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group an

[JIRA] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-12-20 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Bruno P. Kinoshita commented on  JENKINS-29476 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 
 
By the fault, the jenkinsProject variable will always be present in the binding context, and can be used in any kind of parameter. 
The value is not being persisted. The strategy to get the project is as follows: 
1. When the project is saved, we get the current HTTP Request (StaplerRequest) which contains the parameter parameters, and some helper methods 2. From the current request, find an ancestor to the parameter definition which class derives from Project 3. Store *the name* of the project 4. When a parameter is evaluated 4.1 If the project name is set, get the Project object from Jenkins by giving the project name (more efficient) 4.2 Otherwise, get the parameter unique UUID and search all Jenkins projects for one that contains this parameter. Then get the project object (slower) 5. Get the parameters map just before evaluating the script, inject the helper parameters (at the moment it consists of only jenkinsProject=...) 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-12-19 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Bruno P. Kinoshita commented on  JENKINS-29476 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 
 
This will be the last issue fixed before the 1.3 release (probably before x-mas)  
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-12-19 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Bruno P. Kinoshita started work on  JENKINS-29476 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 

Change By:
 
 Bruno P. Kinoshita 
 
 
 

Status:
 
 Open In Progress 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-09-19 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Bruno P. Kinoshita updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-29476 
 
 
 
  The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 

Change By:
 
 Bruno P. Kinoshita 
 
 
 

Priority:
 
 Major Critical 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-09-19 Thread brunodepau...@yahoo.com.br (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Bruno P. Kinoshita commented on  JENKINS-29476 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 
 
Ack, including this one in the list of issues for the next dev cycle. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-08-13 Thread imoutsat...@msn.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Ioannis Moutsatsos commented on  JENKINS-29476 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 
 
I have not been able to use any build environment parameters directly in the groovy script. They seem to be null. I agree that this is a high priority issue. It is very useful to have all of the build parameters in the script binding context (for both groovy scripts and scriptlets) 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-08-13 Thread imoutsat...@msn.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Ioannis Moutsatsos edited a comment on  JENKINS-29476 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 
 I have not been able to use any build environment parameters directly in the groovy script. They seem to be null. I agree that this is a high priority issue. It is very useful to have all of the build  parameters  environment variables  in the script binding context (for both groovy scripts and scriptlets) 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-07-20 Thread 100a...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Waldek Kozba updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-29476 
 
 
 
  The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 

Change By:
 
 Waldek Kozba 
 
 
 
 
 
 
 
 
 
 I've experienced a strange behavior, when working with the Active Choices Reactive Reference Parameter.The use case was to set the parameter value to the actual Jenkins job name, as a fallback for missing referenced parameter value.The Groovy code:{code:java}import hudson.model.*import jenkins.model.*def job = binding.jenkinsProjectdef artifactName = binding.variables.get("1_ARTIFACT")if (!artifactName) { artifactName = job.name}return ""{code}.. where the '1_ARTIFACT' is the referenced variable.The above works as expected, when one creates a project and saves it in Jenkins UI.It stops working though, after Jenkins restart.After some investigation I've realized that the 'jenkinsProject' variable is missing in the binding after fresh Jenkins start  (or restart) . When one goes then into the job configuration UI and presses the 'Save' button (no changes required), the above code starts working again, because the 'jenkinsProject' variable is injected into the binding.It doesn't matter if the Groovy script is embedded in the parameter config or stored and referenced as Scriptler script, the bahavior is the same.Apparently the 'jenkinsProject' variable is not being initialized for the _org.biouno.unochoice.DynamicReferenceParameter_ during the Jenkins start. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Go

[JIRA] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-07-20 Thread 100a...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Waldek Kozba updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-29476 
 
 
 
  The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 

Change By:
 
 Waldek Kozba 
 
 
 
 
 
 
 
 
 
 I've experienced a strange behavior, when working with the Active Choices Reactive Reference Parameter.The use case was to set the parameter value to the actual Jenkins job name, as a fallback for missing referenced parameter value.The Groovy code:{code:java}import hudson.model.*import jenkins.model.*def job = binding.jenkinsProjectdef artifactName = binding.variables.get("1_ARTIFACT")if (!artifactName) { artifactName = job.name}return ""{code}.. where the '1_ARTIFACT' is the referenced variable.The above works as expected, when one creates a project and saves it in Jenkins UI.It stops working though, after Jenkins restart.After some investigation I've realized that the 'jenkinsProject' variable is missing in the binding after fresh Jenkins start. When one goes then into the job configuration UI and presses the 'Save' button (no changes required), the above code starts working again, because the 'jenkinsProject' variable is injected into the binding.It doesn't matter  for the  if the Groovy script is embedded in the parameter config or stored and referenced as Scriptler script, the bahavior is the same.Apparently the 'jenkinsProject' variable is not being initialized for the _org.biouno.unochoice.DynamicReferenceParameter_ during the Jenkins start. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google 

[JIRA] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-07-17 Thread 100a...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Waldek Kozba updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-29476 
 
 
 
  The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 

Change By:
 
 Waldek Kozba 
 
 
 
 
 
 
 
 
 
 I've experienced a strange behavior, when working with the Active Choices Reactive Reference Parameter.The use case was to set the parameter value to the actual Jenkins job name, as a fallback for missing referenced parameter value.The Groovy code:{code: groovy java }import hudson.model.*import jenkins.model.*def job = binding.jenkinsProjectdef artifactName = binding.variables.get("1_ARTIFACT")if (!artifactName) { artifactName = job.name}return ""{code}.. where the '1_ARTIFACT' is the referenced variable.The above works as expected, when one creates a project and saves it in Jenkins UI.It stops working though, after Jenkins restart.After some investigation I've realized that the 'jenkinsProject' variable is missing in the binding after fresh Jenkins start. When one goes then into the job configuration UI and presses the 'Save' button (no changes required), the above code starts working again, because the 'jenkinsProject' variable is injected into the binding.It doesn't matter for the if the Groovy script is embedded in the parameter config or stored and referenced as Scriptler script, the bahavior is the same.Apparently the 'jenkinsProject' variable is not being initialized for the _org.biouno.unochoice.DynamicReferenceParameter_ during the Jenkins start. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the 

[JIRA] [active-choices-plugin] (JENKINS-29476) The 'jenkinsProject' variable is not set in the binding after restarting Jenkins

2015-07-17 Thread 100a...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Waldek Kozba created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-29476 
 
 
 
  The 'jenkinsProject' variable is not set in the binding after restarting Jenkins  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Assignee:
 
 Bruno P. Kinoshita 
 
 
 

Components:
 

 active-choices-plugin 
 
 
 

Created:
 

 17/Jul/15 4:02 PM 
 
 
 

Environment:
 

 Jenkins ver. 1.620 and 1.615;  Active Choices Plugin version 1.1;  Java 1.7.0_79-b14;  OS.version 3.2.0-4-amd64 Debian Wheezy 
 
 
 

Priority:
 
  Major 
 
 
 

Reporter:
 
 Waldek Kozba 
 
 
 
 
 
 
 
 
 
 
I've experienced a strange behavior, when working with the Active Choices Reactive Reference Parameter. The use case was to set the parameter value to the actual Jenkins job name, as a fallback for missing referenced parameter value. The Groovy code: 

 

Unable to find source-code formatter for language: groovy. Available languages are: actionscript, html, java, _javascript_, none, sql, xhtml, xml


import hudson.model.*
import jenkins.model.*

def job = binding.jenkinsProject
def artifactName = binding.variables.get("1_ARTIFACT")
if (!artifactName) {
	artifactName = job.name
}
return "value\" value=\"${artifactName}\" class=\"setting-input\" type=\"tex