6 echo "Uploading the logs $INSTALLER_TYPE artifact. This could take some time..."
7 echo "--------------------------------------------------------"
10 # create the log directory if it doesn't exist
11 [[ -d $LOG_DIRECTORY ]] || mkdir -p $LOG_DIRECTORY
13 OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
14 COMPASS_LOG_FILENAME="${JOB_NAME}_${BUILD_NUMBER}_${OPNFV_ARTIFACT_VERSION}.log.tar.gz"
17 sudo docker exec compass-tasks /bin/bash /opt/collect-log.sh
18 sudo docker cp compass-tasks:/opt/log.tar.gz ${LOG_DIRECTORY}/${COMPASS_LOG_FILENAME}
20 sudo chown $(whoami):$(whoami) ${LOG_DIRECTORY}/${COMPASS_LOG_FILENAME}
22 gsutil cp "${LOG_DIRECTORY}/${COMPASS_LOG_FILENAME}" \
23 "gs://${GS_URL}/logs/${COMPASS_LOG_FILENAME}" > /dev/null 2>&1
26 echo "--------------------------------------------------------"
28 echo "Artifact is available as http://${GS_URL}/logs/${COMPASS_LOG_FILENAME}"