Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the seed job's name inside a Jenksin Job DSL script?

I'm using a Freestyle project / job with a Process Job DSLs build step as provided by the Jenkins Job DSL plugin, i.e. that is the "seed" job. How can I, from within the code provided by Use the provided DSL script, get the seed job's name?

I've tried to apply the answers to this question but none of them worked.

like image 918
sschuberth Avatar asked Sep 16 '15 15:09

sschuberth


1 Answers

All build variables are injected into the DSL scripts, see Access the Jenkins Environment Variables. The JOB_NAME variable contains the name of the seed job.

println JOB_NAME
like image 56
daspilker Avatar answered Nov 01 '22 01:11

daspilker