RE: Using a Variable in Execute Shell that has a . in it

2019-02-15 Thread Benjamin Primrose
Periods aren’t valid characters for a shell variable name, I can’t set one to 
test this.  Try using “${deploy.dir}” (as in “ls ${deploy.dir}”).  If that 
doesn’t work extracting it from your environment with env | grep | cut is going 
to be the best you’ve got assuming you can’t give it a valid name.

From: jenkinsci-users@googlegroups.com  On 
Behalf Of Eric Fetzer
Sent: Friday, February 8, 2019 3:56 PM
To: Jenkins Users 
Subject: Re: Using a Variable in Execute Shell that has a . in it

That there is some crazy stuff Eric, but it worked, lol:


[OIS-Client] $ /bin/sh -xe /tmp/jenkins1618762877704683861.sh

++ grep 'deploy\.dir='

++ cut -d = -f 2

++ env

+ depdir=/deploy

+ echo 'deploy.dir == /deploy'

deploy.dir == /deploy



I can work that into this and avoid using an ant script or rewriting 15 
different jobs, THANKS!!!

On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
So it works fine to use a variable like build.dir as a parameter in a build 
trigger.  I'm finding, however, that when I add it to a "execute shell" 
command, it gets cut off at the ".".  For example:

Execute Shell:

Command:  ls -l $deploy.dir

This tries to ls -l on .dir because $deploy is unset.  I would very much 
appreciate any help.  I tried escaping the "." but that didn't work.  I tried 
putting quotes around the variable, no help.  Any help would be greatly 
appreciated!

Thanks,
Eric
--
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/aa6cfbc0-2ae0-4b8c-b309-c131ba7cd01f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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/5c6727f5.1c69fb81.c9a50.5998SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-10 Thread Baptiste Mathus
You seem to have found a workaround, and not 100% thiis is what you did,
but if these are environment variables with dots in it, you should remove
them.

It's unsupported by most if not all shells.
For instance, for bash see https://unix.stackexchange.com/a/23660/143243

So, you might have *worked around* it, but it will most likely bite again
:).

Cheers

Le ven. 8 févr. 2019 à 21:55, Eric Fetzer  a écrit :

> That there is some crazy stuff Eric, but it worked, lol:
>
> [OIS-Client] $ /bin/sh -xe /tmp/jenkins1618762877704683861.sh
> ++ grep 'deploy\.dir='
> ++ cut -d = -f 2
> ++ env
> + depdir=/deploy
> + echo 'deploy.dir == /deploy'
> deploy.dir == /deploy
>
>
> I can work that into this and avoid using an ant script or rewriting 15 
> different jobs, THANKS!!!
>
>
> On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>>
>> So it works fine to use a variable like build.dir as a parameter in a
>> build trigger.  I'm finding, however, that when I add it to a "execute
>> shell" command, it gets cut off at the ".".  For example:
>>
>> Execute Shell:
>>
>> Command:  ls -l $deploy.dir
>>
>> This tries to ls -l on .dir because $deploy is unset.  I would very much
>> appreciate any help.  I tried escaping the "." but that didn't work.  I
>> tried putting quotes around the variable, no help.  Any help would be
>> greatly appreciated!
>>
>> Thanks,
>> Eric
>>
> --
> 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/aa6cfbc0-2ae0-4b8c-b309-c131ba7cd01f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CANWgJS7q1Ev71qpBhzQ8PHGHf4Oxi_5B%3D-Qkxb8mi0bhoPEH5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Eric Fetzer
That there is some crazy stuff Eric, but it worked, lol:

[OIS-Client] $ /bin/sh -xe /tmp/jenkins1618762877704683861.sh
++ grep 'deploy\.dir='
++ cut -d = -f 2
++ env
+ depdir=/deploy
+ echo 'deploy.dir == /deploy'
deploy.dir == /deploy


I can work that into this and avoid using an ant script or rewriting 15 
different jobs, THANKS!!!


On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>
> So it works fine to use a variable like build.dir as a parameter in a 
> build trigger.  I'm finding, however, that when I add it to a "execute 
> shell" command, it gets cut off at the ".".  For example:
>
> Execute Shell:
>
> Command:  ls -l $deploy.dir
>
> This tries to ls -l on .dir because $deploy is unset.  I would very much 
> appreciate any help.  I tried escaping the "." but that didn't work.  I 
> tried putting quotes around the variable, no help.  Any help would be 
> greatly appreciated!
>
> Thanks,
> Eric
>

-- 
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/aa6cfbc0-2ae0-4b8c-b309-c131ba7cd01f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Eric Pyle
From Stack Overflow 
:


depdir=`env|grep "deploy\\.dir="|cut -d = -f 2`
echo "deploy.dir == $depdir"

-Eric

On 2/8/2019 3:29 PM, Eric Fetzer wrote:

Sorry, no again:

/tmp/jenkins6366597011192684630.sh: line 2: ${params.'deploy.dir'}: bad 
substitution

On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:

So it works fine to use a variable like build.dir as a parameter
in a build trigger.  I'm finding, however, that when I add it to a
"execute shell" command, it gets cut off at the ".".  For example:

Execute Shell:

Command:  ls -l $deploy.dir

This tries to ls -l on .dir because $deploy is unset.  I would
very much appreciate any help.  I tried escaping the "." but that
didn't work.  I tried putting quotes around the variable, no
help.  Any help would be greatly appreciated!

Thanks,
Eric

--
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/613d8387-e420-4898-b8da-47fbed8aeceb%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
Eric Pyle
Siemens PLM Software
Lebanon, NH
+1 603-277-3060
eric.p...@siemens.com
http://www.siemens.com/plm

--
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/b1d96288-8630-908c-b254-9beb6b18e0a7%40siemens.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Eric Fetzer
Sorry, no again:

/tmp/jenkins6366597011192684630.sh: line 2: ${params.'deploy.dir'}: bad 
substitution


On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>
> So it works fine to use a variable like build.dir as a parameter in a 
> build trigger.  I'm finding, however, that when I add it to a "execute 
> shell" command, it gets cut off at the ".".  For example:
>
> Execute Shell:
>
> Command:  ls -l $deploy.dir
>
> This tries to ls -l on .dir because $deploy is unset.  I would very much 
> appreciate any help.  I tried escaping the "." but that didn't work.  I 
> tried putting quotes around the variable, no help.  Any help would be 
> greatly appreciated!
>
> Thanks,
> Eric
>

-- 
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/613d8387-e420-4898-b8da-47fbed8aeceb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Slide
What about ${params.'deploy.dir'}

On Fri, Feb 8, 2019 at 12:59 PM Eric Fetzer  wrote:

> Second one is:
>
> /tmp/jenkins7135875844305012846.sh: line 2: deploy.dir: syntax error: invalid 
> arithmetic operator (error token is ".dir")
>
>
> On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>>
>> So it works fine to use a variable like build.dir as a parameter in a
>> build trigger.  I'm finding, however, that when I add it to a "execute
>> shell" command, it gets cut off at the ".".  For example:
>>
>> Execute Shell:
>>
>> Command:  ls -l $deploy.dir
>>
>> This tries to ls -l on .dir because $deploy is unset.  I would very much
>> appreciate any help.  I tried escaping the "." but that didn't work.  I
>> tried putting quotes around the variable, no help.  Any help would be
>> greatly appreciated!
>>
>> Thanks,
>> Eric
>>
> --
> 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/e3d5-f48d-40e9-ad39-3d6a6014ff8b%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Website: http://earl-of-code.com

-- 
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/CAPiUgVe-ROJTpbrutUtwR1pMcT0aEkc0qhwaAbOD%3D%3D%2Ba_D96_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Eric Fetzer
Second one is:

/tmp/jenkins7135875844305012846.sh: line 2: deploy.dir: syntax error: invalid 
arithmetic operator (error token is ".dir")


On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>
> So it works fine to use a variable like build.dir as a parameter in a 
> build trigger.  I'm finding, however, that when I add it to a "execute 
> shell" command, it gets cut off at the ".".  For example:
>
> Execute Shell:
>
> Command:  ls -l $deploy.dir
>
> This tries to ls -l on .dir because $deploy is unset.  I would very much 
> appreciate any help.  I tried escaping the "." but that didn't work.  I 
> tried putting quotes around the variable, no help.  Any help would be 
> greatly appreciated!
>
> Thanks,
> Eric
>

-- 
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/e3d5-f48d-40e9-ad39-3d6a6014ff8b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Eric Fetzer
That was the first, let me try the second.

On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>
> So it works fine to use a variable like build.dir as a parameter in a 
> build trigger.  I'm finding, however, that when I add it to a "execute 
> shell" command, it gets cut off at the ".".  For example:
>
> Execute Shell:
>
> Command:  ls -l $deploy.dir
>
> This tries to ls -l on .dir because $deploy is unset.  I would very much 
> appreciate any help.  I tried escaping the "." but that didn't work.  I 
> tried putting quotes around the variable, no help.  Any help would be 
> greatly appreciated!
>
> Thanks,
> Eric
>

-- 
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/a87113cd-5243-4b48-abfa-97e28bf5d921%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Eric Fetzer
Nope:

/tmp/jenkins8691176514212713317.sh: line 2: ${params.get('deploy.dir')}: bad 
substitution



On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>
> So it works fine to use a variable like build.dir as a parameter in a 
> build trigger.  I'm finding, however, that when I add it to a "execute 
> shell" command, it gets cut off at the ".".  For example:
>
> Execute Shell:
>
> Command:  ls -l $deploy.dir
>
> This tries to ls -l on .dir because $deploy is unset.  I would very much 
> appreciate any help.  I tried escaping the "." but that didn't work.  I 
> tried putting quotes around the variable, no help.  Any help would be 
> greatly appreciated!
>
> Thanks,
> Eric
>

-- 
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/d38f3396-22d6-481e-aeae-718ce8101908%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Arnaud bourree
or ${params['deploy.dir']}

Le ven. 8 févr. 2019 à 20:23, Arnaud bourree  a
écrit :

> try: ${params.get('deploy.dir')}
>
> Le ven. 8 févr. 2019 à 20:19, Eric Fetzer  a
> écrit :
>
>> Are you saying that it's not possible to make this work?  The .'s are
>> already in there.  I guess I could write an ant script and just use them
>> inside there because they work fine as parameters to a script...
>>
>> On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>>>
>>> So it works fine to use a variable like build.dir as a parameter in a
>>> build trigger.  I'm finding, however, that when I add it to a "execute
>>> shell" command, it gets cut off at the ".".  For example:
>>>
>>> Execute Shell:
>>>
>>> Command:  ls -l $deploy.dir
>>>
>>> This tries to ls -l on .dir because $deploy is unset.  I would very much
>>> appreciate any help.  I tried escaping the "." but that didn't work.  I
>>> tried putting quotes around the variable, no help.  Any help would be
>>> greatly appreciated!
>>>
>>> Thanks,
>>> Eric
>>>
>> --
>> 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/cf3db8bc-86be-43b2-a316-891976614704%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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/CAESUf_CUAwfNkCZxo2rDkBzwvdP9-9ANmB9k3uSc62YnvJsMNg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Arnaud bourree
try: ${params.get('deploy.dir')}

Le ven. 8 févr. 2019 à 20:19, Eric Fetzer  a écrit :

> Are you saying that it's not possible to make this work?  The .'s are
> already in there.  I guess I could write an ant script and just use them
> inside there because they work fine as parameters to a script...
>
> On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>>
>> So it works fine to use a variable like build.dir as a parameter in a
>> build trigger.  I'm finding, however, that when I add it to a "execute
>> shell" command, it gets cut off at the ".".  For example:
>>
>> Execute Shell:
>>
>> Command:  ls -l $deploy.dir
>>
>> This tries to ls -l on .dir because $deploy is unset.  I would very much
>> appreciate any help.  I tried escaping the "." but that didn't work.  I
>> tried putting quotes around the variable, no help.  Any help would be
>> greatly appreciated!
>>
>> Thanks,
>> Eric
>>
> --
> 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/cf3db8bc-86be-43b2-a316-891976614704%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAESUf_CdJgUuMxVx5F7KREGhv3Gg%2BSwwOxLhiCTVzuh%2B%3DHHJSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Eric Fetzer
Are you saying that it's not possible to make this work?  The .'s are 
already in there.  I guess I could write an ant script and just use them 
inside there because they work fine as parameters to a script...

On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>
> So it works fine to use a variable like build.dir as a parameter in a 
> build trigger.  I'm finding, however, that when I add it to a "execute 
> shell" command, it gets cut off at the ".".  For example:
>
> Execute Shell:
>
> Command:  ls -l $deploy.dir
>
> This tries to ls -l on .dir because $deploy is unset.  I would very much 
> appreciate any help.  I tried escaping the "." but that didn't work.  I 
> tried putting quotes around the variable, no help.  Any help would be 
> greatly appreciated!
>
> Thanks,
> Eric
>

-- 
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/cf3db8bc-86be-43b2-a316-891976614704%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Arnaud bourree
Do not use dot in parameter names, prefer camel case, kebab case or
skeleton case

Le ven. 8 févr. 2019 à 20:09, Eric Fetzer  a écrit :

> deploy.dir is a string parameter at the top of the job:
>
> [image: Capture.JPG]
>
>
>
>
> On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>>
>> So it works fine to use a variable like build.dir as a parameter in a
>> build trigger.  I'm finding, however, that when I add it to a "execute
>> shell" command, it gets cut off at the ".".  For example:
>>
>> Execute Shell:
>>
>> Command:  ls -l $deploy.dir
>>
>> This tries to ls -l on .dir because $deploy is unset.  I would very much
>> appreciate any help.  I tried escaping the "." but that didn't work.  I
>> tried putting quotes around the variable, no help.  Any help would be
>> greatly appreciated!
>>
>> Thanks,
>> Eric
>>
> --
> 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/95ec0a54-537f-4726-9245-bf430147d298%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAESUf_BVcdjNi9Pq9MVUnL3gn1kgbKAUA5zJA5Z_VKw0GarmCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Eric Fetzer
If I renamed it deployDir, just using $deployDir would work, but this is a 
child job where the variable is set in the parent and used in this job as 
well so there would be a lot to change to get that working.  I'd prefer to 
be able to just use deploy.dir.  Thanks!

On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>
> So it works fine to use a variable like build.dir as a parameter in a 
> build trigger.  I'm finding, however, that when I add it to a "execute 
> shell" command, it gets cut off at the ".".  For example:
>
> Execute Shell:
>
> Command:  ls -l $deploy.dir
>
> This tries to ls -l on .dir because $deploy is unset.  I would very much 
> appreciate any help.  I tried escaping the "." but that didn't work.  I 
> tried putting quotes around the variable, no help.  Any help would be 
> greatly appreciated!
>
> Thanks,
> Eric
>

-- 
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/920f1d04-3794-481b-bc8f-2307fffe8801%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Eric Fetzer
deploy.dir is a string parameter at the top of the job:

[image: Capture.JPG]




On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>
> So it works fine to use a variable like build.dir as a parameter in a 
> build trigger.  I'm finding, however, that when I add it to a "execute 
> shell" command, it gets cut off at the ".".  For example:
>
> Execute Shell:
>
> Command:  ls -l $deploy.dir
>
> This tries to ls -l on .dir because $deploy is unset.  I would very much 
> appreciate any help.  I tried escaping the "." but that didn't work.  I 
> tried putting quotes around the variable, no help.  Any help would be 
> greatly appreciated!
>
> Thanks,
> Eric
>

-- 
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/95ec0a54-537f-4726-9245-bf430147d298%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Arnaud bourree
${deploy.dir} means attribute "dir" of object "deploy".
How do you setup deploy object?

Le ven. 8 févr. 2019 à 18:25, Eric Fetzer  a écrit :

> So it works fine to use a variable like build.dir as a parameter in a
> build trigger.  I'm finding, however, that when I add it to a "execute
> shell" command, it gets cut off at the ".".  For example:
>
> Execute Shell:
>
> Command:  ls -l $deploy.dir
>
> This tries to ls -l on .dir because $deploy is unset.  I would very much
> appreciate any help.  I tried escaping the "." but that didn't work.  I
> tried putting quotes around the variable, no help.  Any help would be
> greatly appreciated!
>
> Thanks,
> Eric
>
> --
> 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/bcb946d6-f25e-4bb3-8fc1-469986804a31%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAESUf_BUUgh9%2B-DNKRDzz9bkw37fjAxY3Qvg-GA%3DGWreS%2BPUkQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Eric Fetzer
Here's what I put in:

sh """

ls -l ${deploy.dir}

"""

Here's what I got:

ls -l ${deploy.dir}

: bad substitution




On Friday, February 8, 2019 at 10:25:17 AM UTC-7, Eric Fetzer wrote:
>
> So it works fine to use a variable like build.dir as a parameter in a 
> build trigger.  I'm finding, however, that when I add it to a "execute 
> shell" command, it gets cut off at the ".".  For example:
>
> Execute Shell:
>
> Command:  ls -l $deploy.dir
>
> This tries to ls -l on .dir because $deploy is unset.  I would very much 
> appreciate any help.  I tried escaping the "." but that didn't work.  I 
> tried putting quotes around the variable, no help.  Any help would be 
> greatly appreciated!
>
> Thanks,
> Eric
>

-- 
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/8f336f8d-1780-4381-bce6-82eeec5d68a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Viacheslav Dubrovskyi

Hi Eric

Is it work for you?

sh """

    ls -l ${deploy.dir}

"""

08.02.2019 19:25, Eric Fetzer пишет:
So it works fine to use a variable like build.dir as a parameter in a 
build trigger.  I'm finding, however, that when I add it to a "execute 
shell" command, it gets cut off at the ".".  For example:


Execute Shell:

Command:  ls -l $deploy.dir

This tries to ls -l on .dir because $deploy is unset.  I would very 
much appreciate any help.  I tried escaping the "." but that didn't 
work.  I tried putting quotes around the variable, no help.  Any help 
would be greatly appreciated!


Thanks,
Eric
--
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/bcb946d6-f25e-4bb3-8fc1-469986804a31%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
WBD,
Viacheslav Dubrovskyi

--
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/4f0f6166-c465-046e-a784-53bc636f222a%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


smime.p7s
Description: Криптографическая подпись S/MIME


Using a Variable in Execute Shell that has a . in it

2019-02-08 Thread Eric Fetzer
So it works fine to use a variable like build.dir as a parameter in a build 
trigger.  I'm finding, however, that when I add it to a "execute shell" 
command, it gets cut off at the ".".  For example:

Execute Shell:

Command:  ls -l $deploy.dir

This tries to ls -l on .dir because $deploy is unset.  I would very much 
appreciate any help.  I tried escaping the "." but that didn't work.  I 
tried putting quotes around the variable, no help.  Any help would be 
greatly appreciated!

Thanks,
Eric

-- 
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/bcb946d6-f25e-4bb3-8fc1-469986804a31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.