upload test logs
@@ -14,4 +14,13 @@ if [[ "${FLEXCI_BRANCH:-}" != refs/pull/* ]]; then
# Cache will not be uploaded when testing pull-requests.
stages+=(cache_put)
fi
-"$(dirname ${0})/run.sh" "${TARGET}" "${stages[@]}"
+
+"$(dirname ${0})/run.sh" "${TARGET}" "${stages[@]}" > /tmp/log.txt 2>&1 && echo Test succeeded!
+test_retval=$?
+
+gsutil -m -q cp /tmp/log.txt "gs://chainer-artifacts-pfn-public-ci/cupy-ci/${CI_JOB_ID}/"
+echo "Full log is available at: https://storage.googleapis.com/chainer-artifacts-pfn-public-ci/cupy-ci/${CI_JOB_ID}/log.txt"
+echo "Last 100 lines of the log:"
+tail -n 100 /tmp/log.txt
+
+exit ${test_retval}
