-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
54 lines (51 loc) · 1.94 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
@Library(['github.com/indigo-dc/jenkins-pipeline-library@release/2.1.1']) _
def projectConfig
pipeline {
agent any
stages {
stage('Application testing') {
steps {
script {
projectConfig = pipelineConfig()
buildStages(projectConfig)
}
}
}
}
post {
// publish results and clean-up
always {
script {
if (fileExists("flake8.log")) {
// file locations are defined in tox.ini
// publish results of the style analysis
recordIssues(tools: [flake8(pattern: 'flake8.log',
name: 'PEP8 report',
id: "flake8_pylint")])
}
if (fileExists("htmlcov/index.html")) {
// publish results of the coverage test
publishHTML([allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: "htmlcov",
reportFiles: 'index.html',
reportName: 'Coverage report',
reportTitles: ''])
}
if (fileExists("bandit/index.html")) {
// publish results of the security check
publishHTML([allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: "bandit",
reportFiles: 'index.html',
reportName: 'Bandit report',
reportTitles: ''])
}
}
// Clean after build
cleanWs()
}
}
}