summaryrefslogtreecommitdiffstats
path: root/jjb/apex/apex-fetch-logs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/apex/apex-fetch-logs.sh')
-rwxr-xr-xjjb/apex/apex-fetch-logs.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/jjb/apex/apex-fetch-logs.sh b/jjb/apex/apex-fetch-logs.sh
index f25f456b1..bdb2252b3 100755
--- a/jjb/apex/apex-fetch-logs.sh
+++ b/jjb/apex/apex-fetch-logs.sh
@@ -14,9 +14,10 @@ if sudo opnfv-pyutil --fetch-logs; then
echo "WARNING: Unable to determine log location. Logs will not be uploaded"
exit 0
else
+ sudo chmod 777 ${LOG_LOCATION}
UPLOAD_LOCATION="${GS_URL}/logs/${JOB_NAME}/${BUILD_NUMBER}/"
- gsutil cp -r ${LOG_LOCATION} gs://${UPLOAD_LOCATION} > gsutil.latest_logs.log
- echo "Logs available at https://${UPLOAD_LOCATION}/$(basename $LOG_LOCATION)"
+ gsutil -m cp -r ${LOG_LOCATION} gs://${UPLOAD_LOCATION} > gsutil.latest_logs.log
+ echo -e "Logs available at: \n$(find ${LOG_LOCATION} -type f | sed -n 's#^/tmp/#http://'$UPLOAD_LOCATION'#p')"
fi
else
echo "WARNING: Log retrieval failed. No logs will be uploaded"