Verify Xtesting containers via trivy 80/71880/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Mon, 8 Feb 2021 22:01:37 +0000 (23:01 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Mon, 8 Feb 2021 22:02:24 +0000 (23:02 +0100)
Change-Id: I8601f182ab650837bde2ddce1f8b302310cfa25a
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
jjb/functest/xtesting.yaml

index eeef493..07d8697 100644 (file)
             - name: 'xtesting-opnfv-xtesting-mts-{tag}-build'
               <<: *xtesting-jobs
 
+- builder:
+    name: xtesting-trivy
+    builders:
+      - shell: |
+          curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b .
+          if [ "{repo}" = "_" ]; then
+            image={container}:{tag}
+          elif [ "{port}" = "None" ]; then
+            image={repo}/{container}:{tag}
+          else
+            image={repo}:{port}/{container}:{tag}
+          fi
+          ./trivy $image
+
+- job-template:
+    name: 'xtesting-{repo}-{container}-{tag}-trivy'
+    builders:
+      - xtesting-trivy:
+          <<: *xtesting-containers
+
+- project:
+    name: 'xtesting-opnfv-xtesting-trivy'
+    <<: *xtesting-params
+    container: 'xtesting'
+    jobs:
+      - 'xtesting-{repo}-{container}-{tag}-trivy'
+
+- project:
+    name: 'xtesting-opnfv-xtesting-mts-trivy'
+    <<: *xtesting-params
+    container: 'xtesting-mts'
+    jobs:
+      - 'xtesting-{repo}-{container}-{tag}-trivy'
+
 - project:
     name: 'xtesting'
     <<: *xtesting-params
       - last-failure
       - last-duration
     regex: ^xtesting-[a-z-]+-docker$
+
+- view:
+    name: xtesting-trivy
+    view-type: list
+    columns:
+      - status
+      - weather
+      - job
+      - last-success
+      - last-failure
+      - last-duration
+    regex: ^xtesting-[a-z-]+-trivy$