From 4697f8af3ca3adbea1020c6c74a20676e9b03a1f Mon Sep 17 00:00:00 2001 From: Simon Mo Date: Fri, 4 Jun 2021 00:48:12 -0700 Subject: [PATCH] [Buildkite] Wheels and Docker fixup (#16241) --- .buildkite/copy_files.py | 4 ++-- .buildkite/pipeline.yml | 6 ++++-- ci/travis/build-docker-images.py | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.buildkite/copy_files.py b/.buildkite/copy_files.py index 62d18c0a1..f41780d7d 100644 --- a/.buildkite/copy_files.py +++ b/.buildkite/copy_files.py @@ -79,9 +79,9 @@ def upload_paths(paths, resp, destination): for path in paths: fn = os.path.split(path)[-1] of["key"] = { - "wheels": f"latest/{sha}/{fn}", + "wheels": f"latest/{fn}", "branch_wheels": f"{branch}/{sha}/{fn}", - "jars": f"jars/latest/{sha}/{fn}", + "jars": f"jars/latest/{fn}", "branch_jars": f"jars/{branch}/{sha}/{fn}", "logs": f"bazel_events/{branch}/{sha}/{bk_job_id}/{fn}" }[destination] diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 710725efe..e5a7486d0 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -13,10 +13,12 @@ # We don't want to push on PRs, in fact, the copy_files will fail because unauthenticated. - if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi - pip install -q docker aws_requests_auth boto3 - - python .buildkite/copy_files.py --destination wheels --path ./.whl + # Upload to branch directory. - python .buildkite/copy_files.py --destination branch_wheels --path ./.whl - - python .buildkite/copy_files.py --destination jars --path ./.jar/linux - python .buildkite/copy_files.py --destination branch_jars --path ./.jar/linux + # Upload to latest directory. + - if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination wheels --path ./.whl; fi + - if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination jars --path ./.jar/linux; fi - label: ":ferris_wheel: Post-wheel tests" conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"] diff --git a/ci/travis/build-docker-images.py b/ci/travis/build-docker-images.py index 968833824..c6e81795a 100644 --- a/ci/travis/build-docker-images.py +++ b/ci/travis/build-docker-images.py @@ -408,10 +408,10 @@ if __name__ == "__main__": build_type = args.build_type is_buildkite = build_type == BUILDKITE if build_type == BUILDKITE: - if os.environ.get("BUILDKITE_PULL_REQUEST"): - build_type = PR - else: + if os.environ.get("BUILDKITE_PULL_REQUEST", "") == "false": build_type = MERGE + else: + build_type = PR if build_type == HUMAN: _configure_human_version() if (build_type in {HUMAN, MERGE} or is_buildkite