forked from zeromq/zyre
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
68 lines (63 loc) · 2.24 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
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
zyre - an open-source framework for proximity-based P2P apps
Copyright (c) the Contributors as noted in the AUTHORS file.
This file is part of Zyre, an open-source framework for proximity-based
peer-to-peer applications -- See http://zyre.org.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
pipeline {
agent any
triggers {
pollSCM 'H/5 * * * *'
}
stages {
stage ('compile') {
steps {
sh './autogen.sh'
sh './configure'
sh 'make'
}
}
stage ('check') {
steps {
timeout (time: 5, unit: MINUTES) {
sh 'make check'
}
}
}
stage ('memcheck') {
steps {
timeout (time: 5, unit: MINUTES) {
sh 'make memcheck'
}
}
}
stage ('distcheck') {
steps {
timeout (time: 10, unit: MINUTES) {
sh 'make distcheck'
}
}
}
}
post {
success {
script {
if (currentBuild.getPreviousBuild()?.result != 'SUCCESS') {
// Uncomment desired notification
//slackSend (color: "#008800", message: "Build ${env.JOB_NAME} is back to normal.")
//emailext (to: "qa@example.com", subject: "Build ${env.JOB_NAME} is back to normal.", body: "Build ${env.JOB_NAME} is back to normal.")
}
}
}
failure {
// Uncomment desired notification
// Section must not be empty, you can delete the sleep once you set notification
sleep 1
//slackSend (color: "#AA0000", message: "Build ${env.BUILD_NUMBER} of ${env.JOB_NAME} ${currentBuild.result} (<${env.BUILD_URL}|Open>)")
//emailext (to: "qa@example.com", subject: "Build ${env.JOB_NAME} failed!", body: "Build ${env.BUILD_NUMBER} of ${env.JOB_NAME} ${currentBuild.result}\nSee ${env.BUILD_URL}")
}
}
}