forked from xchem/fragalysis-frontend
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
55 lines (42 loc) · 1.3 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!groovy
// The 'xchem' Fragalysis Frontend Jenkinsfile.
pipeline {
agent { label 'buildah-slave' }
environment {
// Slack channel for all notifications
SLACK_BUILD_CHANNEL = 'dls-builds'
// Slack channel to be used for errors/failures
SLACK_ALERT_CHANNEL = 'dls-alerts'
}
stages {
stage('Inspect') {
steps {
slackSend channel: "#${SLACK_BUILD_CHANNEL}",
message: "${JOB_NAME} build ${BUILD_NUMBER} - starting..."
echo "Inspecting..."
}
}
}
// Post-job actions.
// See https://jenkins.io/doc/book/pipeline/syntax/#post
post {
success {
slackSend channel: "#${SLACK_BUILD_CHANNEL}",
color: 'good',
message: "${JOB_NAME} build ${BUILD_NUMBER} - complete"
}
failure {
slackSend channel: "#${SLACK_BUILD_CHANNEL}",
color: 'danger',
message: "${JOB_NAME} build ${env.BUILD_NUMBER} - failed (${BUILD_URL})"
slackSend channel: "#${SLACK_ALERT_CHANNEL}",
color: 'danger',
message: "${JOB_NAME} build ${BUILD_NUMBER} - failed (${BUILD_URL})"
}
fixed {
slackSend channel: "#${SLACK_ALERT_CHANNEL}",
color: 'good',
message: "${JOB_NAME} build - fixed"
}
}
}