ray/ci/travis/upload_build_info.sh
Simon Mo 5b4a10368f
Upload Travis in after_script phase (#10046)
The deploy phase is skipped when script/tests fails. This prevent us
from uploading failed result to S3.

This PR change it to after_script phase and the secret is injected
via Travis Env Var.

https://docs.travis-ci.com/user/job-lifecycle/
2020-08-11 11:46:00 -07:00

23 lines
No EOL
629 B
Bash
Executable file

#!/usr/bin/env bash
# Cause the script to exit if a single command fails.
set -e
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
RAY_DIR=$(cd "${ROOT_DIR}/../../"; pwd)
cd "${RAY_DIR}"
mkdir -p /tmp/bazel_event_logs
./ci/travis/get_build_info.py > /tmp/bazel_event_logs/metadata.json
pip install -q awscli
export AWS_ACCESS_KEY_ID=AKIAQQPDA73RF7PSLH5N
export AWS_SECRET_ACCESS_KEY=${BAZEL_LOG_BUCKET_ACCESS_KEY}
export AWS_DEFAULT_REGION=us-west-2
DST="s3://ray-travis-log/bazel_events/$TRAVIS_BRANCH/$TRAVIS_COMMIT/$TRAVIS_JOB_ID"
echo "Uploading log to ${DST}"
aws s3 cp --recursive /tmp/bazel_event_logs "${DST}"