Revert "Switch to lf-build2"
[releng.git] / jjb / functest / xtesting.yaml
index 451b870..f9c39ab 100644 (file)
           else
             build_arg="--build-arg {ref_arg}={ref}"
           fi
-          cd {path};;
+          cd {path}
           sudo docker build $build_arg \
             --pull=false --no-cache --force-rm=true \
             -t $image .
             - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
               <<: *xtesting-jobs
 
+- builder:
+    name: xtesting-push-containers
+    builders:
+      - shell: |
+          set +x
+          if [ "{repo}" = "_" ]; then
+            image={container}:{tag}
+          elif [ "{port}" = "None" ]; then
+            image={repo}/{container}:{tag}
+          else
+            image={repo}:{port}/{container}:{tag}
+          fi
+          sudo docker push $image
+
 - trigger:
     name: xtesting-commit
     triggers:
       - pollscm:
           cron: "*/30 * * * *"
+
 - job-template:
     name: 'xtesting-{repo}-{container}-{tag}-build'
     parameters:
       - xtesting-build-containers:
           <<: *xtesting-build-containers
           ref: '{branch}'
+      - xtesting-push-containers:
+          <<: *xtesting-build-containers
+          ref: '{branch}'
 
 - project:
     name: xtesting-opnfv-xtesting-{tag}-build
     container: 'xtesting'
     jobs:
       - 'xtesting-{repo}-{container}-{tag}-trivy'
-
 - project:
     name: 'xtesting-opnfv-xtesting-mts-trivy'
     <<: *xtesting-params