-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
25 lines (24 loc) · 966 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
* I build this library and alert on test failures
**/
pipeline {
agent any
stages {
stage('Build') {
steps {
sh './gradlew build'
}
}
}
post {
success {
slackSend failOnError: true, color: 'good', teamDomain:'makara', channel: "tarver-build", tokenCredentialId: "tarver-build-slack-token", message: "<${env.JOB_DISPLAY_URL}|*${env.JOB_NAME}*>: succeeded"
}
unstable {
slackSend failOnError: true, color: 'warning', teamDomain:'makara', channel: "tarver-build", tokenCredentialId: "tarver-build-slack-token", message: "<${env.JOB_DISPLAY_URL}|*${env.JOB_NAME}*>: has test failures"
}
failure {
slackSend failOnError: true, color: 'danger', teamDomain:'makara', channel: "tarver-build", tokenCredentialId: "tarver-build-slack-token", message: "<${env.JOB_DISPLAY_URL}|*${env.JOB_NAME}*>: failed"
}
}
}