I am unable to retrieve the Job name using groovy script below. Even when I run this script in the Execute System Groovy Build Step, it gives me the error as. Error:
groovy.lang.MissingPropertyException: No such property: jenkinsProject for class: groovy.lang.Binding
----
def jobName = this.binding.jenkinsProject.name
----
I found in the below link that it has worked for someone, but somehow not working for me. Can anyone help please?
How to get the job name on a groovy dynamic parameter in Jenkins