Multi-line default values for new "text parameter" in Jenkins 1.418

4,043 views
Skip to first unread message

Neil Halelamien

unread,
Jun 27, 2011, 8:45:22 PM6/27/11
to jenkins...@googlegroups.com
With the new multi-line "Text Parameter" in Jenkins version 1.418, is there any way to provide a multi-line default parameter? It unfortunately seems to only support a single-line default value.

EldadAK

unread,
Jun 30, 2011, 5:27:53 AM6/30/11
to jenkins...@googlegroups.com
Also, when I use this parameter and enter a multi line value, and try to echo it's value, I get the first line only. Is there a special way to use it?

Peter D'mello

unread,
Dec 30, 2011, 4:30:09 PM12/30/11
to jenkins...@googlegroups.com
The text parameter is pretty buggy. One way of putting multiline values is by entering multiline input directly in the config.xml file. After reloading jenkins, if you look at the configure page of the job, you'll notice that the multi-line input is a space separated value, however, if you go to build the job, you'll see that the default value is still multi-line.
However, if you were to save the configuration, the newline disappears and the input is space separated. So, you need to be careful about saving the configuration from the browser if you have entered the multiline input by directly modifying the config.xml file.

The Text Parameter seems to work, however, since the value will be a shell (UNIX/Windows) env variable, proper escape sequence should be used. For example, i had issues when " (quotes) and = (equals) were present in my default input. So, i had to replace all occurences of equals with a different character (e.g. |) and quotes could be escaped with a backslash.

Zhan Cao

unread,
Jan 13, 2014, 11:38:40 AM1/13/14
to jenkins...@googlegroups.com
I found a way to get around it.

Use firebug or other browser developer tools to change the "input" tag into a "textarea" , then the single line textbox becomes a multiple line textarea, cut the original value from "value" attribute, and paste it into the text area.
2014-01-13_113547.png
Reply all
Reply to author
Forward
0 new messages