ToolInstallation, BuildWrapper and Matrix project

17 views
Skip to first unread message

Gilles QUERRET

unread,
Jan 22, 2015, 8:23:10 AM1/22/15
to jenkin...@googlegroups.com
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

Robert Sandell

unread,
Jan 23, 2015, 6:38:40 AM1/23/15
to jenkin...@googlegroups.com
I don't think you'll need the BuildWrapper in this case since the Axis can contribute it's own env vars:



/B

--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAM0LRmBDxHcPTQtjk5jK%3DnE3ga42iDSOXD6X%2BdJ6b9ZfYbYuzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees Inc.

Gilles QUERRET

unread,
Jan 23, 2015, 12:16:59 PM1/23/15
to jenkin...@googlegroups.com
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



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
Reply all
Reply to author
Forward
0 new messages