/
Jenkinsfile
49 lines (44 loc) · 1.41 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
pipeline {
agent {
dockerfile {
filename 'Dockerfile'
}
}
stages {
stage('Test') {
post {
always {
junit(allowEmptyResults: true, testResults: 'test-reports/results.xml')
}
}
steps {
sh 'make test-code-xml || echo 0'
}
}
stage('Static code metrics') {
post {
always {
step([$class: 'CoberturaPublisher',
autoUpdateHealth: false,
autoUpdateStability: false,
coberturaReportFile: 'reports/coverage.xml',
failNoReports: false,
failUnhealthy: false,
failUnstable: false,
maxNumberOfBuilds: 10,
onlyStable: false,
sourceEncoding: 'ASCII',
zoomCoverageChart: false])
}
}
steps {
echo 'Code Coverage'
sh 'make test-coverage-xml || echo 0'
echo 'Style Check'
sh 'make style-check'
recordIssues(enabledForFailure: true, tool: pyLint(pattern: 'pylint.report'), sourceCodeEncoding: 'UTF-8')
recordIssues(enabledForFailure: true, tool: pep8(pattern: 'pep8.report'), sourceCodeEncoding: 'UTF-8')
}
}
}
}