-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
78 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
# _rapids-path | ||
# A utility script to generate the URI path. | ||
|
||
set -euo pipefail | ||
source rapids-constants | ||
|
||
repo_name="${RAPIDS_REPOSITORY##*/}" | ||
|
||
s3_directory_id="" | ||
s3_prefix="" | ||
|
||
case "${RAPIDS_BUILD_TYPE}" in | ||
pull-request) | ||
# For PRs, we are using the 'trusted jobs on untrusted forks' paradigm | ||
# by copying PRs to branches named pull-request/$prnum | ||
# more info: | ||
# CopyPRs plugin in ops-bot: https://github.com/rapidsai/ops-bot#plugins | ||
# https://circleci.com/blog/triggering-trusted-ci-jobs-on-untrusted-forks/ | ||
s3_directory_id="${RAPIDS_REF_NAME##*/}" | ||
s3_prefix="ci" | ||
;; | ||
branch) | ||
s3_directory_id="${RAPIDS_REF_NAME}" | ||
s3_prefix="ci" | ||
;; | ||
nightly) | ||
s3_directory_id="${RAPIDS_NIGHTLY_DATE}" | ||
s3_prefix="nightly" | ||
;; | ||
*) | ||
rapids-echo-stderr "please pass a valid RAPIDS_BUILD_TYPE" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
short_hash=${RAPIDS_SHA:0:7} | ||
|
||
uri_path="${s3_prefix}/${repo_name}/" | ||
if [[ "${RAPIDS_BUILD_TYPE}" != "nightly" ]]; then | ||
uri_path+="${RAPIDS_BUILD_TYPE}/" | ||
fi | ||
uri_path+="${s3_directory_id}/${short_hash}/" |
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,28 @@ | ||
#!/bin/bash | ||
# rapids-http-path | ||
# | ||
# Calls _rapids-path and prepends the https://downloads.rapids.ai/ string | ||
# | ||
# A utility script that examines environment variables provided | ||
# by GitHub Actions to print out a HTTP path where the expected artifact | ||
# should be. | ||
# | ||
# The output format should be one of the following: | ||
# | ||
## For PR builds: | ||
## https://downloads.rapids.ai/ci/<REPO_NAME>/pull-request/<PR_NUMBER>/<SHORT_HASH>/ | ||
|
||
## For branch builds: | ||
## https://downloads.rapids.ai/ci/<REPO_NAME>/branch/<BRANCH_NAME>/<SHORT_HASH>/ | ||
|
||
## For nightly builds: | ||
## https://downloads.rapids.ai/nightly/<REPO_NAME>/<DATE>/<SHORT_HASH>/ | ||
|
||
source _rapids-path | ||
export RAPIDS_SCRIPT_NAME="rapids-http-path" | ||
|
||
RAPIDS_DOWNLOADS_DOMAIN="${RAPIDS_DOWNLOADS_DOMAIN:-downloads.rapids.ai}" | ||
|
||
http_path="https://${RAPIDS_DOWNLOADS_DOMAIN}/${uri_path}" | ||
|
||
echo -n "${http_path}" |
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