Re: Issue with spaces in string parameter

2018-11-13 Thread 'Björn Pedersen' via Jenkins Users


Am Dienstag, 13. November 2018 00:23:02 UTC+1 schrieb Martin d'Anjou:
>
> I doubt that would fix it, I was curious and try it. Jenkins trims, but it 
> does not split the value on spaces.
>
> The problem might be on how you pass the value to your python script. Can 
> you share that?
>
>
Just to show some problematic ways: 

somescript $parms  
 -> here the shell (not jenkins or python) will split the arguments on 
spaces so you need to quote them
somescript "$params"
 -> now it is a single string, possibly with spaces

or use :

 os.environ.get['params'] inside your script to get the full string.

Björn

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1c510222-af7f-4955-a4ff-2b5fdc126f19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with spaces in string parameter

2018-11-12 Thread Martin d'Anjou
I doubt that would fix it, I was curious and try it. Jenkins trims, but it 
does not split the value on spaces.

The problem might be on how you pass the value to your python script. Can 
you share that?

Martin

On Monday, November 12, 2018 at 8:15:55 AM UTC-5, Danny Jacob wrote:
>
> Uncheck ‘trim string’ checkbox in advanced and try. It should work
>
> On Mon, 12 Nov 2018 at 3:56 PM, Raunak Kumar Gupta  > wrote:
>
>> 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
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/0b6b1e2b-3af2-4aa0-a485-573d2c03ec3f%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
> *Best Regards,*
> *Jacob Dany*
> *contact - +65 90224437*
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/acbf5ab9-6595-4a5f-b058-d7b4c0240fbb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with spaces in string parameter

2018-11-12 Thread Danny Jacob
Uncheck ‘trim string’ checkbox in advanced and try. It should work

On Mon, 12 Nov 2018 at 3:56 PM, Raunak Kumar Gupta 
wrote:

> 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
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/0b6b1e2b-3af2-4aa0-a485-573d2c03ec3f%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
*Best Regards,*
*Jacob Dany*
*contact - +65 90224437*

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAD%2BZqMnKHt4_Kc%2BFd4t2Z%3DdceZxMFgCxs8%2BngA9V62BkitG_5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Issue with spaces in string parameter

2018-11-11 Thread Raunak Kumar Gupta
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

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0b6b1e2b-3af2-4aa0-a485-573d2c03ec3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.