forked from ontodev/robot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
43 lines (40 loc) · 1.37 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
pipeline {
agent any
environment {
TARGET_ADMIN_EMAILS = '[email protected]'
}
stages {
stage('Build') {
steps {
sh 'mvn clean package verify'
}
}
stage('Test') {
steps {
script {
if (env.BRANCH_NAME == 'master') {
try {
sh 'git clone https://github.com/obi-ontology/obi.git'
sh 'mkdir -p obi/build'
sh 'cp bin/robot.jar obi/build/robot.jar'
sh 'cd obi && make test'
} finally {
sh 'rm -rf obi'
}
} else {
sh 'java -jar bin/robot.jar help'
}
}
}
}
}
post {
always {
archiveArtifacts artifacts: 'bin/*.jar', fingerprint: true
}
failure {
echo "There has been a failure in the ${env.BRANCH_NAME} pipeline."
mail bcc: '', body: "There has been a pipeline failure in ${env.BRANCH_NAME}. Please see: https://build.obolibrary.io/job/ontodev/job/robot/job/${env.BRANCH_NAME}", cc: '', from: '', replyTo: '', subject: "ROBOT Integration Test FAIL", to: "${TARGET_ADMIN_EMAILS}"
}
}
}