Browse Source

add snyk test

Benjamin Kornblum 5 months ago
parent
commit
646ed48e2b
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Jenkinsfile

+ 6 - 0
Jenkinsfile

@@ -28,6 +28,12 @@ node {
         }
         }
     }
     }
 
 
+    stage('Snyk Test') {
+        /* This stage runs Snyk to test the image for vulnerabilities.
+         * Make sure you have the Snyk plugin installed in Jenkins. */
+        snykSecurity test: 'hochzeit:latest', failOnError: true, failOnIssues: true, snykInstallation: 'snyk'
+    }
+
     stage('Push image') {
     stage('Push image') {
         /* Finally, we'll push the image with two tags:
         /* Finally, we'll push the image with two tags:
          * First, the incremental build number from Jenkins
          * First, the incremental build number from Jenkins