如何在 Jenkins Job DSL 脚本中获取种子作业的名称?

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

我正在使用 Jenkins Job DSL plugin 提供的具有 Process Job DSLs 构建步骤的 Freestyle 项目/作业,即 "seed" 作业。我如何从 Use the provided DSL script 提供的代码中获取种子作业的名称?

我已尝试将答案应用于 this question,但其中 none 有效。

所有构建变量都被注入到 DSL 脚本中,请参阅 Access the Jenkins Environment VariablesJOB_NAME 变量包含种子作业的名称。

println JOB_NAME