Skip to content

Commit

Permalink
Merge pull request #10 from linkernetworks/aren/VX-115
Browse files Browse the repository at this point in the history
VX-115: slack notification
  • Loading branch information
Hung-Wei Chiu authored Jun 19, 2018
2 parents 1ef925f + 875ee2d commit 345f29d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ services:
go:
- "1.10.x"

notifications:
slack:
secure: k4ElQjxzBFlHcSHny92pauJNsb6HDvK4BVnmc0wwm9SViQLHj/8yoRlfkUahQ6oAvnl2FaT5DN7gpWDxg5JDsEwvvtJfcqWzv0WIG911fCUlWEZ358DVcs59MOml2A13P6k7fbIxLSQD7yD4LJbnHg61ZFcj2yxy3H3KI3KUOvOrQCNk/ptIKAPahLLmlX4x6nO3bKT9zXOWZKzqSoERMBNuhdEU6BDggaQTxryz8uPoNJe1cb6WYcqqV7CXX/UTB1m0sVoJceAre5ukehp0uv+b0wjYSKm8bviZcFyy2W9eafnYeqyJht7U4Tqlw/l6xDbS3jPmFE7rMyGUDxkz92ZOr72xca7dRBSo6TXpJ4yHl4J/fHeHfMS1Di3OHHp/T4FgPykpbm+2lCCCR79bZ5XjnhDOimO35fzn+c8lHHqEgsdYK0cgmhbRs51A0lPjiWseosQ0tNQ/STd5FL+KDidJ+qHcahVSO0Afwwl7s573GuXDegAKCMJ09TMKSEVvXa8yZFqoo9UG+g+L6a0Mm71pymn+eEhAPXpl8ZzM2qjmTYdaIA/XLHHet49AkNdY7/27o+itXgA/Vh0DAcOHeTO1fJ17sVCP2R72KGRahWLRV5PpeiNnK7Xg2ZXuYaqA//gyjyzz3fVoImGHgjA80gS/xqPy79LxR3K5LR2TJjw=


cache:
directories:
- vendor/github.com
Expand Down
24 changes: 24 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,30 @@ pipeline {
sh "make clean"
}
}
failure {
script {
def message = "<https://jenkins.linkernetworks.co/job/vortex/job/vortex/|vortex> » " +
"<${env.JOB_URL}|${env.BRANCH_NAME}> » " +
"<${env.BUILD_URL}|#${env.BUILD_NUMBER}> failed."

slackSend channel: '#09_jenkins', color: 'danger', message: message

switch (env.BRANCH_NAME) {
case ~/(.+-)?rc(-.+)?/:
case ~/develop/:
case ~/master/:
message += " <!here>"
slackSend channel: '#01_vortex', color: 'danger', message: message
break
}
}
}
fixed {
slackSend channel: '#09_jenkins', color: 'good',
message: "<https://jenkins.linkernetworks.co/job/vortex/job/vortex/|vortex> » " +
"<${env.JOB_URL}|${env.BRANCH_NAME}> » " +
"<${env.BUILD_URL}|#${env.BUILD_NUMBER}> is fixed."
}
}
options {
timestamps()
Expand Down

0 comments on commit 345f29d

Please sign in to comment.