From 94af9f4a754a396ad7b3c3ecfd2c01ccceb226a8 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Mon, 8 Feb 2021 23:01:37 +0100 Subject: Verify Xtesting containers via trivy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8601f182ab650837bde2ddce1f8b302310cfa25a Signed-off-by: Cédric Ollivier --- jjb/functest/xtesting.yaml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/jjb/functest/xtesting.yaml b/jjb/functest/xtesting.yaml index eeef4930a..07d86971b 100644 --- a/jjb/functest/xtesting.yaml +++ b/jjb/functest/xtesting.yaml @@ -624,6 +624,40 @@ - 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 @@ -679,3 +713,15 @@ - 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$ -- cgit 1.2.3-korg