
私のパイプラインは、各ジョブの実行に基づいて動的な受信者リストを生成しています。変数として設定したそのリストを、emailext プラグインの「宛先」セクションで使用しようとしていますが、問題は、変数のコンテンツが mailext 部分を使用しても解決されないことです。
...
stage('Generate recipient List') {
...
recipientList=`sort -u recipientList.txt`
...
}
...
post {
success {
emailext
to: '$recipientList',
from: '[email protected]',
attachmentsPattern: 'Projects2Shelve.txt,jobs2Delete.txt',
subject: "Subject",
body: "Hello, msg Body"
}
}
...
答え1
私は大胆な推測をしますが、シングルクォートをダブルクォートに変更すると問題を解決する