added email on failure
All checks were successful
GiteaTest/JenkinsGoTest/pipeline/head This commit looks good

This commit is contained in:
2021-01-05 02:28:31 +01:00
parent 159d3e4f08
commit 59aebc8f48

View File

@@ -18,10 +18,25 @@ pipeline {
sshPublisher(publishers: [sshPublisherDesc(configName: 'centnas', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/$JOB_NAME', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'HelloWorld-amd64*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)]) sshPublisher(publishers: [sshPublisherDesc(configName: 'centnas', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/$JOB_NAME', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'HelloWorld-amd64*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
// Cleaning WorkSpace // Cleaning WorkSpace
cleanWs() cleanWs()
// send Mail
//Send To person to make commit emailext body: '$DEFAULT_CONTENT', recipientProviders: [culprits()], subject: '$DEFAULT_SUBJECT', to: 'bramm.p11@gmail.com'
//Send To static addres emailext body: '$DEFAULT_CONTENT', subject: '$DEFAULT_SUBJECT', to: 'bramm.p11@gmail.com'
} }
} }
} }
post {
success {
echo 'Build successful'
}
failure {
// Send To person to make commit
//emailext body: '$DEFAULT_CONTENT', recipientProviders: [culprits()], subject: '$DEFAULT_SUBJECT'
// Send To static addres
emailext body: '$DEFAULT_CONTENT', subject: '$DEFAULT_SUBJECT', to: 'bram@bprieshof.nl'
}
unstable {
echo 'Build unstable'
}
changed {
echo 'Pipeline has changed'
}
}
} }