jenkins: add mattermost notifications
This commit is contained in:
parent
89e8c1dc67
commit
d065e151b6
1 changed files with 18 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
with builtins;
|
||||
|
||||
# https://jenkinsci.github.io/job-dsl-plugin/
|
||||
|
||||
{
|
||||
# source container url and credentialsId
|
||||
job = name:
|
||||
|
@ -50,6 +52,14 @@ with builtins;
|
|||
in ''
|
||||
pipeline {
|
||||
agent any
|
||||
post {
|
||||
failure {
|
||||
mattermostSend channel: 'notification', color: '#FF0000', message: "Failed to build : [''${env.JOB_NAME}-''${env.BUILD_NUMBER}](''${env.BUILD_URL})"
|
||||
}
|
||||
success {
|
||||
mattermostSend channel: 'jenkins', color: '#00FF00', message: "Successfully build : [''${env.JOB_NAME}-''${env.BUILD_NUMBER}](''${env.JOB_URL})"
|
||||
}
|
||||
}
|
||||
stages{
|
||||
stage('Pull') {
|
||||
steps {
|
||||
|
@ -89,6 +99,14 @@ with builtins;
|
|||
dsl = ''
|
||||
pipeline {
|
||||
agent any
|
||||
post {
|
||||
failure {
|
||||
mattermostSend channel: 'notification', color: '#FF0000', message: "Failed to build : [''${env.JOB_NAME}-''${env.BUILD_NUMBER}](''${env.BUILD_URL})"
|
||||
}
|
||||
success {
|
||||
mattermostSend channel: 'jenkins', color: '#00FF00', message: "Successfully build : [''${env.JOB_NAME}-''${env.BUILD_NUMBER}](''${env.JOB_URL})"
|
||||
}
|
||||
}
|
||||
stages{
|
||||
stage('Pull') {
|
||||
steps {
|
||||
|
|
Loading…
Reference in a new issue