forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload Travis in after_script phase (ray-project#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/
- Loading branch information
Showing
3 changed files
with
27 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/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}" |