Add failed build action
This commit is contained in:
parent
1a67b16fcd
commit
3b9ba8bfcd
1 changed files with 4 additions and 2 deletions
|
|
@ -129,7 +129,9 @@ def performSuccessfulBuildActions() {
|
|||
def sendemails(emailtolist) {
|
||||
def emailbody = """
|
||||
Failed build: ${JOB_NAME} ${BUILD_DISPLAY_NAME} : ${BUILD_URL}
|
||||
"""
|
||||
|
||||
Console output: ${BUILD_URL}/console
|
||||
"""
|
||||
|
||||
for(emailto in emailtolist) {
|
||||
mail(
|
||||
|
|
@ -137,6 +139,7 @@ def sendemails(emailtolist) {
|
|||
body: emailbody,
|
||||
to: emailto
|
||||
)
|
||||
echo "Send email to: ${emailto}"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -153,7 +156,6 @@ def performFailedBuildActions() {
|
|||
}
|
||||
if (postbuildactions) {
|
||||
def emailtolist = postbuildactions['Email']['To']
|
||||
echo "emailtolist: ${emailtolist}"
|
||||
if (emailtolist) {
|
||||
sendemails(emailtolist)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue