Re: Is it possible to echo the ${JOB_NAME} excluding the folder/

2017-01-26 Thread Mark Allison
I worked this out with def jobBaseName = "${env.JOB_NAME}".split('/').last() echo "Job Name (excl. path): ${jobBaseName}" Thanks Dirk for the code snippet that helped speed up the solution! On Wednesday, 25 January 2017 10:38:32 UTC, Mark Allison wrote: > > I want to use the ${JOB_NAME} envi

Re: Is it possible to echo the ${JOB_NAME} excluding the folder/

2017-01-25 Thread Dirk Heinrichs
Am 26.01.2017 um 00:46 schrieb Daniel Beck: >> On 25.01.2017, at 11:59, Dirk Heinrichs >> wrote: "Prepare an environment for the run" and enter the following >> snippet under "Evaluated Groovy script" (may need Groovy plugin): > This is envinject plugin. Yes, but I wasn't sure whether the Groov

Re: Is it possible to echo the ${JOB_NAME} excluding the folder/

2017-01-25 Thread Daniel Beck
> On 25.01.2017, at 11:59, Dirk Heinrichs wrote: > > "Prepare an environment for the run" and enter the following snippet under > "Evaluated Groovy script" (may need Groovy plugin): This is envinject plugin. -- You received this message because you are subscribed to the Google Groups "Jenki

Re: Is it possible to echo the ${JOB_NAME} excluding the folder/

2017-01-25 Thread Dirk Heinrichs
Am 25.01.2017 um 12:05 schrieb Mark Allison: > Thanks for the reply. I am using a pipeline job, so can I just put > this in my pipeline script? > > JOB_BASE_NAME: JOB_NAME.split('/').last() Didn't use pipeline scripts, yet. So I don't know what their exact syntax is. Bye... Dirk -- *Dirk

Re: Is it possible to echo the ${JOB_NAME} excluding the folder/

2017-01-25 Thread Mark Allison
Thanks for the reply. I am using a pipeline job, so can I just put this in my pipeline script? JOB_BASE_NAME: JOB_NAME.split('/').last() On Wed, 25 Jan 2017 at 10:59 Dirk Heinrichs wrote: > Am 25.01.2017 um 11:38 schrieb Mark Allison: > > I want to use the ${JOB_NAME} environment variable

Re: Is it possible to echo the ${JOB_NAME} excluding the folder/

2017-01-25 Thread Dirk Heinrichs
Am 25.01.2017 um 11:38 schrieb Mark Allison: > I want to use the ${JOB_NAME} environment variable on my Windows > slave, however my project is in a folder in Jenkins and I want to > exclude the folder. How can I use %JOB_NAME% without the folder name? In the job configuration, check "Prepare an e

Is it possible to echo the ${JOB_NAME} excluding the folder/

2017-01-25 Thread Mark Allison
I want to use the ${JOB_NAME} environment variable on my Windows slave, however my project is in a folder in Jenkins and I want to exclude the folder. How can I use %JOB_NAME% without the folder name? Thanks -- Sent from my phone -- You received this message because you are subscribed to the G