Browse Source

add snyk test

Benjamin Kornblum 5 tháng trước cách đây
mục cha
commit
646ed48e2b
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  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') {
         /* Finally, we'll push the image with two tags:
          * First, the incremental build number from Jenkins