Reputation: 707
I have a Jenkins build job where I am passing few parameters while triggering the job. I need to use some of those parameters in a Groovy script. How to do that?
My Parameter is BUG_ID and its value is 2010
I am accessing as shown below
print ('BUILD_NO is '+System.getenv('BUG_ID'))
print ('BUILD_NO is ${BUG_ID}')
print ('BUILD_NO is ${env.BUG_ID}')
All returning null
Upvotes: 1
Views: 2813