Skip to content

Commit

Permalink
Merge openebs#946
Browse files Browse the repository at this point in the history
946: ci: disable slack notification on job status change r=arne-rusek a=arne-rusek

Grafana is monitoring the job now.

Co-authored-by: Arne Rusek <[email protected]>
  • Loading branch information
mayastor-bors and arne-rusek committed Jun 16, 2021
2 parents 7f5d5a1 + bbe19bc commit 06b6056
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,26 +110,6 @@ def lokiUninstall(tag, loki_run_id) {
sh 'kubectl delete -f ./mayastor-e2e/loki/promtail_namespace_e2e.yaml'
}

// Send out a slack message if branch got broken or has recovered
def notifySlackUponStateChange(build) {
def cur = build.getResult()
def prev = getLastNonAbortedBuild(build.getPreviousBuild())?.getResult()
if (cur != prev) {
if (cur == 'SUCCESS') {
slackSend(
channel: '#mayastor-backend',
color: 'normal',
message: "Branch ${env.BRANCH_NAME} has been fixed :beers: (<${env.BUILD_URL}|Open>)"
)
} else if (prev == 'SUCCESS') {
slackSend(
channel: '#mayastor-backend',
color: 'danger',
message: "Branch ${env.BRANCH_NAME} is broken :face_with_raised_eyebrow: (<${env.BUILD_URL}|Open>)"
)
}
}
}
def notifySlackUponE2EFailure(build) {
if (build.getResult() != 'SUCCESS' && env.BRANCH_NAME == 'develop') {
slackSend(
Expand Down Expand Up @@ -598,9 +578,6 @@ pipeline {
]
]
])
if (env.BRANCH_NAME == 'develop') {
notifySlackUponStateChange(currentBuild)
}
} else {
notifySlackUponE2EFailure(currentBuild)
}
Expand Down

0 comments on commit 06b6056

Please sign in to comment.