Thanks Robert. I've succeeded today in adding the tool location as an environment variable, but I had to rely on another BuildWrapper. I wasn't able to access the tool location directly from addBuildVariable. It works fine (I was able to replace 18 jobs with a single one !), but I'm not sure it's a really good implementation. In case somebody has 10 minutes to spend on mentoring a Jenkins newbie, the source code is there :-) https://github.com/jakejustus/openedge-jenkins-plugin
Gilles On Fri, Jan 23, 2015 at 12:38 PM, Robert Sandell <[email protected]> wrote: > I don't think you'll need the BuildWrapper in this case since the Axis can > contribute it's own env vars: > > > http://javadoc.jenkins-ci.org/hudson/matrix/Axis.html#addBuildVariable(java.lang.String, > java.util.Map) > > > /B > > On Thu, Jan 22, 2015 at 2:23 PM, Gilles QUERRET <[email protected]> > wrote: > >> Hello, >> >> >> I've a very small Jenkins plugin, two classes overriding ToolInstallation >> and BuildWrapper, the point being to be able to trigger a build on any >> slave and inject an environment variable based on the location of this tool >> on a the slave. This works perfectly, and I now would like to be able to >> use the same behavior with matrix jobs. >> >> I've created a new class extending hudson.matrix.Axis, and was able to >> display a new axis with the right names. However, I'm now struggling how to >> connect the BuildWrapper to the axis, in order to inject the env variable >> based on the value on the axis. Does anybody have any hint on how to >> implement that ? >> >> >> Thanks a lot for your help, >> >> -- >> Gilles QUERRET >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/CAM0LRmBDxHcPTQtjk5jK%3DnE3ga42iDSOXD6X%2BdJ6b9ZfYbYuzg%40mail.gmail.com >> <https://groups.google.com/d/msgid/jenkinsci-dev/CAM0LRmBDxHcPTQtjk5jK%3DnE3ga42iDSOXD6X%2BdJ6b9ZfYbYuzg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Robert Sandell > *Software Engineer* > *CloudBees Inc.* > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS3U5i-4Wz86%2B8Z1PB59pXc-swXudFOT8kOHN65SMWCPOg%40mail.gmail.com > <https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS3U5i-4Wz86%2B8Z1PB59pXc-swXudFOT8kOHN65SMWCPOg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Gilles QUERRET Riverside Software 15d route de Bellevue • 69440 Mornant • France Mob : +33 662.525.532 -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAM0LRmAXQ-WZWni-0QAE4%3D_2-%2BpUgU9%2B77KKRDO1w2VW9FY8mw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
