forked from GOVCERT-LU/eml_parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.jenkinsfile
71 lines (60 loc) · 1.75 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
pipeline {
agent any
options {
ansiColor('xterm')
timestamps()
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('Lint') {
steps {
sh "tox"
}
}
stage('Analysis - pylint') {
steps {
script { analyze_pylint() }
}
}
stage('Analysis - pyflakes') {
steps {
script { analyze_pyflakes() }
}
}
stage('Test results') {
steps {
junit '**/junit-*.xml'
}
}
stage('Coverage') {
steps {
script { analyze_coverage() }
}
}
stage('SonarQube analysis') {
steps {
withSonarQubeEnv('sonar') {
sh "/opt/sonar-scanner/bin/sonar-scanner -Dproject.settings=.sonar-project.properties"
}
}
}
}
}
def analyze_pylint() {
step([$class: 'WarningsPublisher', canComputeNew: false, canResolveRelativePaths: false, defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: [[parserName: 'PyLint', pattern: 'pylint.log']], unHealthy: ''])
}
def analyze_pyflakes() {
step([$class: 'WarningsPublisher', canComputeNew: false, canResolveRelativePaths: false, defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: [[parserName: 'PyFlakes', pattern: 'pyflakes.log']], unHealthy: ''])
}
def analyze_coverage() {
step([$class: 'CoberturaPublisher',
autoUpdateHealth: false,
autoUpdateStability: false,
coberturaReportFile: '**/coverage-*.xml',
failUnhealthy: false,
failUnstable: false,
maxNumberOfBuilds: 0,
onlyStable: false,
sourceEncoding: 'ASCII',
zoomCoverageChart: false])
}