我昨天在EC2实例上配置了Jenkins。 Jenkins已成功在收件箱中发送带有构建URL(EC2_PublicDNS / job / build_name / build_number)的构建后通知。我今天在AWS上重新启动了EC2实例,并且在重新启动实例时公共DNS发生了变化。目前,詹金斯(Jenkins)向我发送电子邮件通知,其中包含先前公共DNS的构建URL。如何修复Jenkins使用当前EC2实例的公共DNS发送构建URL?
post {
success {
mail to: 'abc@test.com',
subject: "Success: ${currentBuild.fullDisplayName}",
body: "Pipeline is executed successfully for build ${env.BUILD_URL}"
}
}