Fix trivy calls
[releng.git] / jjb / functest / functest-kubernetes-pi.yaml
index 21c298f..9dc8dcb 100644 (file)
@@ -89,6 +89,7 @@
     network: '{network}'
     uid: '{uid}'
     gid: '{gid}'
+    published_ports: '{published_ports}'
 
 - builder:
     name: functest-kubernetes-pi-pull-containers
             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" ] && rm -rf $WORKSPACE/results || true
           if [ "{repo}" = "_" ]; then
             image={container}:{tag}
             --network={network} \
             $volumes \
             $env \
+            $published_ports \
             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
             -e S3_DST_URL=s3://artifacts.opnfv.org/functest-kubernetes/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest-kubernetes/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
     env:
       - DEPLOY_SCENARIO=$DEPLOY_SCENARIO
       - E2E_TEST_OPTS=$E2E_TEST_OPTS
+    published_ports:
     container: 'functest-kubernetes-healthcheck'
     test:
       - k8s_quick
     env:
       - DEPLOY_SCENARIO=$DEPLOY_SCENARIO
       - E2E_TEST_OPTS=$E2E_TEST_OPTS
+    published_ports:
     container: 'functest-kubernetes-smoke'
     test:
       - xrally_kubernetes
     env:
       - DEPLOY_SCENARIO=$DEPLOY_SCENARIO
       - E2E_TEST_OPTS=$E2E_TEST_OPTS
+    published_ports:
     container: 'functest-kubernetes-security'
     test:
       - kube_hunter
     env:
       - DEPLOY_SCENARIO=$DEPLOY_SCENARIO
       - E2E_TEST_OPTS=$E2E_TEST_OPTS
+    published_ports:
     container: 'functest-kubernetes-benchmarking'
     test:
       - xrally_kubernetes_full
     env:
       - DEPLOY_SCENARIO=$DEPLOY_SCENARIO
       - E2E_TEST_OPTS=$E2E_TEST_OPTS
+    published_ports:
     container: 'functest-kubernetes-cnf'
     test:
       - k8s_vims
             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" ] && rm -rf $WORKSPACE/results || true
           if [ "{repo}" = "_" ]; then
             image={container}:{tag}
           docker run --rm \
             $volumes \
             $env \
+            $published_ports \
             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
             -e S3_DST_URL=s3://artifacts.opnfv.org/functest-kubernetes \
             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest-kubernetes \
           env: '{env}'
           uid: '{uid}'
           gid: '{gid}'
+          published_ports: '{published_ports}'
 
 - project:
     name: 'functest-kubernetes-pi-{tag}-zip'
     env:
       - DEPLOY_SCENARIO=$DEPLOY_SCENARIO
       - E2E_TEST_OPTS=$E2E_TEST_OPTS
+    published_ports:
     container: 'functest-kubernetes-healthcheck'
     uid: 1000
     gid: 1000