-
Notifications
You must be signed in to change notification settings - Fork 11
/
Jenkinsfile
53 lines (52 loc) · 1.89 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
pipeline {
agent {
docker { image 'maikenp/arc-sca-centos6' }
}
stages {
stage('RATS') {
steps {
sh 'rats --quiet --html -w 3 ./ > rats.html'
publishHTML (
target: [
allowMissing: true,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: '',
reportFiles: 'rats.html',
reportName: 'RATS Report'
])
}
}
stage('FLAWFINDER'){
steps {
sh '/flawfinder-1.31/flawfinder -m 2 --html --dataonly ./ > flawfinder.html 2>&1'
publishHTML (
target: [
allowMissing: true,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: '',
reportFiles: 'flawfinder.html',
reportName: 'FLAWFINDER Report'
])
}
}
stage('CppCheck') {
steps {
sh 'cppcheck --enable=all --inconclusive --xml --xml-version=2 . 2> cppcheck.xml'
sh 'scl enable python27 -- $CP_PROJECT_DIR/cppcheck/htmlreport/cppcheck-htmlreport --file=cppcheck.xml --report-dir=. --source-dir=.'
sh 'ls'
publishCppcheck pattern:'cppcheck.xml'
publishHTML (
target: [
allowMissing: true,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: '',
reportFiles: 'index.html',
reportName: 'CppCheck Report'
])
}
}
}
}