Generate and print link of the log files pushed to artifacts 57/20157/4
authorjose.lausuch <jose.lausuch@ericsson.com>
Thu, 1 Sep 2016 14:21:34 +0000 (16:21 +0200)
committerjose.lausuch <jose.lausuch@ericsson.com>
Fri, 2 Sep 2016 10:21:14 +0000 (12:21 +0200)
Also, avoid having twice the name of the branch.

Change-Id: If6be5e742fa961b2a81015fe76f4ba5e52aeb0ab
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
utils/push-test-logs.sh

index 24b3281..5bf9461 100644 (file)
@@ -54,8 +54,14 @@ if [ -d "$dir_result" ]; then
             if [ $? != 0 ]; then
                 echo "Not possible to push results to artifact: gsutil not installed.";
             else
-                echo "copy result files to artifact $project_artifact"
-                gsutil -m cp -r "$dir_result" gs://artifacts.opnfv.org/"$project_artifact"/ >/dev/null 2>&1
+                echo "Uploading logs to artifact $project_artifact"
+                gsutil -m cp -r "$dir_result"/* gs://artifacts.opnfv.org/"$project_artifact"/ >/dev/null 2>&1
+                echo "Logs can be found in http://artifacts.opnfv.org/logs_"$project"_"$testbed".html"
+                cd $dir_result
+                files=($(find . -name \* -print|sed 's/^\.//'|sed '/^\s*$/d'))
+                for f in ${files[@]}; do
+                    echo "http://artifacts.opnfv.org/"$project_artifact"/"$f
+                done
             fi
         fi
     else