我尝试在groovy阶段引用一个列表,如下所示:
stage('Post Build Actions') {
emailext subject: "(Status ${currentBuild.result})", to: (['test1@test.co.uk', 'test2@test.co.uk']), body: '$DEFAULT_CONTENT'
}
但是,这会产生错误:
class hudson.plugins.emailext.EmailExtStep.setTo() expects class java.lang.String but received class java.util.ArrayList
我能不能把它修好?
1条答案
按热度按时间lstz6jyr1#
尝试
也就是说,只需将它们放在一个字符串中,用逗号分隔它们