2
我無法使用下面的groovy腳本檢索作業名稱。即使我在Execute System Groovy Build Step中運行這個腳本,它也會給我帶來錯誤。 錯誤:在Active Choice反應參數中使用Groovy腳本檢索Jenkins作業名稱
groovy.lang.MissingPropertyException: No such property: jenkinsProject for class: groovy.lang.Binding
----
def jobName = this.binding.jenkinsProject.name
----
我在下面的鏈接,發現它已經有人工作,但不知何故,不是爲我工作。任何人都可以幫忙嗎?
How to get the job name on a groovy dynamic parameter in Jenkins
在系統Groovy腳本生成步驟,我看不出有什麼辦法來引用當前作業。會很高興加入。 – akostadinov