added email on failure
All checks were successful
GiteaTest/JenkinsGoTest/pipeline/head This commit looks good
All checks were successful
GiteaTest/JenkinsGoTest/pipeline/head This commit looks good
This commit is contained in:
21
jenkinsfile
21
jenkinsfile
@@ -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'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user