Groovy script success via script console but fails as a job

2018-04-19 Thread Sunshine
I got this working. My bad forgot to import the necessary packages. Any idea on how can't I send mails to the owner of the build in the above scenarios of stock jobs in que. I couldn't find any owner option in the /yourhost/queue/API/xml -- You received this message because you are subscribed

Groovy script success via script console but fails as a job

2018-04-19 Thread Sunshine
Hi all , I tried writing a groovy script to list builds in queues assigned to offline slaves and it gives me list when I execute via script console but not via a Jenkins job. I'm just a beginner in groovy but tried this below code which works fine in the script console but fails with below err