mirror of
https://github.com/vale981/ray
synced 2025-03-08 19:41:38 -05:00

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/
23 lines
No EOL
629 B
Bash
Executable file
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}" |