-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
92 lines (84 loc) · 2.91 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env groovy
@Library('kanolib')
import build_deb_pkg
stage ('Build') {
node ('ubuntu_18.04_with_docker') {
docker.image('kanocomputing/mercury-builder').inside('--cap-add SYS_PTRACE') {
checkout scm
parallel(
'Build - Debug': {
sh 'make build-debug'
},
'Build - Release': {
sh 'make build-release'
}
)
}
}
}
stage ('Test') {
node ('ubuntu_18.04_with_docker') {
docker.image('kanocomputing/mercury-builder').inside('--cap-add SYS_PTRACE') {
checkout scm
parallel(
'C++ Tests': {
try {
sh 'make test-library'
} catch (e) {
throw e
} finally {
xunit (
testTimeMargin: '3000',
thresholdMode: 1,
thresholds: [
skipped(failureThreshold: '0'),
failed(failureThreshold: '0')
],
tools: [
CTest(
pattern: 'build/Debug/Testing/**/*.xml',
deleteOutputFiles: true,
failIfNotNew: false,
skipNoTestFiles: true,
stopProcessingIfError: true
)
]
)
publishHTML([
allowMissing: true,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: 'build/Debug/coverage',
reportFiles: 'index.html',
reportName: 'Code Coverage',
reportTitles: ''
])
}
},
'Python 3 Tests': {
// FIXME: Python dependencies not installed
// sh 'make test-python'
},
'Python 2 Tests': {
// FIXME: Python dependencies not installed
// sh 'make test-python2'
}
)
}
}
}
stage ('Upload Package') {
/**
* TODO: Push the build to Conan when pushing to master. Need to resolve
* permissions issues with the Conan server.
*
* node ('ubuntu_18.04_with_docker') {
* docker.image('kanocomputing/mercury-builder').inside() {
* sh 'conan upload --remote dev-team --all --confirm "Mercury"
* }
* }
*/
}
stage ('Package') {
autobuild_repo_pkg 'mercury'
}