It's all about the answers!

Ask a question

Jenkins plugin: Properties of the build replace "." with "_"


Gabriel Lopez de Armas (10189) | asked Aug 26 '13, 11:11 a.m.
Hi. 
We are testing changing our build process from jbe to jenkins. One of the issues we are having is that, all the build properties defined in the build definition modify the name of the property, replacing all dots for underscore.

For example, the property:
this.is.an.example=randomValue
is converted to this variable in the jenkins job
this_is_an_example=randomValue
(In the JBE, the name stays the same).

I was wondering why this behavior, since it is not consistent between the two types of build engines.
Thanks.

One answer



permanent link
Spencer Murata (2.3k115971) | answered Aug 26 '13, 11:15 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
 Jenkins does not allow property names with dots to be expanded.  We added the replacement logic so accommodate this.  The JBE has no such limit on property names so that is why the behavior difference.

~Spencer

Comments
Gabriel Lopez de Armas commented Aug 26 '13, 12:33 p.m.

Thanks for the quick reply. 

I have seen that jenkins use all the time underscores, so I suppose it makes sense.

On the other hand, by adding a parameter to the build or using EnvInject plugin I can successfully create variable names with dots. I just created a simple job that just run "printenv" and I can see the variables just fine. 


Spencer Murata commented Aug 26 '13, 3:48 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Yes, there are certainly ways around the limitation in Jenkins, but we assume no other plugins are installed.


~Spencer 

Your answer


Register or to post your answer.