Skip to content

Commit 0c5d4e4

Browse files
add slack messages to etl pipeline
1 parent 0c2730a commit 0c5d4e4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

jenkins/etl.Jenkinsfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,12 @@ pipeline {
3939
docker stop $CUR_PROJ-$JOB_NAME-$TMP_SUFFIX || :
4040
'''
4141
}
42+
always {
43+
slackSend(
44+
channel: '#mpi-alerts',
45+
message: "Job *${env.JOB_NAME} [${env.BUILD_NUMBER}]* finished with status: *${currentBuild.currentResult}* in ${currentBuild.durationString}. \nDetails: ${env.BUILD_URL}",
46+
color: currentBuild.currentResult == 'SUCCESS' ? 'good' : (currentBuild.currentResult == 'FAILURE' ? 'danger' : 'warning')
47+
)
48+
}
4249
}
4350
}

0 commit comments

Comments
 (0)