sschuberth
sschuberth

Reputation: 29821

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.

Upvotes: 5

Views: 8728

Answers (1)

daspilker
daspilker

Reputation: 8194

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

Upvotes: 12

Related Questions