Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rapids-upload-artifacts-dir utility #43

Merged
merged 7 commits into from
Feb 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions tools/rapids-upload-artifacts-dir
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# A utility that uploads individual files from $RAPIDS_ARTIFACTS_DIR to S3
set -euo pipefail

pkg_prefix="$1"

if [ "${CI:-false}" = "false" ]; then
rapids-echo-stderr "Artifacts from local builds are not uploaded to S3."
exit 0
fi

if [ ! -d "${RAPIDS_ARTIFACTS_DIR}" ]; then
rapids-echo-stderr "Artifacts directory ${RAPIDS_ARTIFACT_DIR} not found."
exit 0
fi

# Upload each file found in RAPIDS_ARTIFACTS_DIR
for art_file in "${RAPIDS_ARTIFACTS_DIR}"/* ; do
[ -e "$art_file" ] || continue
upload_name=$(basename "${art_file}")
pkg_name="${pkg_prefix}.${upload_name}"
rapids-upload-to-s3 "${pkg_name}" "${art_file}"
done
2 changes: 1 addition & 1 deletion tools/rapids-upload-conda-to-s3
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ esac
if [ "${CI:-false}" = "false" ]; then
rapids-echo-stderr "Packages from local builds cannot be uploaded to S3."
rapids-echo-stderr "Open a PR to have successful builds uploaded."
exit 1
exit 0
fi

# Prepend `conda_` to PKG_TYPE
Expand Down