Skip to content

Commit df47765

Browse files
committed
Migrate to Jenkins for CI.
1 parent a348590 commit df47765

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

Jenkinsfile

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
pipeline {
2+
agent none
3+
4+
triggers {
5+
pollSCM 'H/10 * * * *'
6+
}
7+
8+
options {
9+
disableConcurrentBuilds()
10+
buildDiscarder(logRotator(numToKeepStr: '14'))
11+
}
12+
13+
stages {
14+
stage("test: baseline (jdk8)") {
15+
agent {
16+
docker {
17+
image 'adoptopenjdk/openjdk8:latest'
18+
args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
19+
}
20+
}
21+
options { timeout(time: 30, unit: 'MINUTES') }
22+
steps {
23+
sh 'test/run.sh'
24+
}
25+
}
26+
27+
}
28+
29+
post {
30+
changed {
31+
script {
32+
slackSend(
33+
color: (currentBuild.currentResult == 'SUCCESS') ? 'good' : 'danger',
34+
channel: '#sagan-content',
35+
message: "${currentBuild.fullDisplayName} - `${currentBuild.currentResult}`\n${env.BUILD_URL}")
36+
emailext(
37+
subject: "[${currentBuild.fullDisplayName}] ${currentBuild.currentResult}",
38+
mimeType: 'text/html',
39+
recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']],
40+
body: "<a href=\"${env.BUILD_URL}\">${currentBuild.fullDisplayName} is reported as ${currentBuild.currentResult}</a>")
41+
}
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)