Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins' String parameter vs Text parameter

Tags:

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

like image 302
Hilikus Avatar asked Jan 07 '13 19:01

Hilikus


People also ask

What is string parameter Jenkins?

The validating string parameter plugin contributes a new parameter type to Jenkins that supports regular expression validation of the user's entered parameter.

How do you give string parameters in Jenkins?

Click the Add Parameter drop-down list a second time, and choose to create a String parameter. Name this Jenkins build parameter javadoc_location and give it a default value of C:\javadoc. Name your String parameter Javadoc_location.

What are the parameters in Jenkins?

A build parameter allows us to pass data into our Jenkins jobs. Using build parameters, we can pass any data we want: git branch name, secret credentials, hostnames and ports, and so on. Any Jenkins job or pipeline can be parameterized.

How do you parameterize Jenkins pipeline?

Jenkins Pipeline Parameters: After running the pipeline for the first time, Build with Parameters is shown in the pipeline menu. From now on, when you want to build, you should set parameters before that being start. Along with parameter definition, you can also set their default values.


1 Answers

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.

like image 60
Slav Avatar answered Oct 21 '22 23:10

Slav