feat(container): use .trivyignore file when validation image with trivy
This commit is contained in:
parent
0ac529eac7
commit
fca4ac23d6
|
@ -198,7 +198,7 @@ String validateImageWithTrivy(String imageName, Map options = [:]) {
|
|||
cache(maxCacheSize: cacheMaxSize, defaultBranch: cacheDefaultBranch, caches: [
|
||||
[$class: 'ArbitraryFileCache', path: cacheDirectory, compressionMethod: 'TARGZ']
|
||||
]) {
|
||||
sh("'${trivyBin}' --cache-dir '${cacheDirectory}' image --format template --template '@.trivy-markdown.tpl' -o '${reportFile}' ${trivyArgs} '${imageName}'")
|
||||
sh("'${trivyBin}' --cache-dir '${cacheDirectory}' image --ignorefile .trivyignore.yaml --format template --template '@.trivy-markdown.tpl' -o '${reportFile}' ${trivyArgs} '${imageName}'")
|
||||
}
|
||||
|
||||
return reportFile
|
||||
|
|
Loading…
Reference in New Issue