@@ -5,7 +5,7 @@ class Trivy implements Serializable {
5
5
private script
6
6
private Docker docker
7
7
private String trivyVersion
8
- private String trivyDirectory = " . trivy"
8
+ private String trivyDirectory = " trivy"
9
9
private String trivyReportFilenameWithoutExtension = trivyDirectory+ " /trivyReport"
10
10
11
11
Trivy (script , Docker docker = new Docker (script), String trivyVersion = " 0.57.1" ) {
@@ -30,7 +30,7 @@ class Trivy implements Serializable {
30
30
*/
31
31
boolean scanImage (
32
32
String imageName ,
33
- String trivyReportFilename = " ${ this.script.env.WORKSPACE} /. trivy/trivyReport.json" ,
33
+ String trivyReportFilename = " ${ this.script.env.WORKSPACE} /trivy/trivyReport.json" ,
34
34
String additionalFlags = " " ,
35
35
String severityLevel = TrivySeverityLevel . CRITICAL ,
36
36
String strategy = TrivyScanStrategy . FAIL
@@ -64,7 +64,7 @@ class Trivy implements Serializable {
64
64
*
65
65
* @param format The format of the output file (@see TrivyScanFormat)
66
66
*/
67
- void saveFormattedTrivyReport (String format = TrivyScanFormat . HTML , String trivyReportFilename = " ${ script.env.WORKSPACE} /. trivy/trivyReport.json" ) {
67
+ void saveFormattedTrivyReport (String format = TrivyScanFormat . HTML , String trivyReportFilename = " ${ script.env.WORKSPACE} /trivy/trivyReport.json" ) {
68
68
String formatExtension
69
69
switch (format) {
70
70
case TrivyScanFormat . HTML :
@@ -84,6 +84,6 @@ class Trivy implements Serializable {
84
84
script. sh(script : " trivy convert --format ${ format} --output ${ trivyReportFilenameWithoutExtension} .${ formatExtension} ${ trivyReportFilename} " )
85
85
}
86
86
87
- script. archiveArtifacts artifacts : " ${ trivyReportFilenameWithoutExtension} .${ format } " , allowEmptyArchive : true
87
+ script. archiveArtifacts artifacts : " ${ trivyReportFilenameWithoutExtension} .* " , allowEmptyArchive : true
88
88
}
89
89
}
0 commit comments