forked from Aunsiels/pyformlang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
55 lines (50 loc) · 1.57 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
pipeline {
agent {
dockerfile {
filename 'Dockerfile'
}
}
stages {
stage('Build') {
steps {
echo 'Build Stage'
}
}
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 || true'
echo 'Style Check'
sh 'PYLINTHOME=. pylint pyformlang > pylint.report || true'
sh 'pycodestyle pyformlang > pep8.report || true'
recordIssues(enabledForFailure: true, tool: pyLint(pattern: 'pylint.report'), sourceCodeEncoding: 'UTF-8')
recordIssues(enabledForFailure: true, tool: pep8(pattern: 'pep8.report'), sourceCodeEncoding: 'UTF-8')
}
}
}
}