Eldad Assis
Eldad Assis

Reputation: 11045

Jenkins text parameter rebuild

I'm using the text parameter to get multi line parameters, and write them to file. If I use the rebuild, the text parameter is loaded as a single line string (where newline is removed).

Does anyone have an idea on how to fix this? I guess the rebuild plugin is the problem...

Upvotes: 2

Views: 2709

Answers (2)

haroon
haroon

Reputation: 117

I have just enhanced the plugin to add TextParameterValue.jelly That works fine, since text and textarea are not that different except new lines just use StringParameterValue.jelly as template and use <f:textarea name="value" value="${it.value}" /> instead of <f:textbox name="value" value="${it.value}" />

Upvotes: 1

malenkiy_scot
malenkiy_scot

Reputation: 16615

The multi-line text parameter seems to be rather buggy. One workaround you may consider is to substitute newlines with some custom escape system and then convert the escape sequences back to newlines inside your build.

A more advanced solution would be to modify the plugin itself to convert the escape sequences into newlines and use that modified plugin in your Jenkins. I've done that sort of thing for Claim Plugin to display failed matrix jobs which it did not do on its own. If you decide to take this route I can walk you through the main steps.

Upvotes: 3

Related Questions