From 398a4417fe313b896860e568bf65bb3813c0df84 Mon Sep 17 00:00:00 2001
From: Cédric Ollivier <cedric.ollivier@orange.com>
Date: Sun, 22 Dec 2019 20:19:06 +0100
Subject: Dump all logs as last Xtesting step
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Change-Id: I6a1353446f34a97307aeda322893006c833018b2
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
---
 jjb/functest/xtesting.yaml | 48 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)

(limited to 'jjb')

diff --git a/jjb/functest/xtesting.yaml b/jjb/functest/xtesting.yaml
index 2cb08727a..9a660ef46 100644
--- a/jjb/functest/xtesting.yaml
+++ b/jjb/functest/xtesting.yaml
@@ -112,11 +112,13 @@
             -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 \
+            -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
+            -e NODE_NAME=$slave \
             -e BUILD_TAG=$BUILD_TAG \
             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
             -v /home/opnfv/xtesting/.boto:/root/.boto \
             -e DEBUG=true \
-            $image run_tests -t {test} -p
+            $image run_tests -t {test} -r -p
 
 - builder:
     name: xtesting-remove-images
@@ -203,6 +205,45 @@
     jobs:
       - 'xtesting-{repo}-{container}-{tag}-{test}-run'
 
+- builder:
+    name: xtesting-zip
+    builders:
+      - shell: |
+          set +x
+          [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/* || true
+          if [ "{repo}" = "_" ]; then
+            image={container}:{tag}
+          elif [ "{port}" = "None" ]; then
+            image={repo}/{container}:{tag}
+          else
+            image={repo}:{port}/{container}:{tag}
+          fi
+          docker run --rm \
+            -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 \
+            -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
+            -e BUILD_TAG=$BUILD_TAG \
+            -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
+            -v /home/opnfv/xtesting/.boto:/root/.boto \
+            $image zip_campaign
+
+- job-template:
+    name: 'xtesting-{tag}-zip'
+    parameters:
+      - xtesting-build_tag:
+          build_tag: ''
+    builders:
+      - xtesting-zip:
+          <<: *xtesting-containers
+
+- project:
+    name: 'xtesting-{tag}-zip'
+    <<: *xtesting-params
+    container: 'xtesting'
+    jobs:
+      - 'xtesting-{tag}-zip'
+
 - job-template:
     name: 'xtesting-{tag}-daily'
     project-type: multijob
@@ -245,6 +286,11 @@
               <<: *xtesting-jobs
             - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
               <<: *xtesting-jobs
+      - multijob:
+          name: dump all campaign data
+          projects:
+            - name: 'xtesting-{tag}-zip'
+              <<: *xtesting-jobs
 
 - job-template:
     name: 'xtesting-{repo}-{container}-{tag}-gate'
-- 
cgit