Jenkins' String parameter vs Text parameter - jenkins

In a parameterized Jenkins job, what is the difference between String Parameter and Text Parameter? I don't even see a mention of Text Parameter in the documentation

Text parameter was added in Jenkins, but it didn't exist in Hudson (at least in the past)
Main difference is that the Text parameter supports multi-line, while the String one doesn't
Update
Here is the original ticket that requested this functionality
https://issues.jenkins-ci.org/browse/JENKINS-5577
It doesn't look like something that was designed for Jenkins. Rather someone asked for it, and then someone said they have an implementation available. Kohsuke added it to main Jenkins, but from what I've read, it's quite buggy.

Using string parameter can deliver full string value, while multi-line string parameter not if your string value is too long.
Jenkins ver. 2.73.1.

Related

Why does Jenkins pipeline allows duplicate parameters?

In Jenkins pipeline, one can create parameter with same name twice or more(also with same type).
Let's say I've a String Parameter with name Branch and again I can create String Parameter with same name i.e. Branch. It is duplicated still I can save the pipeline.
If you access that parameter in pipeline, while both have been assigned values during trigger, value of latest parameter(i.e second defined parameter) is taken into consideration.
What is reason of Jenkins allows duplicate parameter? Is there any valid reason/use case for this? Or any technical challenges? Or known bug open?
NOTE Jenkins version I'm using is 2.205

How to replace back slash with forward slash in Jenkins build while using validating string parameter or string parameter

1.How to replace back slash with forward slash in Jenkins on UI :- SVN_EAR_PATH (String parameter)
You cannot change a parameter's value in a freestyle job. When you use git you can use the Git parameter plugin to present the user with all the available tags, but I'm not aware of any Subversion alternative unfortunately.
I think your best effort in this case would be to write a pipeline job and then you will have control over the parameter's value (you could write SVN_EAR_PATH.replace('\\', '/'))

Space separated string parameter in Jenkins String Parameter

I have a string parameter in jenkins called 'Keywords'.
I set the value of Keywords = "Google,Microsoft,Uber Go".
But jenkins string parameter takes only till "Google,Microsoft,Uber" and truncates "Go" automatically.
Due to this my code runs incorrectly.
Can anyone help in handling this auto-truncate issue in jenkins string parameter?
This string parameter is used in my python code where I split the Keywords on comma(,) and use the 3 generated words for operation in my code. But jenkins is truncating "Go" automatically due to which incorrect word is processed by my code.
Found the solution for this.
While calling the string parameter variable "Keywords" put in Double quotes. Shell script command to be put in Jenkins :
python script.py "${Keywords}"

Jenkins - Textarea parameter plugin set default value from property file?

I'm trying to find jenkins parameter plugins to do;
Editible textbox (multiline)
Set default text from property file (something like groovy script)
Can you please suggest any plugins?
I tried Active chioce parameter plugin, Extended choice parameter plugin. But those are only provide choice option not textarea.
And Dynamic parameter plugin also seems not support multi-line.
Exists a way in jenkis jobs configuration to pass text parameter to execute a job. Adding Text Parameter, you can define a simple text multiline parameter, where users can enter a text value, which you can use during a build, either as an environment variable, or through variable substitution in some other parts of the configuration.
To define parameters for your job select "This build is parameterized", then using the drop-down button to add as many text parameters or other type as you need.
more info look at
Parameterized Build

How to read Jenkins Parameters?

I am trying to Read Parmeters in jenkins job. I have set String Parameter for Job as follows.
but when I am tring to read this parameter in windows batch command as
it wont read it's value but simply return variable name only as follows
I have also installed parameterized trigger plugin.
Is there any additional plugin I need to install?
Kindly suggest
In Windows, it's %NODENUMBER% (or when using delayed expansion: !NODENUMBER!)
In *nix, it's $NODENUMBER or ${NODENUMBER} (curly brackets are only required when there is ambiguity with adjacent words, but are a good habit anyways)

Resources