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.
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:
is converted to this variable in the jenkins job
(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.

One answer

permanent link
Spencer Murata (2.3k115971) | answered Aug 26 '13, 11:15 a.m.
 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.


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.

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


Your answer

Register or to post your answer.