-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreporters.jenkinsfile
54 lines (48 loc) · 1.27 KB
/
reporters.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("base")
pipeline {
agent {
kubernetes {
defaultContainer 'jnlp'
yamlFile '.jenkins/ruby-reporter.yaml'
}
}
options {
timeout(time: 15, unit: 'MINUTES')
timestamps()
}
stages {
stage('Run reports') {
parallel {
stage('Run code reports') {
steps {
container('reporter') {
sh "ruby scripts/cyclomatic_complexity_report.rb > cyclomatic_complexity.json"
archiveArtifacts artifacts: "cyclomatic_complexity.json"
sh "ruby scripts/abc_report.rb > abc_report.json"
archiveArtifacts artifacts: "abc_report.json"
}
}
}
stage('Run brakeman report') {
post {
always {
archiveArtifacts artifacts: "brakeman_report.html"
}
}
steps {
container('reporter') {
withStatus(
context: "Brakeman security analysis",
description: "Running static analysis tool to check security",
) {
sh "apk add make g++"
sh "gem install sassc brakeman"
sh "brakeman -o brakeman_report.html"
}
}
}
}
}
}
}
}