Need some help dereferencing parameters in a buildstep-plugin.

23 views
Skip to first unread message

Dennis Jacobs

unread,
Dec 15, 2014, 10:23:24 AM12/15/14
to jenkin...@googlegroups.com, dennis...@technicolor.com
Hi Guys,

I'm in bit of a jam.
I've written a plugin which takes in a string/xml-struct which contains variables. Like the following.
<sign><board>${BOARDNAME}</board><version>${VERSIONHEAD}</version><full_version>${FULLVERSION}</full_version></sign>

These variables are setup by the parameterized plugin, i've tested this by creating a shell script build-step which calls `echo $BOARDNAME`
And this works, the variables show the actual values!
However if I pass this string to my plugin, it seems that the variables aren't dereferenced.
I'm getting the same string as the one above, while i expected a string in the format like this.
<sign><board>board_name</board><version>11.11.1</version><full_version>11.11.1-00100</full_version></sign>

So my question is how can I dereference these variables properly, without losing the generic-ness of the plugin.
Since i want the plugin to remain generic, in the sense that others can use other variables for their projects depending their needs.

Am i missing some vital part of the jenkins-framework, which is able to do this?
Or am i one of the first who could use/need this functionality?

With kind regards,
Jacobs Dennis.


Dennis Jacobs

unread,
Jan 2, 2015, 8:48:46 AM1/2/15
to jenkin...@googlegroups.com, dennis...@technicolor.com
It seems that i've taken a wrong approach.
Instead of using environment variables, i could use the method  "getBuildVariables()" from the abstractbuild-class.
After implementing this, i'm able to use the variables defined in the parameterized builds section.
Reply all
Reply to author
Forward
0 new messages