The best I could come up with:

try {
  context.build.buildVariables.collect { k, v -> v } + [ 'fixed' ]
} catch (Exception e) { return [ 'fixed' ] }

Seems to trigger the correct axes (in my case, the ones named for the 
parameters' values + one named 'fixed'). Note that the UI seems wrong between 
saving and the first build, showing only 'default'.

---

Note that the plugin is not sandboxed. Anyone who can configure jobs can run 
arbitrary code in the context of your Jenkins.

On 08.07.2013, at 20:23, Noah Gradovitch <noag...@vmware.com> wrote:

> Hi All,
> 
> I am trying to create a matrix job. 
> But while for one axis my values are predefined for the other axis my value 
> depends on 
> a parameter that the job that triggers my job pass.
> I have tried using groovy axis plugin and read this parameter by using:
> def build = Thread.currentThread().executable
> Now I get this error:
> Caught: groovy.lang.MissingPropertyException: No such property: executable 
> for class: java.lang.Threa
> From reading in google
> I guess I'm not in the right context.
> So my question is am I missing something? How can I set axis that depends on 
> a parameter from the job that trigger my job?
> 
> Thanks,
> Noa
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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


Reply via email to