diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2022-04-21 16:57:24 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2022-04-21 16:57:24 +0200 |
commit | fbbbfccd6b83c2a47f9a8ac9b71447d01c5e67a2 (patch) | |
tree | 6b9a09e28e3a7ff74ea4ff062ea69aef858ef6e3 /jjb/functest/xtesting.yaml | |
parent | b3ddb781e5f0e7cf76b101c12da028578034d96c (diff) |
Fix trivy calls
Trivy remove the exit code option.
It also takes into account last XtestingCI updates.
Change-Id: I33c7a0c8651dc1805af1f3f743cd58618b2b7d3c
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'jjb/functest/xtesting.yaml')
-rw-r--r-- | jjb/functest/xtesting.yaml | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/jjb/functest/xtesting.yaml b/jjb/functest/xtesting.yaml index 07b0eb3a9..e4000a45b 100644 --- a/jjb/functest/xtesting.yaml +++ b/jjb/functest/xtesting.yaml @@ -75,6 +75,7 @@ network: '{network}' uid: '{uid}' gid: '{gid}' + published_ports: '{published_ports}' - builder: name: xtesting-pull-containers @@ -105,6 +106,11 @@ for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \ do env="-e $i $env"; done fi + published_ports=; + if [ "{published_ports}" != "None" ]; then + for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \ + do published_ports="-p $i $published_ports"; done + fi [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true if [ "{repo}" = "_" ]; then image={container}:{tag} @@ -120,6 +126,7 @@ --network={network} \ $volumes \ $env \ + $published_ports \ -e S3_ENDPOINT_URL=https://storage.googleapis.com \ -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \ -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \ @@ -207,6 +214,7 @@ <<: *xtesting-params volumes: env: + published_ports: container: 'xtesting' test: - first @@ -246,6 +254,7 @@ <<: *xtesting-params volumes: env: + published_ports: container: 'xtesting-mts' test: - seventh @@ -271,6 +280,11 @@ for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \ do env="-e $i $env"; done fi + published_ports=; + if [ "{published_ports}" != "None" ]; then + for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \ + do published_ports="-p $i $published_ports"; done + fi [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true if [ "{repo}" = "_" ]; then image={container}:{tag} @@ -284,6 +298,7 @@ sudo docker run --rm \ $volumes \ $env \ + $published_ports \ -e S3_ENDPOINT_URL=https://storage.googleapis.com \ -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \ -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \ @@ -308,12 +323,14 @@ env: '{env}' uid: '{uid}' gid: '{gid}' + published_ports: '{published_ports}' - project: name: 'xtesting-{tag}-zip' <<: *xtesting-params volumes: env: + published_ports: container: 'xtesting' uid: 1000 gid: 1000 @@ -830,7 +847,7 @@ else image={repo}:{port}/{container}:{tag} fi - ./trivy --exit-code 1 $image + ./trivy $image - job-template: name: 'xtesting-{repo}-{container}-{tag}-trivy' |