6 python $WORKSPACE/utils/test/testapi/update/templates/backup_mongodb.py -o $WORKSPACE/
9 now=$(date +"%m_%d_%Y_%H_%M_%S")
12 file_name="testapi_mongodb_"$now".tar.gz"
15 tar cvfz "$file_name" test_results_collection*
17 rm -rf test_results_collection*
19 artifact_dir="testapibackup"
20 workspace="$WORKSPACE"
23 /usr/local/bin/gsutil &>/dev/null
25 echo "Not possible to push results to artifact: gsutil not installed"
28 echo "Uploading mongodump to artifact $artifact_dir"
29 /usr/local/bin/gsutil cp -r "$workspace"/"$file_name" gs://artifacts.opnfv.org/"$artifact_dir"/
30 echo "MongoDump can be found at http://artifacts.opnfv.org/$artifact_dir.html"