-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
59 lines (58 loc) · 1.99 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
#!/usr/bin/env groovy
pipeline {
environment {
GIT_REPO_NAME = 'habertest_backend'
GIT_CREDS = credentials('av-jenkins-reader')
TEST_TARGET_BRANCH = 'master'
EMAIL_TO = 'orielh@anyvision.co'
KVM_MACHINE_CREDS = credentials("office-il-servers")
HABERTEST_HEARTBEAT_SERVER = '192.168.70.7:7080'
HABERTEST_PROVISIONER = '192.168.70.7:8080'
}
agent {
label 'iloffice'
}
options {
timestamps()
disableConcurrentBuilds()
timeout(time: 4, unit: 'HOURS')
ansiColor('xterm')
buildDiscarder(logRotator(numToKeepStr:'50'))
}
triggers {
issueCommentTrigger('^\\/rebuild')
}
stages {
stage ('Run unittests') {
steps {
sh(script: "make tests")
}
}
} // end of stages
post {
failure {
echo "${currentBuild.result}, exiting now..."
mail to: "${EMAIL_TO}",
bcc: '',
cc: '',
charset: 'UTF-8',
from: '',
mimeType: 'text/html',
replyTo: '',
subject: "${currentBuild.result}: ${env.JOB_NAME} #${env.BUILD_NUMBER}",
body: "<b>Jenkins Job status:</b><br><br>" +
"Project: ${env.JOB_NAME}<br>" +
"Build Number: # ${env.BUILD_NUMBER}<br>" +
"Build Duration: ${currentBuild.durationString}<br>" +
"build url: ${env.BUILD_URL}<br>" +
"Build Log:<br>${currentBuild.rawBuild.getLog(50).join("<br>")}<br><br>" +
"<img class='cartoon' src='https://jenkins.io/images/226px-Jenkins_logo.svg.png' width='42' height='42' align='middle'/><br>"
}
always{
archiveArtifacts artifacts: '**/logs/**/*', fingerprint: true
}
success {
cleanWs()
}
}
} // end of pipeline