Skip to content

Commit

Permalink
#136 fix groovy compile error with constant
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-dammeier committed Nov 21, 2024
1 parent 6d6dbb7 commit d5b41b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/com/cloudogu/ces/cesbuildlib/Trivy.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ class Trivy implements Serializable {
static final String DEFAULT_TRIVY_VERSION = "0.57.1"
private script
private Docker docker
private String trivyVersion
private String trivyVersion = DEFAULT_TRIVY_VERSION
private String trivyDirectory = ".trivy"

Trivy(script, Docker docker = new Docker(script), String trivyVersion = DEFAULT_TRIVY_VERSION) {
Trivy(script, Docker docker = new Docker(script), String trivyVersion = this.trivyVersion) {
this.script = script
this.docker = docker
this.trivyVersion = trivyVersion
Expand Down Expand Up @@ -35,7 +35,7 @@ class Trivy implements Serializable {
String strategy = TrivyScanStrategy.FAIL
) {
int exitCode
this.docker.image("aquasec/trivy:${trivyVersion}")
docker.image("aquasec/trivy:${trivyVersion}")
.mountJenkinsUser()
.mountDockerSocket()
.inside("-v ${script.env.WORKSPACE}/.trivy/.cache:/root/.cache/") {
Expand Down

0 comments on commit d5b41b1

Please sign in to comment.