Merge "Bugfix: wrong results path"
[releng.git] / jjb / dovetail / dovetail-artifacts-upload.yml
index 1a69356..0c8efbe 100644 (file)
@@ -19,6 +19,8 @@
         - 'dovetail'
         - 'functest'
         - 'yardstick'
+        - 'testapi'
+        - 'mongo'
 
 #############################################
 # job template
@@ -43,7 +45,6 @@
     parameters:
         - project-parameter:
             project: '{project}'
-        - gerrit-parameter:
             branch: '{branch}'
         - 'opnfv-build-ubuntu-defaults'
         - dovetail-parameter:
@@ -56,7 +57,8 @@
 
     builders:
         - 'dovetail-builder-artifacts-upload'
-        - 'dovetail-workspace-cleanup'
+        - 'dovetail-upload-artifacts-cache-cleanup'
+        - 'dovetail-images-cleanup'
 
 ####################
 # parameter macros
@@ -95,7 +97,7 @@
             !include-raw: ./dovetail-artifacts-upload.sh
 
 - builder:
-    name: dovetail-workspace-cleanup
+    name: dovetail-upload-artifacts-cache-cleanup
     builders:
         - shell: |
             #!/bin/bash
 
             /bin/rm -rf $CACHE_DIR
 
-            # Remove previous running containers if exist
-            if [[ -n "$(docker ps -a | grep $DOCKER_REPO_NAME)" ]]; then
-                echo "Removing existing $DOCKER_REPO_NAME containers..."
-                docker ps -a | grep $DOCKER_REPO_NAME | awk '{print $1}' | xargs docker rm -f
-                t=60
-                # Wait max 60 sec for containers to be removed
-                while [[ $t -gt 0 ]] && [[ -n "$(docker ps| grep $DOCKER_REPO_NAME)" ]]; do
-                    sleep 1
-                    let t=t-1
-                done
-            fi
-
-            # Remove existing images if exist
-            if [[ -n "$(docker images | grep $DOCKER_REPO_NAME)" ]]; then
-                echo "Docker images to remove:"
-                docker images | head -1 && docker images | grep $DOCKER_REPO_NAME
-                image_tags=($(docker images | grep $DOCKER_REPO_NAME | awk '{print $2}'))
-                for tag in "${image_tags[@]}"; do
-                    if [[ -n "$(docker images|grep $DOCKER_REPO_NAME|grep $tag)" ]]; then
-                        echo "Removing docker image $DOCKER_REPO_NAME:$tag..."
-                        docker rmi -f $DOCKER_REPO_NAME:$tag
-                    fi
-                done
-            fi
+- builder:
+    name: dovetail-images-cleanup
+    builders:
+        - shell:
+            !include-raw: ./dovetail-cleanup.sh