Pipeline: Get variable value, when its name is stored in another variable

2018-04-29 Thread Shiran
Hi, I want to get a variable's value, and I have its name stored in another variable: I need to get the value of FIRST_FOLDER variable: In bash I would do: bash-4.2$ export FIRST_FOLDER=path/to/folder bash-4.2$ export TEMP=FIRST_FOLDER bash-4.2$ echo ${!FULL_WORD} path/to/workspace *Wanted out

Re: Pipeline: Get variable value, when its name is stored in another variable

2018-04-29 Thread Martin d'Anjou
Shiran, Put #!/bin/bash at the start of the script. By default Jenkins calls sh, which is not the same as bash and sh does not have variable indirection. You can also safely remote the backslash if you use triple single-quotes: node() { script='''#!/bin/bash export FIRST_FOLDER=path/to/folde

Re: Pipeline: Get variable value, when its name is stored in another variable

2018-04-29 Thread Shiran
Thanks! :) it worked good, but.. My original aim is to do it inside "repo forall" command. I tried this: script = """#!/bin/bash export FIRST_FOLDER=path/to/folder export TEMP=FIRST_FOLDER echo \${!TEMP} """ sh "repo forall -c '${script}' " but got the same error... On Sunday, April 29, 2018

"Git Build Data" / Jenkins remembering previous refs when checking out code?

2018-04-29 Thread Andy Coates
Hi, I'm trying to debug an odd issue with a repo checkout that appears to relate to Git Build Data and Jenkins remembering previous "builds". When I look at the Git Build Data, I see a tag and branch along with a ref, and a build number in Jenkins from the activities in that job. The job in t

Re: Getting Environment Variable from ITCDM to pass Jenkins Job as parameter

2018-04-29 Thread Ramanathan Muthaiah
I suppose, many in the list may not know what is ITCDM ? /Ram -- 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