Re: groovy split() on User ID

2019-07-24 Thread Slide
You aren't actually using any variables in your mail call since you have no $ inside the string. Generally, when using each, I like to specify the iterator variable name (it defaults to 'it'). Approvals.each { id -> mail(to: "${id}@domain.com") } On Wed, Jul 24, 2019, 10:20 krish wrote: >

groovy split() on User ID

2019-07-24 Thread krish
Hello, Anyone tried using the split for sending out the emails for approval to multiple recipients. In My Jenkinsfile i have something like this *Jenkinsfile*: Approvals = $SPACE == 'stage' ? '1234, 4567' : $SPACE == 'prod' ? '8912,3455' Assume these numbers as UserID. *Groovy code:*