5 export PATH=$PATH:/usr/local/bin/
7 git_sha1="$(git rev-parse HEAD)"
8 res_build_date=$(date -u +"%Y-%m-%d_%H-%M-%S")
10 # Result directory in the jumphost
11 # to be used only with CI
12 dir_result="${HOME}/opnfv/functest/reports"
14 # Clean the results directory
15 # remove json file for rally, export only html
16 # json should have been pushed into the DB
17 rm -f $dir_result/rally/*.json
19 # Several information are required: date and testbed
20 # date is generated by functest so on the artifact, the results shall be under functest/<testbed id>/date/
23 project_artifact=logs/functest/$testbed/$res_build_date
25 # copy folder to artifact
26 if [ -d "$dir_result" ]; then
27 if [ "$(ls -A $dir_result)" ]; then
28 echo "copy result files to artifact $project_artifact"
29 gsutil -m cp -r "$dir_result" gs://artifacts.opnfv.org/"$project_artifact"/
31 # delete local results
32 # should not be useful as the container is about to die...just in case
33 rm -Rf /home/opnfv/functest/results/*
35 echo "Result folder is empty"
38 echo "No result folder found"