diff --git a/Jenkinsfile b/Jenkinsfile index a9fd7bb..0483aee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -124,10 +124,12 @@ print(' Vault se registry creds mil gaye (user=%s)' % d['username']) sh ''' # GATE hai, report nahi: HIGH/CRITICAL mila to build yahin fail hogi. # Jo CVE business ne accept kiye hain wo .trivyignore me hain. + # DooD: docker daemon host ka hai, isliye workspace ka host path chahiye. + HOST_WS=$(echo "$PWD" | sed "s|^${JENKINS_HOME_CONTAINER}|${JENKINS_HOME_HOST}|") docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ -v trivy-cache:/root/.cache/ \ - -v "$PWD/.trivyignore:/.trivyignore:ro" \ + -v "$HOST_WS/.trivyignore":/.trivyignore:ro \ aquasec/trivy:0.58.1 image \ --severity ${TRIVY_SEVERITY} \ --ignore-unfixed \