-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
54 lines (53 loc) · 1.23 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
pipeline {
agent any
triggers {
cron('H 4 * * *')
pollSCM('H/2 * * * *')
}
stages {
stage('Tooling') {
steps {
sh 'ponyc --version'
}
}
stage('Build') {
steps {
sh 'ponyc -b pony-graphs .'
archiveArtifacts artifacts: 'pony-graphs', fingerprint: true
}
}
stage('Test') {
steps {
sh './pony-graphs'
}
}
}
/* set up notifications */
post {
always {
echo 'One way or another, I have finished'
/* deleteDir() */ /* clean up our workspace */
}
success {
echo 'I succeeeded!'
}
unstable {
echo 'I am unstable :/'
mail to: "${env.PONY_GRAPHS_NOTIFICATIONS_EMAIL}",
subject: "Pipeline unstable: ${currentBuild.fullDisplayName}",
body: "The build is unstable: ${env.BUILD_URL}"
}
failure {
echo 'I failed :('
mail to: "${env.PONY_GRAPHS_NOTIFICATIONS_EMAIL}",
subject: "Pipeline failed: ${currentBuild.fullDisplayName}",
body: "The build has failed: ${env.BUILD_URL}"
}
changed {
echo 'Things were different before...'
mail to: "${env.PONY_GRAPHS_NOTIFICATIONS_EMAIL}",
subject: "Pipeline status changed: ${currentBuild.fullDisplayName} now ${currentBuild.result}",
body: "The status of the build has changed: ${env.BUILD_URL}"
}
}
}