send email
This commit is contained in:
parent
02347f448b
commit
9d5657bcbe
@ -1,6 +1,7 @@
|
|||||||
node {
|
node {
|
||||||
checkout scm
|
checkout scm
|
||||||
docker.image('s444452/ium:1.3').inside {
|
try {
|
||||||
|
docker.image('s444452/ium:1.3').inside {
|
||||||
stage('Preparation') {
|
stage('Preparation') {
|
||||||
properties([
|
properties([
|
||||||
pipelineTriggers([upstream(threshold: hudson.model.Result.SUCCESS, upstreamProjects: "s444452-create-dataset")]),
|
pipelineTriggers([upstream(threshold: hudson.model.Result.SUCCESS, upstreamProjects: "s444452-create-dataset")]),
|
||||||
@ -26,22 +27,31 @@ node {
|
|||||||
stage('Archive artifacts') {
|
stage('Archive artifacts') {
|
||||||
archiveArtifacts "neural_network_evaluation.txt, model/**"
|
archiveArtifacts "neural_network_evaluation.txt, model/**"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
currentBuild.result = "FAILED"
|
||||||
|
throw e
|
||||||
|
} finally {
|
||||||
|
notifyBuild(currentBuild.result)
|
||||||
}
|
}
|
||||||
post {
|
}
|
||||||
success {
|
def notifyBuild(String buildStatus = 'STARTED') {
|
||||||
emailext body: 'SUCCESS', subject: 's444452-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
buildStatus = buildStatus ?: 'SUCCESS'
|
||||||
}
|
|
||||||
unstable {
|
def subject = "Job: ${env.JOB_NAME}"
|
||||||
emailext body: 'UNSTABLE', subject: 's444452-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
def details = "Build nr: ${env.BUILD_NUMBER}, status: ${buildStatus} \n url: ${env.BUILD_URL}"
|
||||||
}
|
|
||||||
failure {
|
// Override default values based on build status
|
||||||
emailext body: 'FAILURE', subject: 's444452-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
if (buildStatus == 'SUCCESS') {
|
||||||
}
|
color = 'GREEN'
|
||||||
not_built {
|
colorCode = '#00FF00'
|
||||||
emailext body: 'NOT_BUILT', subject: 's444452-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
} else {
|
||||||
}
|
color = 'RED'
|
||||||
aborted {
|
colorCode = '#FF0000'
|
||||||
emailext body: 'ABORTED', subject: 's444452-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
emailext (
|
||||||
|
subject: subject,
|
||||||
|
body: details,
|
||||||
|
// recipientProviders: [[$class: 'DevelopersRecipientProvider']]
|
||||||
|
)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user